Log in

View Full Version : Delay in Flac encoding


Atlantis
4th July 2022, 18:13
I have been spending several hours without success.

How to add delay in an ffmpeg flac encoding?

There is no video. So I want a "burned-in" delay. I have an ac3 file, using ffmpeg converting to flac I want a delay of -1000ms added to the flac output file in encoding phase. So later if I muxed it to a video, I don't need to add any delay to the muxer.

hello_hello
4th July 2022, 20:42
A -1000ms delay to all channels (or a 1000ms trim from the beginning).
Expressed as seconds so you'd specify either 1 or 1.000 or 1000ms.
-i input.ac3 -af atrim=start=1000ms -c:a flac output.flac

A +1000ms delay to all channels. Expressed as milliseconds.
-i input.ac3 -af adelay=delays=1000:all=1 -c:a flac output.flac

Atlantis
4th July 2022, 21:07
Thank you so much. Will try it later.

TruthOverFacts
7th July 2022, 03:02
A -1000ms delay to all channels (or a 1000ms trim from the beginning).
Expressed as seconds so you'd specify either 1 or 1.000 or 1000ms.
-i input.ac3 -af atrim=start=1000ms -c:a flac output.flac

A +1000ms delay to all channels. Expressed as milliseconds.
-i input.ac3 -af adelay=delays=1000:all=1 -c:a flac output.flac

Sent you a PM. Thanks!

Balling
30th September 2022, 23:41
ac3 has encoder delay too, 256 samples or more. Always. :)

tebasuna51
1st October 2022, 10:59
@Balling
Off topic answer, please read the question.

SeeMoreDigital
1st October 2022, 18:19
I often use an application called 'delaycut' (https://www.videohelp.com/software/delaycut). Which supports ac3, dts, mpa and (pcm in) wav files....