Created
February 6, 2018 17:32
-
-
Save goyuix/3f31b2fd4dfd87d49d2bfd79323146d0 to your computer and use it in GitHub Desktop.
Sample ffmpeg encode for x265 HEVC web-optimized MP4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mkv -movflags faststart -c:v libx265 -crf 25 -c:a aac -b:a 128k output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.mkv
as the output file-extension. It is optimized for h.265 encoding. Plus, themkv
container already has the ATOM at the start of the file https://trac.ffmpeg.org/wiki/Encode/YouTube#faststartforMP4M4VMOVfiles. YouTube supports upload of.mkv
-files.-moveflags "+faststart"
. The"
-wrapping is for Windows' users.preset
. The quality stays the same, it only matters in the file-size. I use-preset ultrafast
to be just done with it, but alternatively you may also use-preset veryslow
(will took much longer but the file-size will be smaller).https://trac.ffmpeg.org/wiki/Encode/H.265 vs. https://trac.ffmpeg.org/wiki/Encode/H.264