gstreamer - 如何构建 gstreamer 管道以将图像文件发送到 V4L2 接收器?
问题描述
我想构建一个 gstreamer 管道以将图像文件发送到 V4L2 设备,并让该设备无限期地显示图像。
gst-launch-1.0 -v filesrc location=cat.jpg ! jpegdec ! v4l2sink device=/dev/video1
给我以下输出:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)1200, height=(int)1200, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)0/1
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
我怀疑我遗漏了一些与 [not] 将图像数据转换为视频数据相关的内容,因为替换v4l2sink
为fakesink
似乎有效。
解决方案
经过一番摆弄,似乎我只是videoconvert
从我的管道中丢失了(去图!):
gst-launch-1.0 \
filesrc location=cat.jpg \
! jpegdec \
! videoconvert \
! v4l2sink device=/dev/video1
推荐阅读
- android - Recyclerview在android中滚动其他布局
- c# - log4net 1 个附加程序 2 个文件
- solr - 过滤子文档并检索父+子文档
- java - 休眠“自动模式更新”会丢弃它不拥有的任何东西吗?
- chef-infra - 使用 Chef 更新系统用户获取配方编译错误
- mysql - MySQL - 搜索 JSON 类型行以查找打开的商店
- ruby-on-rails - 嵌套验证失败时表单项消失
- java - Android Spinner 包含很长的文本
- javascript - 带有命名函数和参数的 addEventListener
- angular - Angular 5:检查铸造对象的类型