v4l2sink在gstreamer 0.10中工作,但不在1.0中

时间:2015-01-20 20:39:08

标签: gstreamer v4l2

这有效:

$ GST_DEBUG="*:2" gst-launch-0.10 uridecodebin uri=file:///home/m132/Wideo/peespe.mp4 ! v4l2sink device=/dev/video1 
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.046280176  3378      0x11d3850 WARN                 qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type avc1
0:00:00.046346724  3378      0x11d3850 WARN                 qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type avcC
0:00:00.046475793  3378      0x11d3850 WARN                 qtdemux qtdemux.c:7044:qtdemux_parse_trak:<qtdemux0> unknown version 00000000
0:00:00.062728530  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YUYV@48x32: 0
0:00:00.062827014  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YUYV@48x32: 0
0:00:00.062900935  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at UYVY@48x32: 0
0:00:00.062960596  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YU12@48x32: 0
0:00:00.063020699  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YV12@48x32: 0
0:00:00.063080026  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YVU9@48x32: 0
0:00:00.063136468  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YUV9@48x32: 0
0:00:00.063212572  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGB4@48x32: 0
0:00:00.063276755  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at BGR4@48x32: 0
0:00:00.063336345  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGB3@48x32: 0
0:00:00.063397002  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at BGR3@48x32: 0
0:00:00.063454343  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at GREY@48x32: 0
0:00:00.063514132  3378      0x11d5280 WARN                    v4l2 gstv4l2object.c:1771:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YVYU@48x32: 0
0:00:00.129788005  3378      0x11d5280 WARN                    v4l2 gstv4l2bufferpool.c:367:gst_v4l2_buffer_pool_new:<v4l2sink0> using 8 buffers instead
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.133604857  3378      0x123d440 WARN                     bin gstbin.c:2395:gst_bin_do_latency_func:<pipeline0> did not really configure latency of 0:00:00.000000000
New clock: GstSystemClock
Redistribute latency...
0:00:00.157448133  3378      0x123d440 WARN                     bin gstbin.c:2395:gst_bin_do_latency_func:<pipeline0> did not really configure latency of 0:00:00.000000000
Got EOS from element "pipeline0".
Execution ended after 21079905156 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

然而,这个失败了:

$ GST_DEBUG="*:2" gst-launch-1.0 uridecodebin uri=file:///home/m132/Wideo/peespe.mp4 ! v4l2sink device=/dev/video1 
Setting pipeline to PAUSED ...
0:00:00.135221066  3504      0x1f94930 WARN                 basesrc gstbasesrc.c:3470:gst_base_src_start_complete:<source> pad not activated yet
0:00:00.135913536  3504      0x1f94930 WARN                 basesrc gstbasesrc.c:3470:gst_base_src_start_complete:<source> pad not activated yet
Pipeline is PREROLLING ...
Redistribute latency...
0:00:00.179098065  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YUYV@48x32: 0
0:00:00.179206928  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YUYV@48x32: 0
0:00:00.179273041  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at UYVY@48x32: 0
0:00:00.179318580  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YU12@48x32: 0
0:00:00.179361779  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YV12@48x32: 0
0:00:00.179405357  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YVU9@48x32: 0
0:00:00.179466247  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YUV9@48x32: 0
0:00:00.179508617  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGB4@48x32: 0
0:00:00.179549910  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at BGR4@48x32: 0
0:00:00.179591433  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGB3@48x32: 0
0:00:00.179633245  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at BGR3@48x32: 0
0:00:00.179675456  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at GREY@48x32: 0
0:00:00.179724725  3504 0x7f5354008590 WARN                    v4l2 gstv4l2object.c:1839:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YVYU@48x32: 0
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.249391995  3504 0x7f5354008590 ERROR                   v4l2 gstv4l2bufferpool.c:1133:gst_v4l2_buffer_pool_dqbuf:<v4l2sink0:pool:sink> No free buffer found in the pool at index 2.
0:00:00.249754249  3504 0x7f53600518f0 WARN                 qtdemux qtdemux.c:4434:gst_qtdemux_loop:<qtdemux0> error: streaming stopped, reason error
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: GStreamer encountered a general stream error.
Additional debug info:
qtdemux.c(4434): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped, reason error
Execution ended after 0:00:00.009459057
0:00:00.250059271  3504 0x7f53600518f0 WARN              multiqueue gstmultiqueue.c:1791:gst_multi_queue_sink_event:<multiqueue0> error: Internal data stream error.
0:00:00.250207990  3504 0x7f53600518f0 WARN              multiqueue gstmultiqueue.c:1791:gst_multi_queue_sink_event:<multiqueue0> error: streaming stopped, reason error
Setting pipeline to PAUSED ...
Setting pipeline to READY ...

(gst-launch-1.0:3504): GStreamer-CRITICAL **: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed
Setting pipeline to NULL ...
Freeing pipeline ...

我正在使用Fedora 21和以下版本的gstreamer:

$ gst-launch-0.10 --version
gst-launch-0.10 version 0.10.36
GStreamer 0.10.36
http://download.fedoraproject.org

$ gst-launch-1.0 --version
gst-launch-1.0 version 1.4.4
GStreamer 1.4.4
http://download.fedoraproject.org

/ dev / video1 v4l2loopback创建的设备。我必须使用gstreamer 1.0,因为它是gnome-shell桌面捕获界面支持的唯一版本。

1 个答案:

答案 0 :(得分:1)

使用

$ gst-inspect-1.0 v4l2sink

检查v4l2sink

中能够处理gst-launch-1.0的视频格式