简体   繁体   English

GStreamer中的Muxing音频和视频冻结

[英]Muxing audio and video in GStreamer freezes

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. 我在这里找到了一个并尝试更改它以使用我需要的编码器,但它似乎不起作用。

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. 有很多硬件特定的东西,但也许我只是使用了错误的语法。

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). 我不知道到底是什么问题,但我想指出的是,您链接的avimux示例适用于gstreamer-1.0(它对我有用)。 However I see that you are using gstreamer 0.10 which is quite old now. 但是我看到您正在使用的gstreamer 0.10现在已经很旧了。 If possible, try upgrading to the latest version and see if that helps. 如果可能,请尝试升级到最新版本,看看是否有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM