From 78a3f1270442dba32a43b946e81265055c4ebe38 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Thu, 9 May 2024 11:22:18 +0200 Subject: Add bitrate conversion --- ffmpeg.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ffmpeg.md b/ffmpeg.md index b87ab63..033c5e4 100644 --- a/ffmpeg.md +++ b/ffmpeg.md @@ -11,12 +11,19 @@ Works for audio, too. ffmpeg -i in.mp4 -codec:v copy -codec:a copy -ss START_TIME -t DURATION out.mp4 ffmpeg -ss START_TIME -t DURATION -i in.mp4 -codec:v copy -codec:a copy out.mp4 -## Resize +## Quality + +### Resize ffmpeg -i in.mp4 -s 720x480 out.mp4 # -1 means to automatically preserve aspect ratio ffmpeg -i in.mp4 -filter:v scale=720:-1 out.mp4 +### Bitrate + +* `-b:a 192k`: specify audio bitrate to 192 kbps +* `-b:v 2M`: specify video bitrate to 2 mbps + ## Audio/video delay ffmpeg -i "$input" -itsoffset -i "$input" -map 1:v -map 0:a -c:a copy -c:v libx264 "$output" -- cgit v1.2.3