- Posts: 7
- Joined: Mon Feb 10, 2020 10:28 am
- Real Name: Lukasz Lazarecki
I'm observing about 0.7 sec. latency when capturing video from one of Duo's inputs and simultaneously outputting it to one of its outputs, like so:
Reading from input:
Writing to output:
With the above latency is about ~0.7 sec. However, if I change output to sdl local preview, like so:
Latency drops to ~0.2 sec. (which is still very high, but for some reason not as high as when outputting to the card).
I really have no idea what is going on. I was expecting 2-3 frames of latency at most, but what I'm getting is insane. Is there anything wrong with how ffmpeg is launched (params missing?)?
A few words of explanation:
- I'm streaming through pipe, because there's (obviously) another app between input and output doing the processing, however it does not create any additional latency and numbers stay the same with the app in between or without it
- video filters used do not introduce any additional latency, I tested with and without them
Reading from input:
- Code: Select all
ffmpeg -y -f decklink -i "DeckLink Duo (1)" -vf "yadif=deint=interlaced, scale=1920:1080, fps=fps=30" -vcodec rawvideo -pix_fmt bgr24 -f nut /tmp/test_pipe
Writing to output:
- Code: Select all
ffmpeg -v debug -f nut -i /tmp/test_pipe -vf "scale=1280:720, fps=fps=60" -preroll 2/60 -pix_fmt uyvy422 -an -f decklink "DeckLink Duo (3)
With the above latency is about ~0.7 sec. However, if I change output to sdl local preview, like so:
- Code: Select all
ffmpeg -f nut -i /tmp/test_pipe -vf "scale=1280:720, fps=fps=60" -an -vcodec rawvideo -preroll 2/60 -pix_fmt yuv420p -f sdl Preview
Latency drops to ~0.2 sec. (which is still very high, but for some reason not as high as when outputting to the card).
I really have no idea what is going on. I was expecting 2-3 frames of latency at most, but what I'm getting is insane. Is there anything wrong with how ffmpeg is launched (params missing?)?
A few words of explanation:
- I'm streaming through pipe, because there's (obviously) another app between input and output doing the processing, however it does not create any additional latency and numbers stay the same with the app in between or without it
- video filters used do not introduce any additional latency, I tested with and without them