[FFmpeg-user] h265 output bigger than h264 input, how to level the both quality to make h265 smaller than h264

Ricardo Henrique ricardohenrique1 at outlook.com
Fri Jan 6 15:30:33 EET 2023


Hello FFMpeg team, well I'm using FFMpeg to change the encode from h264 to h265 and works fine for most of files, but some files has the output file (h265) bigger than input file (h264), what is the reason for this to happen? I know that there is a process to transcode h264 to raw (or close) then encode to h265 (right?), so I imagine that the h265 output in this case has a much higher visual quality (bitrate, ...) than the input h264 right? Is there a way to "level" the video quality of the h264 input file with the h265 output file so that the output file is not larger than the input file?

I'm using FFMpeg like that:

for %%a in (*.mkv, *.mp4) do (
    ffmpeg -i "%%a" -map 0 -c:a copy -c:s copy -c:v libx265 -vtag hvc1 -crf 18 -preset medium -tune animation "Out\%%~na.mkv"
)

Thanks!!


More information about the ffmpeg-user mailing list