[FFmpeg-user] Expected latency with RTSP/TCP H264 stream

Clément Péron peron.clem at gmail.com
Mon Nov 4 00:05:38 EET 2024


On Sun, 3 Nov 2024 at 21:32, Oliver Fromme <oliver at fromme.com> wrote:
>
> Clément Péron wrote:
>  > On Sun, 3 Nov 2024 at 14:32, Oliver Fromme <oliver at fromme.com> wrote:
>  > > Clément Péron wrote:
>  > > > [...]
>  > > > Adding the "-flags +low_delay" will give you
>  > > > muxer <- pts:47 pts_time:5.222222 dts:47 dts_time:5.222222 duration:1
>  > > > duration_time:0.111111 size:24883254 latency(total:104.805ms, decode
>  > > > 96.373ms/91%)
>  > >
>  > > You might also try "-tune zerolatency".
>  >
>  > [in#0/rtsp @ 0x556fb8629740] Codec AVOption tune (Set the encoding
>  > tuning info) is not a decoding option.
>  > Error opening input file rtsp://root:XXX@10.98.5.107:554/axis-media/media.amp.
>  >
>  > Seems this is only for the nvenc, but thanks for your suggestion
>
> Maybe I've been mistaken, but from you command line it appeared
> to me that you were using libx264 for encoding.  In that case,
> "-tune zerolatency" is a short-cut for several encoding options.
> Among other things, it disables B-frames and various other
> algorithms that require looking ahead at future frames, and it
> enables sliced threading (which is less efficient than the
> default of frame-based threading, but causes less delay).
>
> If you don't use libx264 for encoding, then ignore what I wrote.  :-)

Sorry my first message was imprecise, I got the H264 RTSP stream from a camera.
I'm only interested in decoding video, frame by frame, as quickly as possible.

My final result is a total E2E of 300-450ms where between 50-200ms are
from FFMpeg decoding.
Strange is that the Cuvid decoding has a high jitter from 40ms to 190ms.
Maybe I will investigate this part.

Regards,
Clement

>
> Best regards
>  -- Oliver
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list