leg*_*git 7 linux terminal pipeline gstreamer v4l2
我不确定为什么这个管道会中断,我已经根据网站的确切说明在 Linux 上安装了 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 ...
Run Code Online (Sandbox Code Playgroud)
如果我把它改成:
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert! videoscale ! video/x-raw, width=2592, height=600 ! autovideosink -v
Run Code Online (Sandbox Code Playgroud)
它会起作用,但为什么反之则不行呢?
小智 12
您的网络摄像头将原始视频输出传输给正在收听的人。添加将videoconvert原始视频编码到可以由元素操作的编解码器videoscale以及元素可以理解的操作的最终产品autovideosink。
告诉gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert! videoscale ! video/x-raw, width=2592, height=600 ! autovideosinkgstreamer 从摄像头获取原始视频,将其编码为我们可以理解的内容,更改视频并显示它也是如此。
我强烈建议,当您对某个元素有疑问时,请致电gst-inspect-1.0 <element name>查看其描述和属性。