The basic problem is that I can send the stream using ffmpeg, but not with VLC. It looks like VLC is sending a lot more data than ffmpeg, and I don't understand why In more detail...
The client end is expecting to receive an H264 rtp stream, and is using a simple ffplay command to receive/display:
Code: Select all
ffplay -flags low_delay -probesize 32 -protocol_whitelist file,udp,rtp -i test1.sdp
I've found that I can stream OK with ffmpeg, but not VLC. These are the commands I am sending the stream with:
Code: Select all
ffmpeg -re -i "C:\Temp\Video Replays\192.168.1.1_12344_4\replay.ts" -c:v libx264 -preset ultrafast -tune zerolatency -f rtp rtp://192.168.1.1:12210
vlc "C:\Temp\Video Replays\192.168.1.1_12344_4\replay.ts" --sout-avcodec-codec=libx264 --sout-x264-preset=ultrafast --sout-x264-tune=zerolatency --sout #rtp{dst=192.168.1.1,port=12210}
On further investigation, it appears that VLC sends data over the network at around 10x the rate of ffmpeg for the same file (a few Mbps rather than a few hundred kbps). I guess that explains the packet loss, but I don't know why there's such a difference.
Does anyone have an idea how I can reduce the data rate with VLC to match that of ffmpeg? I guess I'm missing some options, or have something wrong on my command line, but don't really know where to start.
I can post the output from VLC/ffplay if necessary, but maybe someone can see the problem with my command line?
Cheers