diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2024-05-09 11:22:18 +0200 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2024-05-09 11:22:18 +0200 |
commit | 78a3f1270442dba32a43b946e81265055c4ebe38 (patch) | |
tree | 60decadd9a63a80e369d9212541fea057a01f8bc | |
parent | 87537ebeadb20139831a3b94a0869290dfc4a087 (diff) |
Add bitrate conversion
-rw-r--r-- | ffmpeg.md | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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" |