Decklink output latency, high

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Decklink output latency, high

Martin-2
Hi!

Anybody have an idea why I get a couple of seconds of latency when
outputting to a decklink device? I

ffmpeg -fflags nobuffer -i srt://x   -f decklink -pix_fmt uyvy422 -c:a
pcm_s16le -ar 48000 -ac 2  "UltraStudio SDI"

Input is a TS stream SRT or UDP, input type does not r matter. Im getting
almost 4 seconds of delay on the SDI output compared to the stream. Seems a
bit high? One would expect a couple of frames. I have seen this question on
a few places but never seen an answer or solution.

Decklink driver 10.11.4, Windows

I only see this behaviour in ffmpeg not in other programs that uses
decklink output, Premiere, OBS etc.

Regards Martain
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Decklink output latency, high

Marton Balint


On Sat, 9 May 2020, Martin wrote:

> Hi!
>
> Anybody have an idea why I get a couple of seconds of latency when
> outputting to a decklink device? I
>
> ffmpeg -fflags nobuffer -i srt://x   -f decklink -pix_fmt uyvy422 -c:a
> pcm_s16le -ar 48000 -ac 2  "UltraStudio SDI"
>
> Input is a TS stream SRT or UDP, input type does not r matter. Im getting
> almost 4 seconds of delay on the SDI output compared to the stream. Seems a
> bit high? One would expect a couple of frames. I have seen this question on
> a few places but never seen an answer or solution.
>
> Decklink driver 10.11.4, Windows
>
> I only see this behaviour in ffmpeg not in other programs that uses
> decklink output, Premiere, OBS etc.

Latency comes from multiple sources:

1) The most significant is probably input probing. You can limit this with
-probesize and -analyzeduration.

2) decklink preroll - you can set this with -preroll, but a very low value
will cause choppy output.

3) other buffering - I am sure there are other places :)

By setting 1) and 2) you can probably can reduce the latency, but I'd
think it will still be higher than special purpose software.

Regards,
Marton
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Decklink output latency, high

Carl Zwanzig
On 5/9/2020 12:21 PM, Marton Balint wrote:
> 1) The most significant is probably input probing.

I suspect the decklink part is a red herring, playback from a file to the
decklink shoudl have almost no latency, certainly not 3+ seconds (doing a
gdi screen capture to decklink is under 1 second latency).

How long does it take for the stream to start playing with any other tool?
Is the delay comparable?

It would be helpful if you posted the complete command output. (Linux or
windows?)

z!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Decklink output latency, high

Martin-2
Hi!

Reducing the probesize removed basically all the delay, did not now that
the probesize had that impact. Big thank you for the tip!

 With the default probesize you could see a freeze frame of the first
decoded frame for a couple of secs, if I lower teh size it will start
decoding instantly. I compared to OBS SRT input and I'm now able to go
lower then the default input. Setting the probesize to low causes the SRT
input to trigger error/warning unable to store incoming packets so got to
try to find the best option for the probesizde for my needs without
triggering any errors. Latency is well within in my needs now.

The output is bursting a warning  from the SRT library in my compile, so
its a bit hard to get anything from the output, maybe a bit
uniniteresting now that I was presented with a working solution.

To sum things up, reducing the probesize removes the long delay I was
experiencing from the input stream on the decklink output.

Thanks again!

Regards Martin


Den lör 9 maj 2020 kl 21:33 skrev Carl Zwanzig <[hidden email]>:

> On 5/9/2020 12:21 PM, Marton Balint wrote:
> > 1) The most significant is probably input probing.
>
> I suspect the decklink part is a red herring, playback from a file to the
> decklink shoudl have almost no latency, certainly not 3+ seconds (doing a
> gdi screen capture to decklink is under 1 second latency).
>
> How long does it take for the stream to start playing with any other tool?
> Is the delay comparable?
>
> It would be helpful if you posted the complete command output. (Linux or
> windows?)
>
> z!
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".