问题描述
我不确定为什么该管道中断了,我是否从网站上获得了gstreamer的确切说明,有什么想法?
gst-launch-1.0 v4l2src device=/dev/video0 ! videoscale ! video/x-raw,width=2592,height=600 ! autovideosink -v
Setting pipeline to PAUSED ...
Pipeline is live and does not need preroll ...
Setting pipeline to PLAYING ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped,reason not-negotiated (-4)
Execution ended after 0:00:00.000093207
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
解决方法
您的网络摄像头会将原始视频输出传输给正在收听的任何人。添加videoconvert
会将原始视频编码为编解码器,该编解码器可以由videoscale
元素进行操作,而操作的最终结果将由autovideosink
元素进行理解。
因此gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert! videoscale ! video/x-raw,width=2592,height=600 ! autovideosink
告诉gstreamer从摄像机获取原始视频,将其编码为我们可以理解的东西,更改视频并显示。
我真的建议您,如果对某个元素有疑问,请致电gst-inspect-1.0 <element name>
以查看其说明和属性。