2012-09-16 221 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

相关问题