Reducing end to end streaming latency (bmd->udp->bmd) < 0.5s
Hello! I am trying to achieve a streaming latency of around 300ms (end to end) using a dedicated Gigabit Ethernet LAN of 1080i @ 30fps. When I run bmon on linux box based streaming side, it clearly shows that I am using only 1Mbps. Also, another prime source of delay is the receipt of first I-frame on recieving end. I have read the streaming guide and I am trying to incorporate almost everything mentioned there but I am not sure if I am even headed in a direction where this will be possible. What is the minimum latency achieved so far? I managed only about 1.5 - 2s which is extremely high for the interactive application for which I intend to use this.
From this article, it seems feasible that with a dedicated and powerful what I mentioned above is possible. (Given it was 2010, when it was written) http://x264dev.multimedia.cx/archives/249
This is what I am doing at the moment. Streaming Side (On Ubuntu 12.04) ./bmdcapture -C0 -m11 -V4 -v -F nut -f pipe:1 | ffmpeg -i - -vcodec libx264 -preset ultrafast -crf 22 -pix_fmt yuv420p -tune zerolatency -threads 8 -keyint_min 5 -maxrate 800000 -bufsize 26666 -intra-refresh 1 -f mpegts udp://10.0.0.2:6666 Receiving Side (Tested on Ubuntu 12.04 and Windows 7) ffmpeg -i udp://10.0.0.2:6666 -probesize 100 -analyzeduration 50 -f decklink -s 1920x1080 -fflags nobuffer -r 30000/1001 -g 10 -pix_fmt uyvy422 -an "DeckLink 4K Extreme" Is there any parameters I am actually feeding in wrong? Isn't bufsize = maxrate / framerate? Is there anything I can do to make this come down to less than 0.5s? Could really use some expert advice. Thanks, Anusha
Anusha Balan <Anusha.Balan <at> intusurg.com> writes:
I managed only about 1.5 - 2s which is extremely high for the interactive application for which I intend to use this.
From this article, it seems feasible that with a dedicated and powerful what I mentioned above is possible. (Given it was 2010, when it was written) http://x264dev.multimedia.cx/archives/249
Iirc, the article only covers x264 (not FFmpeg).
./bmdcapture -C0 -m11 -V4 -v -F nut -f pipe:1 | ffmpeg -i - -vcodec libx264 -preset ultrafast -crf 22
Isn't this missing -probesize and -analyzeduration?
-pix_fmt yuv420p -tune zerolatency -threads 8 -keyint_min 5 -maxrate 800000 -bufsize 26666 -intra-refresh 1 -f mpegts udp://10.0.0.2:6666
(FFmpeg console output missing.)
ffmpeg -i udp://10.0.0.2:6666 -probesize 100 -analyzeduration 50 -f decklink -s 1920x1080 -fflags nobuffer -r 30000/1001 -g 10 -pix_fmt uyvy422 -an "DeckLink 4K Extreme"
Did you test where the latency comes from? How does bmdcapture | ffmpeg -i - -f xv / opengl / sdl work? What about ffmpeg -i rawfile -f decklink? Did you test a pipe between two ffmpeg processes on one computer? Any reason you don't set buffer_size (which is probably the reason - or one of the reasons - for your delay)? Carl Eugen
Try using iperf to check the throughput between 2 test machines. It will give good estimate of what throughput can be achieved over a network. Guessing by the throughput speed of 1 Mbps - was the test done over wifi ? On Fri, Mar 21, 2014 at 10:45 AM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Anusha Balan <Anusha.Balan <at> intusurg.com> writes:
I managed only about 1.5 - 2s which is extremely high for the interactive application for which I intend to use this.
From this article, it seems feasible that with a dedicated and powerful what I mentioned above is possible. (Given it was 2010, when it was written) http://x264dev.multimedia.cx/archives/249
Iirc, the article only covers x264 (not FFmpeg).
./bmdcapture -C0 -m11 -V4 -v -F nut -f pipe:1 | ffmpeg -i - -vcodec libx264 -preset ultrafast -crf 22
Isn't this missing -probesize and -analyzeduration?
-pix_fmt yuv420p -tune zerolatency -threads 8 -keyint_min 5 -maxrate 800000 -bufsize 26666 -intra-refresh 1 -f mpegts udp://10.0.0.2:6666
(FFmpeg console output missing.)
ffmpeg -i udp://10.0.0.2:6666 -probesize 100 -analyzeduration 50 -f decklink -s 1920x1080 -fflags nobuffer -r 30000/1001 -g 10 -pix_fmt uyvy422 -an "DeckLink 4K Extreme"
Did you test where the latency comes from? How does bmdcapture | ffmpeg -i - -f xv / opengl / sdl work? What about ffmpeg -i rawfile -f decklink? Did you test a pipe between two ffmpeg processes on one computer?
Any reason you don't set buffer_size (which is probably the reason - or one of the reasons - for your delay)?
Carl Eugen
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
-- regards, naveen
participants (3)
-
Anusha Balan -
Carl Eugen Hoyos -
Naveen