I'm having a problem trying to record audio+video from my webcam to a file. If I use videotestsrc
and autoaudiosrc
I get everything right (read as in I get a file with audio recorded from the webcam's mic, and test-video image), but as soon as I replace videotestsrc
with v4l2src
(or autovideosrc
) I get Error starting streaming on device '/dev/video0'
.
我有一个问题试图录制音频+视频从我的网络摄像头到一个文件。如果我使用videotestsrc和autoaudiosrc,我就能把所有的东西都弄对了(比如,我从网络摄像头的麦克风和测试视频图像中得到了一个音频文件),但是一旦我用v4l2src(或autovideosrc)替换了videotestsrc,我就会在设备‘/dev/video0’上启动流。
The command I'm using:
我使用的命令:
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 -发射- 0.10 videotestsrc !队列!ffmpegcolorspace !theoraenc !队列!oggmux name = mux autoaudiosrc !队列!audioconvert !vorbisenc !队列!mux。mux。!队列!filesink位置= test.ogg
Why is that happening? What am I doing wrong?
这是为什么发生?我做错了什么?
EDIT:
编辑:
In fact, something as simple as
事实上,就像这样简单。
gst-launch-0.10 autovideosrc ! autovideosink autoaudiosrc ! autoaudiosink
gst -发射- 0.10 autovideosrc !autovideosink autoaudiosrc !autoaudiosink
is failing with the same error (Error starting streaming on device '/dev/video0')
在相同的错误中失败(在设备'/dev/video0上启动流错误)
Replacing autovideosrc
with videotestsrc
gives me test image + real audio.
用videotestsrc代替autovideosrc给我测试图像+真正的音频。
Replacing autoauidosrc
with audiotestsrc
gives me real image + test audio.
用audiotestsrc替换autoauidosrc给了我真实的图像+测试音频。
I'm starting to think that this is some kind of limitation of my webcam. Is that possible?
我开始认为这是我的网络摄像头的限制。这有可能吗?
EDIT:
编辑:
GST_DEBUG=2 log here: http://pastie.org/4755009
GST_DEBUG = 2日志:http://pastie.org/4755009
EDIT 2:
编辑2:
GST_DEBUG="v4l2*:5" (gstreamer 0.10): http://pastie.org/4810519
GST_DEBUG = " v4l2 *:5 "(gstreamer 0.10):http://pastie.org/4810519
GST_DEBUG="v4l2*:5" (gstreamer 1.0): http://pastie.org/4810502
GST_DEBUG = " v4l2 *:5 "(gstreamer 1.0):http://pastie.org/4810502
1 个解决方案
#1
1
Please do a gst-launch-1.0 v4l2src ! videoscale ! videoconvert ! autovideosink
Does that run? If not repeat as GST_DEBUG="v4l2*:5" GST_DEBUG_NO_COLOR=1 gst-launch 2>debug.log ...
and check the log for errors. You also might want to run v4l-info (install v4l-conf under debian/ubuntu) and report what formats your camera supports.
请做一个gst-launch-1.0 v4l2src !videoscale !videoconvert !autovideosink运行吗?如果不重复GST_DEBUG="v4l2*:5" GST_DEBUG_NO_COLOR=1 gst-launch 2>调试。日志……检查日志是否有错误。您还可能想要运行v4l-info(在debian/ubuntu下安装v4l-conf),并报告您的相机支持的格式。
#1
1
Please do a gst-launch-1.0 v4l2src ! videoscale ! videoconvert ! autovideosink
Does that run? If not repeat as GST_DEBUG="v4l2*:5" GST_DEBUG_NO_COLOR=1 gst-launch 2>debug.log ...
and check the log for errors. You also might want to run v4l-info (install v4l-conf under debian/ubuntu) and report what formats your camera supports.
请做一个gst-launch-1.0 v4l2src !videoscale !videoconvert !autovideosink运行吗?如果不重复GST_DEBUG="v4l2*:5" GST_DEBUG_NO_COLOR=1 gst-launch 2>调试。日志……检查日志是否有错误。您还可能想要运行v4l-info(在debian/ubuntu下安装v4l-conf),并报告您的相机支持的格式。