What are the advantages of H.265 encoding over H.264?
H.265, also known as High Efficiency Video Coding (HEVC), is an advanced video compression standard that offers several advantages over its predecessor H.264 (AVC). It provides improved compression efficiency and video quality, enabling smaller file sizes and better playback performance over limited bandwith connections, particularly for high-resolution and HDR video content.

In detail:

1.) Higher compression efficiency: H.265 can compress video files to half the size of H.264 while maintaining the same video quality, allowing for smaller file sizes and lower bandwidth usage. The biggest contributing factors for the higher compression efficiency is the use of coding tree units instead of macroblocks and improved motion compensation and spatial prediction.

2.) Improved image quality: H.265 uses advanced compression techniques that result in improved image quality while producing smaller file sizes, particularly for high-resolution and high-dynamic-range (HDR) video content.

3.) Improved support for 4K and 8K video: H.265 is better suited to handle the high-resolution requirements of 4K and 8K video, making it a popular choice for video content in these formats.

One disadvantage of H.256 is the higher computational demand.
How can I compress my H.264 video to H.265 using ffmpeg?
Can you recommend some options that I should set to reduce the file size?