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

Oliver Fromme oliver at fromme.com
Sun Nov 3 22:31:59 EET 2024


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.  :-)

Best regards
 -- Oliver


More information about the ffmpeg-user mailing list