我在嘗試從我的網絡攝像頭將音頻+視頻錄製到文件時出現問題。如果我使用的是videotestsrc
和autoaudiosrc
,那麼我可以正確讀取所有內容(請參閱從網絡攝像頭的麥克風錄製音頻和測試視頻圖像的文件),但只要我用v4l2src
(或autovideosrc
)替換videotestsrc
即可獲得Error starting streaming on device '/dev/video0'
。使用gstreamer錄製來自網絡攝像頭的音頻+視頻
命令我使用的是:
gst-launch-0.10 videotestsrc ! queue ! ffmpegcolorspace! theoraenc ! queue ! oggmux name=mux autoaudiosrc ! queue ! audioconvert ! vorbisenc ! queue ! mux. mux. ! queue ! filesink location = test.ogg
這是爲什麼發生?我究竟做錯了什麼?
編輯:
事實上,一些如
gst-launch-0.10 autovideosrc ! autovideosink autoaudiosrc ! autoaudiosink
與相同的錯誤(Error starting streaming on device '/dev/video0')
與videotestsrc
更換autovideosrc
沒有那麼簡單給我測試圖像+真實音頻。
替換autoauidosrc
與audiotestsrc
爲我提供了真實圖像+測試音頻。
我開始認爲這是我的攝像頭的某種限制。那可能嗎?
編輯:
GST_DEBUG = 2日誌這裏:http://pastie.org/4755009
編輯2:
GST_DEBUG = 「用v412 *:5」(gstreamer的0.10):http://pastie.org/4810519
GST_DEBUG =「V4L2 *:5「(gstreamer 1.0):http://pastie.org/4810502
你有一個小錯字('''ffmpegcolorscale'''而不是''ffmpegcolorspace''')。是的,它的工作,但這不是我的問題的重點。正如我所說,我只能獲得視頻或音頻,但不能同時獲得。 – alexandernst
對不起'錯字。你可以得到一個faling pipleine的debug.log,並把它放在一些pastebin站點上。這聽起來很有趣。 – ensonic
看到這裏或在我的問題編輯http://pastie.org/4755009 – alexandernst