Alex Balgavy

Just some stuff about me.

Here's my dotfiles repository.

Check out my blog.

My keys: PGP, SSH

My crypto wallets (BTC, XMR)


What links here:

Delay audio in ffmpeg

If you need to delay video by 3.84 seconds, use a command like this:

ffmpeg -i "movie.mp4" -itsoffset 3.84 -i "movie.mp4" -map 1:v -map 0:a -c copy "movie-video-delayed.mp4"

If you need to delay audio by 3.84 seconds, use a command like this:

ffmpeg -i "movie.mp4" -itsoffset 3.84 -i "movie.mp4" -map 0:v -map 1:a -c copy "movie-audio-delayed.mp4"

-itsoffset 3.84 -i "movie.mp4": Offsets timestamps of all streams by 3.84 seconds in the input file that follows the option (movie.mp4). itsoffset is documented in the Main options section

-map 1:v -map 0:a: Takes video stream from the second (delayed) input and audio stream from the first input - both inputs may of course be the same file. map is documented in the Advanced options section