2013-09-26 40 views
1

我有一個問題,試圖通過聲音從Logitech c210網絡攝像頭流式傳輸rtmp。raspberrypi gstreamer1.0 alsasrc0:內部數據流錯誤

心中已經安裝gstreamer1.0-OMX和其他需要塞入,但是當我試着讓視頻(爲了簡化讓我們把它寫到FLV文件):

gst-launch-1.0 v4l2src ! "video/x-raw,width=640,height=480,framerate=30/1" ! \ 
omxh264enc target-bitrate=1000000 control-rate=variable ! video/x-h264,profile=high ! \ 
h264parse ! queue ! flvmux name=mux alsasrc device=plughw:1 ! audioresample \ 
! audio/x-raw,rate=48000,channels=1 ! queue ! voaacenc bitrate=32000 ! queue ! mux. mux. \! filesink location=1.flv 

和我一樣的錯誤:

Setting pipeline to PAUSED ... 
Pipeline is live and does not need PREROLL ... 
Setting pipeline to PLAYING ... 
New clock: GstAudioSrcClock 
ERROR: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Internal data flow error. 
Additional debug info: 
gstbasesrc.c(2812): gst_base_src_loop(): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: 
streaming task paused, reason not-negotiated (-4) 
Execution ended after 69507879 ns. 
Setting pipeline to PAUSED ... 
Setting pipeline to READY ... 
Setting pipeline to NULL ... 
libv4l2: warning v4l2 mmap buffers still mapped on close() 
Freeing pipeline ... 

有一些更多的調試信息(-vvv選項):

Setting pipeline to PAUSED ... 
Pipeline is live and does not need PREROLL ... 
Setting pipeline to PLAYING ... 
New clock: GstAudioSrcClock 
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000 
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000 
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)1 
/GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)1 
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)1 
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)1 
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)1 
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)1 
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1 
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1 
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)1, rate=(int)48000, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)1188 
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1 
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1 
ERROR: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Internal data flow error. 
Additional debug info: 
gstbasesrc.c(2812): gst_base_src_loop(): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: 
streaming task paused, reason not-negotiated (-4) 
Execution ended after 561957256 ns. 
Setting pipeline to PAUSED ... 
Setting pipeline to READY ... 
Setting pipeline to NULL ... 
libv4l2: warning v4l2 mmap buffers still mapped on close() 
Freeing pipeline ... 

我sepose有一個公關阿爾薩速度或緩衝區等問題,有沒有解決方案如何使其工作?

我可以用arecord或gstreamer錄製聲音,沒有任何問題。或者只是視頻也。只有通過一起捕捉視頻和聲音纔會出現問題。

感謝

回答

0

的問題是,你要麼alsasrc1.0尚未安裝正確安裝在all.i會嘗試以下方法:

第一次嘗試加裝alsasrc爲gstreamer1.0 :

sudo apt-get install gstreamer1.0-alsa 

有時候Linux只是很奇怪,雖然你已經安裝了一個軟件包,但是合併並沒有正確完成。

如果上述方案沒有奏效嘗試安裝所有所需的軟件包爲您的管道爲gstreamer0.10版本,並嘗試用管道gst-launch-0.10