Retrasa el audio durante unos segundos al inicio de los archivos de audio (usando ffmpeg)

I have been trying to get lots of wav files delayed by 2 seconds at the start using ffmpeg. And so far, even though I have read the manual, I was not able to get it working. Here is my command:

for %%A in (*.wav) do (
ffmpeg -i "%%A" -itsoffset 00:00:02 "%%~NA"1.wav )

And nothing is being changed. Files are simply getting copied. I also tried the same with mp3 files. I also tried mkv and avi (to make sure it was not a container writing issue), but it gives the same result also.

Command is same aquí y aquí, but it does not work. Please, help.

preguntado el 10 de marzo de 12 a las 02:03

3 Respuestas

You must put -itsoffset BEFORE you specify input. So:

ffmpeg -itsoffset 00:00:02 -i "%%A" "%%~NA"1.wav

Respondido 15 ago 12, 23:08

Changing the input time offset like that isn't going to do anything noticeable for a single stream, it's meant for fixing out-of-sync issues between audio and video streams.

Do you want to tack on two seconds of silence at the start? If so, one simple way that'd work (although it may feel a bit hackish) is to simply tack on a 2 second WAV full of silence, before the actual input. This would be accomplished by simply adding another -i option before the actual file:

ffmpeg -i 2secsilence.wav -i "%%A" "%%~NA"1.wav

respondido 10 mar '12, 02:03

I know this question is over 9 months old, but I came across it and wanted to add some more information about '-itsoffset'. From the ffmpeg trouble ticket pages (

This command should display file1 content one second earlier than file2 content:

ffmpeg -itsoffset -1 -i file1.ts -i file2.ts -vcodec copy -acodec copy -map 0:0 -map 1:1 out.ts

1) What I see is that -itsoffset adds or subtracts from all the timestamps (both the video and audio streams) in a file. So this option is only going to be useful when remuxing from separate input files.

2) outfile has expected playback behavior with .ts and .mkv containers.

3) It does not work with .avi (no timestamps, so not a surprise)

4) It does not work with .mp4 container (a bug?)

And that is where this issue stands as of today.

Respondido el 18 de diciembre de 12 a las 21:12

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.