| 115 | | [https://developer.apple.com/documentation/videotoolbox VideoToolbox], only supported on macOS. |
| 116 | | |
| 117 | | H.263, H.264, HEVC, MPEG1, MPEG2, MPEG4, ProRes decoding is available in FFmpeg/libavcodec. |
| 118 | | |
| 119 | | H.264, HEVC, ProRes encoding is available in FFmpeg/libavcodec. |
| 120 | | |
| 121 | | To use H.264/HEVC hardware encoding in macOS, just use the encoder `-c:v h264_videotoolbox` or `-c:v hevc_videotoolbox` for H.264 or HEVC respectively. Check `ffmpeg -h encoder=...` to see encoder options. It's worth noting that !VideoToolbox does not support constant quality (CRF) encoding. Bit rate, `-b:v ...`, is your main lever to balance size vs quality. |
| 122 | | |
| | 115 | [https://developer.apple.com/documentation/videotoolbox VideoToolbox] is the macOS framework for video decoding and encoding. |
| | 116 | |
| | 117 | The following codecs are supported: |
| | 118 | |
| | 119 | * Decoding: H.263, H.264, HEVC, MPEG-1, MPEG-2, MPEG-4 Part 2, ProRes |
| | 120 | * Encoding: H.264, HEVC, ProRes |
| | 121 | |
| | 122 | To use H.264/HEVC hardware encoding in macOS, just use the encoder `-c:v h264_videotoolbox` or `-c:v hevc_videotoolbox` for H.264 or HEVC respectively. |
| | 123 | |
| | 124 | Check `ffmpeg -h encoder=...` to see encoder options. |
| | 125 | |
| | 126 | VideoToolbox supports two types of rate control: |
| | 127 | |
| | 128 | * Bitrate-based using `-b:v` |
| | 129 | * Constant quality with `-q:v`. Note that the scale is 1-100, with 1 being the lowest and 100 the highest. Constant quality mode is only available for Apple Silicon and from ffmpeg 4.4 and higher. |