使用 GStreamer 编码单张 png 文件
Using GStreamer for encoding single shot png file
我在将一些视频流编码为 png 文件时遇到问题
我输入的命令行如下
gst-launch-1.0 --verbose v4l2src num-buffers=1 ! pngenc ! filesink location=qrcode.png
但是我有以下错误
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:
../../../../git/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.000189250
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
内部数据流错误是什么意思?我试图通过将 pngenc 更改为 jpegenc 并将文件更改为 *.jpg 以 jpeg 格式对其进行编码。它工作得很好
此致
可能是您的相机传送的格式不符合 pngenc
元素支持的格式。尝试在pngenc
前加一个videoconvert
:
gst-launch-1.0 --verbose v4l2src num-buffers=1 ! videoconvert ! pngenc ! filesink location=qrcode.png
我在将一些视频流编码为 png 文件时遇到问题
我输入的命令行如下
gst-launch-1.0 --verbose v4l2src num-buffers=1 ! pngenc ! filesink location=qrcode.png
但是我有以下错误
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:
../../../../git/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.000189250
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
内部数据流错误是什么意思?我试图通过将 pngenc 更改为 jpegenc 并将文件更改为 *.jpg 以 jpeg 格式对其进行编码。它工作得很好
此致
可能是您的相机传送的格式不符合 pngenc
元素支持的格式。尝试在pngenc
前加一个videoconvert
:
gst-launch-1.0 --verbose v4l2src num-buffers=1 ! videoconvert ! pngenc ! filesink location=qrcode.png