
It does not automatically fit the complete video to fit a specified size. fs is supposed to stop encoding when the output reaches a certain size. If you need to target a specific output file size Libx265 also uses -crf and -preset, but the -crf values are somewhat different.Įxample: ffmpeg -ss 823.2 -t 44.1 -i input.mp4 -ss 1074.1 -t 27.3 -i input.mp4 -filter_complex "concat=n=2:v=1:a=1" -map "" -map "" -c:v libx265 -crf 35 -preset slow output.mp4 This format may not be supported by your player/device. It is a slower encoder but will usually output a smaller file size for the same quality.

Default is medium.Įxample: ffmpeg -ss 823.2 -t 44.1 -i input.mp4 -ss 1074.1 -t 27.3 -i input.mp4 -filter_complex "concat=n=2:v=1:a=1" -map "" -map "" -c:v libx264 -crf 29 -preset slower output.mp4Īdd -c:v libx265 to output HEVC/H.265 video instead of H.264. A slower preset: enables more fancy and complicated compression features, takes longer to encode, and usually provides a smaller file size. Use -preset to control compression efficiency and therefore encoding speed. The output file size cannot be predicted using -crf.


Increasing the CRF value by +6 will result in about 50% smaller output size (such as -crf 23 vs -crf 29, not comparing input vs output sizes). Use the highest value that still provides an acceptable quality. A higher value is a lower quality and therefore a lower file size. Default encoder is libx264 (most builds of ffmpeg have -enable-libx264 so I'll assume yours does too).Ĭontrol quality with -crf.
