4

Recently I re-encoded a H264 video to HEVC using FFmpeg and Intel hevc_qsv hardware acceleration and libx265. hevc_qsv results in higher sized video and libx265 results in 50% lower sized video.

I Googled h265 vs HEVC it says they are same. If they are same why so much difference in the results?

These are the command lines I used:

ffmpeg -i "%%a" -c:v libx265 -vtag hvc1 "newfiles\%%~na.mp4

ffmpeg -i "%%a" -c:v hevc_qsv -vtag hvc1 "newfiles\%%~na.mp4
2
  • Related: Why does preset "veryfast" in FFmpeg generate the most compressed file compared to all other presets? for more detail about the 3-way tradeoff between quality, bitrate, and encode speed that lossy formats like HEVC entail. Use libx265 with -preset slow for even more quality per bitrate, and/or -crf 22 or whatever to spend more bits to increase the target quality-factor. (Lower CRF numbers = less distortion = higher quality.) FFmpeg's wiki covers this: trac.ffmpeg.org/wiki/Encode/H.265 Mar 20, 2021 at 18:50
  • This is even more simpler to explain via JPEG: JPEG is a format and a standard but the how of why one JPEG image compressor will provide better results than another is up to the programming team creating the compression tool. Think of it like this: If a few different people use the same recipe to make a cake, why might each one be slightly different? Might relate to the quality of ingredients used and tools available. Ditto with cars: All cars have four wheels and an engine… So they are all cars… But some cars perform better than other cars. Simple as that. Feb 28, 2022 at 0:21

1 Answer 1

10

Are HEVC and H265 same?

Yes. They are two names for the same video format.

In ffmpeg they give different results why?

  • libx265 and hevc_qsv are two different encoders that both output the H.265/HEVC video format.
  • Just because they output the same format does not mean that the outputs will be identical.
  • libx265 is slow, but it can make a small file size and high quality.
  • hevc_qsv is less efficient than libx265, so it will never look as good as libx265 if you use the same bitrate. But it can use hardware acceleration to help encode and may be a better choice in some situations, such as if you need to reserve your CPU for some other tasks.

You must log in to answer this question.