Gstreamer:为什么在显示某些过滤器之前我需要一个视频转换?

Mar*_*Aja 7 gstreamer

我正在GStreamer 1.0上编写一个非常基本的管道,我想了解为什么在显示流之前我需要一个视频转换.

gst-launch-1.0 videotestsrc ! vertigotv ! videoconvert ! autovideosink
Run Code Online (Sandbox Code Playgroud)

如果我从管道中删除视频会话然后我收到一个错误,并且流不播放:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2933): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
Run Code Online (Sandbox Code Playgroud)

我不明白为什么无法自动协商上限.

以下是眩晕水槽垫的功能模板:

Capabilities:
  video/x-raw
             format: { RGBx, BGRx }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
Run Code Online (Sandbox Code Playgroud)

这是autovideosink的src pad的功能模板:

Capabilities:
  ANY
Run Code Online (Sandbox Code Playgroud)

有人可以解释为什么这个元素是管道的必要条件.为什么我需要在显示管道之前切换颜色空间?有没有办法不使用这个元素(也许使用上限)?

Kyr*_*iev 6

vertigotv元素只能处理RGBx和BGRx格式的原始视频帧autovideosink无法保证支持RGBx / BGRx格式。您需要使用videoconvert元素来确保vertigotv的源极和autovideosink的水槽垫片之间的兼容性

autovideosink是一个bin,其中包含实际的视频接收器。autovideosink的接收器功能由其内部视频接收器的接收器功能决定。 具有autovideosink的管道图,该管道图使用glimagesink,不带视频转换

它可以使用几种类型的视频接收器。glimagesink,例如,可以在没有videoconvert(因为它可以读取RGBx / BGRx帧)的情况下工作。osxvideosink另一方面,如果没有,则将无法工作videoconvert(因为缺少对RGBx / BGRx的支持)。

万一autovideosink使用支持RGBx / BGRx的视频接收器,videoconvert元素将仅通过帧而不执行任何工作。因此,您可以放心地将其保留在所有情况下。

  • 是的,在命令前添加“ GST_DEBUG_DUMP_DOR_DIR =。”,例如:“ GST_DEBUG_DUMP_DOR_DIR =”。gst-play-1.0〜/ music.mp3`您将使用.dot格式的图表。您可以稍后预览或将其转换为SVG或PNG。 (3认同)
  • @KyryloPolezhaiev我想你的意思是GST_DEBUG_DUMP_DOT_DIR (3认同)