Muxing音频和视频在GStreamer冻结。

时间:2022-04-20 04:51:43

Could anybody provide example of working pipeline for muxing video and audio? I've found one here and tried to change it for using encoders I need but it doesn't seem to work.

有没有人可以为muxing视频和音频提供工作管道的例子?我在这里找到了一个,并试图用我需要的编码器来改变它,但它似乎不起作用。

Here's how pipeline looks like:

管道是这样的:

gst-launch -v v4l2src always-copy=true num-buffers=200 input-src=composite ! \
"video/x-raw-yuv,format=(fourcc)NV12,width=480,height=320" ! \ 
TIVidenc1 codecName=h264enc engineName=codecServer byteStream=FALSE ! \ 
queue ! muxer. \ 
alsasrc num-buffers=200 ! "audio/x-raw-int,width=16" ! \
    TIAudenc1 codecName=aaclcenc engineName=codecServer ! queue ! muxer. \
avimux name=muxer ! filesink location=output_cap_.avi

When I'm running this pipeline it just freezes. Here's the output:

当我运行这条管道时,它就会冻结。输出:

(gst-launch-0.10:1792): GStreamer-WARNING **: External plugin loader failed. This most likely means that the plugin loader helper binar
y was not found or could not be run. If you are running an uninstalled GStreamer setup, you might need to update your gst-uninstalled s
cript so that the GST_PLUGIN_SCANNER environment variable gets set.

(gst-launch-0.10:1792): GStreamer-WARNING **: Failed to load plugin '/opt/gstreamer/lib/gstreamer-0.10/libgstmad.so': /opt/gstreamer/li
b/libid3tag.so.0: undefined symbol: id3_frametype_obsolete
Setting pipeline to PAUSED ...
davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
davinci_previewer davinci_previewer.2: ipipe_set_preview_config
vpfe-capture vpfe-capture: IPIPE Chained
vpfe-capture vpfe-capture: Resizer present
EVM: switch to tvp5146 SD video input
tvp514x 1-005d: tvp5146 (Version - 0x03) found at 0xba (DaVinci I2C adapter)
tvp514x 1-005d: invalid control id 9963780
tvp514x 1-005d: invalid control id 9963781
tvp514x 1-005d: invalid control id 9963782
tvp514x 1-005d: invalid control id 9963783
tvp514x 1-005d: invalid control id 9963784
tvp514x 1-005d: invalid control id 9963785
tvp514x 1-005d: invalid control id 9963786
tvp514x 1-005d: invalid control id 9963787
tvp514x 1-005d: invalid control id 9963788
tvp514x 1-005d: invalid control id 9963789
tvp514x 1-005d: invalid control id 9963790
tvp514x 1-005d: invalid control id 9963791
tvp514x 1-005d: invalid control id 9963792
tvp514x 1-005d: invalid control id 9963793
tvp514x 1-005d: invalid control id 9963795
tvp514x 1-005d: invalid control id 9963796
tvp514x 1-005d: invalid control id 9963797
tvp514x 1-005d: invalid control id 9963798
tvp514x 1-005d: invalid control id 9963799
tvp514x 1-005d: invalid control id 9963800
tvp514x 1-005d: invalid control id 9963801
tvp514x 1-005d: invalid control id 9963802
tvp514x 1-005d: invalid control id 9963803
tvp514x 1-005d: invalid control id 9963804
tvp514x 1-005d: invalid control id 9963805
tvp514x 1-005d: invalid control id 9963806
tvp514x 1-005d: invalid control id 9963807
tvp514x 1-005d: invalid control id 9963808
tvp514x 1-005d: invalid control id 9963809
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
/GstPipeline:pipeline0/GstAlsaSrc:alsasvpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2
rc0: actual-latevpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
ncy-time = 10000
/GstPipeline:pipeline0/GstAlsavpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2
Src:alsasrc0.Gstvpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
Pad:src: caps = vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 1
audio/x-raw-int,vpfe-capture vpfe-capture: adjusted width = 32, height = 2, bpp = 1, bytesperline = 32, sizeimage = 96
 endianness=(int)1234, signed=(boolean)true, widvpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 1
th=(int)16, deptvpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 1, bytesperline = 2176, sizeimage = 5013504
h=(int)16, rate=(int)44100, channels=(int)2
vpfe-capture vpfe-capture: width = 480, height = 320, bpp = 1
vpfe-capture vpfe-capture: adjusted width = 480, height = 320, bpp = 1, bytesperline = 480, sizeimage = 230400
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0: queue-size = 3
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)25/1, width=(in
t)480, height=(int)320
Pipeline is live and does not need PREROLL ...
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Video input device did not accept new frame rate setting.
Additional debug info:
v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Invalid argument
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=
(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width
=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width
=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstTIAudenc1:tiaudenc10.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(
int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstTIAudenc1:tiaudenc10.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)44100, bit
rate=(int)64000
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)44100, bitrate=(i
nt)64000
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)44100, bitrate=(in
t)64000
/GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:src: caps = video/x-h264, framerate=(fraction)30000/1001, width=(int)480, height=
(int)320, codec_data=(buffer)01640028ffe1005967640028ad84054562b8ac5474202a2b15c562a3a1015158ae2b151d080a8ac57158a8e84054562b8ac5474202
a2b15c562a3a10248521393c9f27e4fe4fc9f279b9b34d081242909c9e4f93f27f27e4f93cdcd9a6b40f053201000468ee3cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, framerate=(fraction)30000/1001, width=(int)480, height=(int)32
0, codec_data=(buffer)01640028ffe1005967640028ad84054562b8ac5474202a2b15c562a3a1015158ae2b151d080a8ac57158a8e84054562b8ac5474202a2b15c5
62a3a10248521393c9f27e4fe4fc9f279b9b34d081242909c9e4f93f27f27e4f93cdcd9a6b40f053201000468ee3cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, framerate=(fraction)30000/1001, width=(int)480, height=(int)320
, codec_data=(buffer)01640028ffe1005967640028ad84054562b8ac5474202a2b15c562a3a1015158ae2b151d080a8ac57158a8e84054562b8ac5474202a2b15c56
2a3a10248521393c9f27e4fe4fc9f279b9b34d081242909c9e4f93f27f27e4f93cdcd9a6b40f053201000468ee3cb0
/GstPipeline:pipeline0/GstAviMux:muxer.GstPad:video_00: caps = video/x-h264, framerate=(fraction)30000/1001, width=(int)480, height=(in
t)320, codec_data=(buffer)01640028ffe1005967640028ad84054562b8ac5474202a2b15c562a3a1015158ae2b151d080a8ac57158a8e84054562b8ac5474202a2b
15c562a3a10248521393c9f27e4fe4fc9f279b9b34d081242909c9e4f93f27f27e4f93cdcd9a6b40f053201000468ee3cb0

There are a lot of hardware specific things but maybe I'm just using wrong syntax.

有很多硬件特定的东西,但也许我只是使用了错误的语法。

1 个解决方案

#1


0  

I don't know exactly what the problem is, but I wanted to point out that the avimux example you linked is for gstreamer-1.0 (and it works for me). However I see that you are using gstreamer 0.10 which is quite old now. If possible, try upgrading to the latest version and see if that helps.

我不知道问题到底是什么,但我想指出的是,您链接的avimux示例是gstreamerl -1.0(它对我有用)。但是,我看到您使用的是gstreamer 0.10,它现在已经相当老了。如果可能的话,尝试升级到最新版本,看看是否有帮助。

#1


0  

I don't know exactly what the problem is, but I wanted to point out that the avimux example you linked is for gstreamer-1.0 (and it works for me). However I see that you are using gstreamer 0.10 which is quite old now. If possible, try upgrading to the latest version and see if that helps.

我不知道问题到底是什么,但我想指出的是,您链接的avimux示例是gstreamerl -1.0(它对我有用)。但是,我看到您使用的是gstreamer 0.10,它现在已经相当老了。如果可能的话,尝试升级到最新版本,看看是否有帮助。