Gstreamer管道的多个实例会导致视频损坏?

问题描述

我正在尝试使用gstreamer流式传输4个视频。我可以毫无问题地传输2个视频,但是当我启动第3个gstreamer管道时,所有3个视频都损坏了。谁能告诉我为什么?

这是我给查看者的脚本/管道。

port="$((10000+$1*2))"
cmd="gst-launch-1.0 udpsrc port=${port} ! application/x-rtp,media=video,encoding-name=H264,playload=96 ! queue ! rtph264depay ! h264parse ! video/x-h264,alignment=au ! nvv4l2decoder disable-dpb=true enable-max-performance=1 ! queue max-size-bytes=0 ! videorate max-rate=30 ! queue ! nvvidconv ! nveglglessink window-width=720 window-height=480 sync=false"****

这是我的彩带管道。我为每个实例udpsrc更新了5004/5005/5006/5007端口 然后为每个实例10000/10002/10004/10006

更新udpsink端口
udpsrc port=5004 buffer-size=60000000 ! application/x-rtp,clock-rate=90000,encoding-name=H265,playload=96 ! queue ! rtph265depay ! h265parse ! video/x-h265,alignment=au ! nvv4l2decoder disable-dpb=true enable-max-performance=1 ! queue max-size-bytes=0 ! videorate max-rate=30 ! tee name=dec dec. ! queue ! nvvidconv left=240 right=1680 top=60 bottom=1020 ! video/x-raw(memory:NVMM),format=NV12,width=360,height=240,framerate=30/1 ! nvvidconv ! video/x-raw,framerate=30/1,height=240 ! shmsink socket-path=/tmp/video0 wait-for-connection=false shm-size=60000000 dec. ! queue ! nvvidconv ! video/x-raw,width=1920,height=1080,framerate=30/1 ! qtoverlay qml=qml/main.qml ! nvvidconv ! video/x-raw(memory:NVMM),format=I420,height=1080 ! omxh264enc ! video/x-h264,stream-format=byte-stream ! h264parse ! rtph264pay pt=96 ! tee name=ovl1 ovl1. !  udpsink host=127.0.0.1 port=10000 sync=false async=false***

我注意到,如果我不使用udpsink而仅使用shmsink,则视频损坏问题将消失。所以我认为解码元素有问题吗? 这是使用shmsink

的不受影响的管道
udpsrc port=5007 buffer-size=60000000 ! application/x-rtp,alignment=au ! nvv4l2decoder disable-dpb=true enable-max-performance=1 ! queue max-size-bytes=0 ! videorate max-rate=30 ! tee name=dec dec. ! queue ! nvvidconv left=150 right=1770 top=0 bottom=1080 ! video/x-raw(memory:NVMM),framerate=30/1 ! tee name=dectimg dectimg. ! nvvidconv ! video/x-raw,height=240 ! shmsink socket-path=/tmp/video3 wait-for-connection=false shm-size=60000000 dec. ! queue ! nvvidconv ! video/x-raw,framerate=30/1 ! qtoverlay qml=qml/main.qml ! tee name=ovl ovl. ! queue ! shmsink socket-path=/tmp/camera3 wait-for-connection=false shm-size=60000000**

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)