[FFmpeg-user] Lipsync of a UDP stream

Jan Ceuleers jan.ceuleers at gmail.com
Mon Feb 20 20:15:19 EET 2023

Dear list,

New ffmpeg user.

I am currently using the following incantation to receive an H.264 stream:

ffmpeg -hide_banner -nostats -loglevel panic -async 1 -i
udp:// -vcodec copy -codec:a aac -b:a 128k -f mpegts

The media server ingesting the stream expects it on stdin, as you can see.

The trouble is that audio is about half a second late relative to video,
and I'd like to correct that on the way into the media server.

Guidance I've found to date on this subject involves feeding the input
into ffmpeg twice (i.e. by specifying -i twice with the same input
file). But that can't work with a stream, since the stream arrives only
once and can therefore also only be read once.

Any hints?

Many thanks, Jan

More information about the ffmpeg-user mailing list