m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/ffmpeg.md
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2024-07-10 03:11:59 +0200
committerMarcin Chrzanowski <m@m-chrzan.xyz>2024-07-10 03:11:59 +0200
commit74392a4a5eb41037f1cbcf0fdaa318f69d796895 (patch)
tree2976eb43fe52bef61a65a29d879d2f36613e93c8 /ffmpeg.md
parent551856d84eb9ae51ff1bdd3fff317f29eced2a18 (diff)
Add video compression with H.265
Diffstat (limited to 'ffmpeg.md')
-rw-r--r--ffmpeg.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/ffmpeg.md b/ffmpeg.md
index 033c5e4..764c89e 100644
--- a/ffmpeg.md
+++ b/ffmpeg.md
@@ -24,6 +24,14 @@ Works for audio, too.
* `-b:a 192k`: specify audio bitrate to 192 kbps
* `-b:v 2M`: specify video bitrate to 2 mbps
+### Encoding
+
+H.265 is one of the top recommended formats, for size:quality ratio.
+
+ ffmpeg -i in.mp4 -vcodec libx265 -crf <value> out.mp4
+
+Reasonable `crf` values could be 24 to 30.
+
## 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"