【问题标题】:When the image size is large, the GStreamer pipeline using shmsink and shmsrc stops当图像尺寸较大时,使用 shmsink 和 shmsrc 的 GStreamer 管道停止
【发布时间】:2021-05-14 08:42:07
【问题描述】:

我想通过共享内存传输大图像。 当我在 GStreamer 中使用 shmsink 和 shmsrc 发送 4000x3000 像素图像时,图像会在显示几帧后停止。 但是,它不会崩溃,只是图像停止。没有错误消息。

这是发送的命令。

gst-launch-1.0 v4l2src device=/dev/video0 \
! "video/x-raw,format=(string)YUY2,width=(int)640,height=(int)480,pixel-aspect-ratio=(fraction)1/1,framerate=(fraction)30/1" \
! videoscale \
! "video/x-raw, width=(int)4000, height=(int)3000" \
! shmsink socket-path=/tmp/foo

这是接收命令。

gst-launch-1.0 shmsrc socket-path=/tmp/foo \
! "video/x-raw,format=(string)YUY2,width=(int)4000,height=(int)3000,pixel-aspect-ratio=(fraction)1/1,framerate=(fraction)30/1" \
! xvimagesink

这是我们尝试过的。

  • 将图像大小更改为 3600x2700 -> 可以正常工作
  • 将发送管道中的 shmsink 更改为 xvimagesink -> 工作正常

我正在等待任何建议。

【问题讨论】:

    标签: linux camera gstreamer gstreamer-1.0


    【解决方案1】:

    解决了。 我在 shmsink 中添加了“wait-for-connection=false”选项以防止它停止。

    接收管道保持不变,但发送管道现在如下。

    gst-launch-1.0 v4l2src device=/dev/video0 \
    ! "video/x-raw,format=(string)YUY2,width=(int)640,height=(int)480,pixel-aspect-ratio=(fraction)1/1,framerate=(fraction)30/1" \
    ! videoscale \
    ! "video/x-raw, width=(int)4000, height=(int)3000" \
    ! shmsink socket-path=/tmp/foo wait-for-connection=false
    

    我没有从任何地方获得信息,我只是更改了 shmsink 的所有选项,它偶然工作。

    我不知道它为什么起作用,所以如果你能告诉我为什么,我将不胜感激。

    【讨论】:

      猜你喜欢
      • 2020-01-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-13
      • 1970-01-01
      • 2012-08-19
      • 1970-01-01
      相关资源
      最近更新 更多