m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2024-05-09 11:22:18 +0200
committerMarcin Chrzanowski <m@m-chrzan.xyz>2024-05-09 11:22:18 +0200
commit78a3f1270442dba32a43b946e81265055c4ebe38 (patch)
tree60decadd9a63a80e369d9212541fea057a01f8bc
parent87537ebeadb20139831a3b94a0869290dfc4a087 (diff)
Add bitrate conversion
-rw-r--r--ffmpeg.md9
1 files changed, 8 insertions, 1 deletions
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 <offset in seconds> -i "$input" -map 1:v -map 0:a -c:a copy -c:v libx264 "$output"