From 495acba73ad4e8d4e41f870cdba21158b210bae0 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 7 May 2023 00:46:19 +0200 Subject: Add ffmpeg A/V delay --- ffmpeg.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ffmpeg.md b/ffmpeg.md index 2d33ae4..b53621d 100644 --- a/ffmpeg.md +++ b/ffmpeg.md @@ -17,6 +17,15 @@ Works for audio, too. # -1 means to automatically preserve aspect ratio ffmpeg -i in.mp4 -filter:v scale=720:-1 out.mp4 +## Audio/video delay + + ffmpeg -i "$input" -itsoffset -i "$input" -map 1:v -map 0:a -c:a copy -c:v libx264 "$output" + +For reverse offset, swap 1 and 0. + +Basically, take the input once with an offset, once without. Take the audio from +one of them, video from the other. + ## Rotate # 90 degrees clockwise -- cgit v1.2.3