2012-09-16 331 views
0

我在嘗試從我的網絡攝像頭將音頻+視頻錄製到文件時出現問題。如果我使用的是videotestsrcautoaudiosrc,那麼我可以正確讀取所有內容(請參閱從網絡攝像頭的麥克風錄製音頻和測試視頻圖像的文件),但只要我用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沒有那麼簡單給我測試圖像+真實音頻。

替換autoauidosrcaudiotestsrc爲我提供了真實圖像+測試音頻。

我開始認爲這是我的攝像頭的某種限制。那可能嗎?

編輯:

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

回答

1

請做一個 gst-launch-1.0 v4l2src ! videoscale ! videoconvert ! autovideosink 這是否運行?如果不重複爲 GST_DEBUG="v4l2*:5" GST_DEBUG_NO_COLOR=1 gst-launch 2>debug.log ... 並檢查日誌中是否有錯誤。您也可能想運行v4l-info(在debian/ubuntu下安裝v4l-conf)並報告您的相機支持哪些格式。

+0

你有一個小錯字('''ffmpegcolorscale'''而不是''ffmpegcolorspace''')。是的,它的工作,但這不是我的問題的重點。正如我所說,我只能獲得視頻或音頻,但不能同時獲得。 – alexandernst

+0

對不起'錯字。你可以得到一個faling pipleine的debug.log,並把它放在一些pastebin站點上。這聽起來很有趣。 – ensonic

+0

看到這裏或在我的問題編輯http://pastie.org/4755009 – alexandernst

相關問題