| 5 | | H.265 (also known as HEVC) offers 50-75% compression efficiency compared to an H.264 video, while retaining the same quality. Similar to x264, the x265 encoder has multiple rate control algorithms, including: |
| | 5 | == Getting ffmpeg with libx265 support == |
| | 6 | |
| | 7 | In order to obtain a copy of ffmpeg with libx265 support, you need to build it yourself, adding the `--enable-libx265` configuration flag, with `x265` being installed on your system. |
| | 8 | |
| | 9 | You can also [http://ffmpeg.org/download.html download a static build], all of which bundle libx265. |
| | 10 | |
| | 11 | == Encoding == |
| | 12 | |
| | 13 | Similar to x264, the x265 encoder has multiple rate control algorithms, including: |
| 15 | | In this example, we will use the default CRF of 28, the "medium" profile, and AAC audio at 128 kBit/s. The CRF of 28 should visually correspond to libx264 video at CRF 23, but result in about half the file size. The profile determines how fast the encoding process will be – at the expense of compression efficiency. |
| | 23 | Use this mode if you want to retain good visual quality and don't care about the exact bitrate or filesize. The mode works exactly the same as in x264, so please read the [[H.264]] guide for more info. |
| | 24 | |
| | 25 | In this example, we will use the following settings: |
| | 26 | * default CRF of 28. The CRF of 28 should visually correspond to libx264 video at CRF 23, but result in about half the file size. |
| | 27 | * `medium` preset. The preset determines how fast the encoding process will be – at the expense of compression efficiency. Put differently, if you choose `ultrafast`, the encode is going to run fast, but the file size will be larger when compared to `medium`. Valid presets are `ultrafast`, `superfast`, `veryfast`, `faster`, `fast`, `medium`, `slow`, `slower`, `veryslow` and `placebo`. |
| | 28 | * AAC audio at 128 kBit/s. This uses the ffmpeg-internal encoder, but under [[AAC]] you will find info about more options. |