简体   繁体   English

gstreamer视频在UDP上每帧多个片段上撕裂

[英]gstreamer video tearing on multiple slices per frame over UDP

For bandwidth reasons I've modified the slice-header spacing to use more slices per I-frame, this causes tearing on the receiving end. 出于带宽原因,我修改了切片标头间距,以使每个I帧使用更多切片, 这会导致接收端撕裂。

The problem appears as if individual slices are getting decoded without an entire I-frame getting buffered up for the omxh264dec? 问题似乎好像是对单个片进行解码而没有为omxh264dec缓冲整个I帧? This is a bit strange as the Tegra decoder is supposed to only work on a frame level.. 这有点奇怪,因为Tegra解码器应该只能在帧级别工作。

Perhaps this problem can be alleviated by correct synchronization of GstBuffer:s on the receiving end? 也许可以通过在接收端正确同步GstBuffer:s来缓解此问题?

Repro case: (Jetson TX2) 复制案例:(Jetson TX2)

# Sender:
gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420, framerate=(fraction)60/1' ! nvvidconv flip-method=0 ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxh264enc iframeinterval=1 bit-packetization=TRUE slice-header-spacing=450000 control-rate=2 preset-level=0 profile=1 qp-range=-1,-1:10,10:-1,-1 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=60000 ! udpsink host=127.0.0.1 port=5000

# Reciever:
gst-launch-1.0 udpsrc port=5000 ! "application/x-rtp,encoding-name=H264,payload=96" ! rtph264depay ! h264parse ! omxh264dec ! videoconvert ! xvimagesink async=TRUE sync=TRUE

正如Florian Zwoch所建议的那样,使用rtpjitterbuffer解决了此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM