Udpsrc lost and re- connection problem

Hi Guys,

We have an application to use udpsink/udpsrc to deliver live videos between a moving TX2 (the server) and an Andriod device (the client) through wireless links. Sometimes because of the radio dropping, the received video is frozen, but we wants the video to be automatically back if the communication link backs normal. There may have some frames loss in between, but it’s totally OK for us. We only care about if the video can be automatically back when the radio link is recovered.

To this end, we tried the following two pipelines in client side:

A. udpsrc port=50000 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96 ! rtpjitterbuffer mode=0 drop-on-latency=true latency=200 max-dropout-time=400 max-misorder-time=200 ! rtph264depay ! h264parse ! decodebin ! autovideosink sync=false async=false

B. dpsrc port=50000 ! application/x-rtp, encoding-name=H264, payload=96 ! rtpjitterbuffer drop-on-latency=false latency=1 ! rtph264depay ! h264parse ! decodebin ! autovideosink sync=false

Pipeline A gives us nice low latency video, but if the radio drops link, the video never recovers. When the link is reestablished the server still receives commands from the client and responds normally but the video is frozen forever unless we manually kill and restart the program.

Alternatively, for pipeline B, we have horrible latency (~5 sec) on the video. However, if it loses a link the video freezes, but the video starts smoothly when the radio link comes back. This is perfect.

So my question is what other parameters we can tune at here to not only keep a decent latency but also could let the video automatically back?

Thanks a lot!

-AppleTree

P.S.

Server side pipeline:
pipelineStr += " ! video/x-raw,format=(string)I420,width=(int)" + std::to_string(w) + β€œ,height=(int)” + std::to_string(h) +
" , framerate=(fraction)" + std::to_string(m_videoInfo.frame_rate.num)+ β€œ/” + std::to_string(m_videoInfo.frame_rate.den) +
" ! identity check-imperfect-timestamp=true" +
" ! nvvidconv" +
" ! omxh264enc control-rate=2 bitrate=β€œ+std::to_string(br_bps) +” low-latency=1 maxperf-enable=true" +
" ! video/x-h264,stream-format=(string)byte-stream ! h264parse ! rtph264pay" +
" ! udpsink host=" + clientIp +" port=50000 sync=" + syncStr + " async=false";

Hi,

This sounds like an issue with Jetson TX2 and not NVAPI. I am moving this to the TX2 forum for better visibility.

1 Like

Hi,
We have deprecated omx plugins. Suggest use nvv4l2h264enc plugin in server command. Please set idrinterval=30 to have IDR frames in each 30-frame interval.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.