Gstreamer视频流错误和中断/开发/视频源

时间:2014-04-29 01:38:15

标签: gstreamer h.264 v4l2

我正在使用Logitech C920相机传输H264视频,如下所示:

gst-launch-1.0 -v -e v4l2src device=/dev/video1 ! video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! tee name=t ! queue ! rtph264pay ! udpsink host=127.0.0.1 port=1234

(tee用于拆分以便稍后保存流)

此管道有效。但是,经过一段时间后,管道会崩溃:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
libv4l2: error dequeuing buf: No such device
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason error (-5)
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:12:06.806371505
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
libv4l2: error turning off stream: No such device
libv4l2: error turning off stream: No such device
libv4l2: error turning off stream: No such device
libv4l2: error querying buffer 0: No such device
libv4l2: error turning off stream: No such device
Setting pipeline to NULL ...
Freeing pipeline ...

这通常没问题,但是通过这种方式崩溃,视频对象(/ dev / video1)被破坏并消失。一旦我拔下并重新插入相机,它就会再次出现。我正在远程控制它,所以我无法以这种方式重置相机。

这是怎么发生的?有没有办法解决这个问题?某种方法重建/ dev / video *对象?

Edit1:在使用管道弄乱了一些之后,这显然有效:

gst-launch-1.0 -v -e v4l2src device = / dev / video1! video / x-h264,width = 1280,height = 720,framerate = 30/1! tee name = t!排队! h264parse! rtph264pay! udpsink host = 127.0.0.1 port = 1234

我刚把h264parse移到了发球台后面。仍然不知道为什么会这样,或原始问题是什么。

0 个答案:

没有答案