m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/ffmpeg.md
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.md')
-rw-r--r--ffmpeg.md9
1 files changed, 9 insertions, 0 deletions
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 <offset in seconds> -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