I'm using live555 to stream H264 video from On-demand RTSP server using RTSP over TCP as follows:
./openRTSP -F tcp-test -Q -d 60 -b 500000 -4 -P 62 -w 3840 -h 2160 -f 30 rtsp://ip-address:8554/h264ESVideoTest
It works well when RTT is less than 30ms. However, if I increase RTT to 100ms using linux's tcp tc
command, then I can only get half quality video. RTSP over UDP still works fine when RTT is 100ms. Since I'm running this locally it is not matter of network traffic as I can confirm using iperf that throughput can go up to maximum even when rtt is 100ms. So I'm wondering what causes this?
After looking around a little bit, this turned out to be buffering problem. OpenRTSP uses 50K buffer by default which falls short when RTT is large. Thus, I have increased buffer size in increaseSendBufferTo() method call in liveMedia/GenericMediaServer.cpp which helped to resolve the issue.