Changes between Version 5 and Version 6 of Encode/AV1
- Timestamp:
- Jun 4, 2018, 6:54:29 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Encode/AV1
v5 v6 1 = FFmpeg and libaom AV1 Encoding Guide = 1 {{{ 2 #!html 3 <h1 style="font-size: 22px;"> 4 libaom AV1 Encoding Guide 5 </h1> 6 }}} 2 7 3 [[PageOutline (2, Contents)]]8 [[PageOutline]] 4 9 5 10 `libaom-av1` is the AOMedia video encoder for [https://en.wikipedia.org/wiki/AV1 AV1], an open source & royalty-free video codec. `libaom-av1` can save about 30% bitrate compared to VP9 and H.265 / HEVC, and about 50% over H.264, while retaining the same visual quality. … … 7 12 To install FFmpeg with support for `libaom-av1`, look at the [https://ffmpeg.org/trac/ffmpeg/wiki/CompilationGuide Compilation Guides] and compile FFmpeg with the {{{--enable-libaom}}} option. 8 13 9 libaom offers the following rate-control modes ,which determine the quality and file size obtained:14 libaom offers the following rate-control modes which determine the quality and file size obtained: 10 15 16 - Constant quality 17 - 2-pass average bitrate 11 18 - 1-pass average bitrate 12 - 2-pass average bitrate13 - Constant quality14 19 15 20 For a list of options, run `ffmpeg -h encoder=libaom-av1`. … … 17 22 {{{ 18 23 #!div style="border: 1px solid #e5e5c7; margin: 1em; background-color: #ffd;" 19 '''Note:''' AV1 encoding is very slow in comparison to VP9 or H.264, and considered experimental at this stage (hence the use of `-strict -2` is necessary).24 '''Note:''' AV1 encoding is very slow in comparison to VP9 or H.264, and considered experimental at this stage. Hence the use of `-strict experimental` (or the alias `-strict -2`) is necessary. 20 25 }}} 21 26 22 = == Average Bitrate (ABR) ===#averageb27 = Constant Quality = 23 28 24 libaom-av1 offers a simple "Average Bitrate" or "Target Bitrate" mode. In this mode, it will simply try to reach the specified bit rate on average, e.g. 2 MBit/s.29 In addition to the default VBR mode, there's a constant quality (CQ) mode (like CRF in x264 and x265) which will ensure that every frame gets the number of bits it deserves to achieve a certain (perceptual) quality level, rather than encoding each frame to meet a bit rate target. This results in better overall quality. If there isn't a fixed target file size, this should be your method of choice. 25 30 26 31 {{{ 27 ffmpeg -i input.mp4 -c:v libaom-av1 - b:v 2M -strict -2 output.mkv32 ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -strict experimental av1_test.mkv 28 33 }}} 29 34 30 Use this option if file size and encoding time are more important. 35 The CRF value can be from 0–63. Lower values mean better quality and greater file size. 31 36 32 = == Two-Pass ===#twopass37 = Two-Pass = 33 38 34 In order to create more efficient encodes when a particular target bitrate should be reached ,you should choose two-pass encoding. For two-pass, you need to run `ffmpeg` twice, with almost the same settings, except for:39 In order to create more efficient encodes when a particular target bitrate should be reached you should choose two-pass encoding. For two-pass, you need to run `ffmpeg` twice, with almost the same settings, except for: 35 40 36 41 * In pass 1 and 2, use the `-pass 1` and `-pass 2` options, respectively. … … 38 43 * In pass 1, you need to specify an output format (with `-f`) that matches the output format you will use in pass 2. 39 44 * In pass 1, specify the audio codec used in pass 2; in many cases, `-an` in pass 1 will not work. 45 46 {{{#!comment 47 > In pass 1, specify the audio codec used in pass 2; in many cases, `-an` in pass 1 will not work. 48 Which cases? 49 }}} 40 50 41 51 {{{ … … 49 59 }}} 50 60 51 = == Constant Quality ===#constantq61 = Average Bitrate (ABR) = 52 62 53 In addition to the "default" VBR mode, there's a constant quality (CQ) mode (like CRF in x264 and x265) which will ensure that every frame gets the number of bits it deserves to achieve a certain (perceptual) quality level, rather than encoding each frame to meet a bit rate target. This results in better overall quality. If there isn't a fixed target file size, this should be your method of choice.63 libaom-av1 offers a simple "Average Bitrate" or "Target Bitrate" mode. In this mode, it will simply try to reach the specified bit rate on average, e.g. 2 MBit/s. 54 64 55 65 {{{ 56 ffmpeg -i input.mp4 -c:v libaom-av1 - crf 30 -strict -2 av1_test.mkv66 ffmpeg -i input.mp4 -c:v libaom-av1 -b:v 2M -strict experimental output.mkv 57 67 }}} 58 68 59 The CRF value can be from 0–63. Lower values mean better quality and greater file size. 69 Use this option only if file size '''and''' encoding time are more important factors than quality alone. Otherwise, use one of the other rate control methods described above. 60 70 61 = == Controlling Speed / Quality ===71 = Controlling Speed / Quality = 62 72 63 73 `-cpu-used` sets how efficient the compression will be. Default is 1. Lower values mean slower encoding with better quality, and vice-versa. 64 74 65 = == More Info ===75 = More Info = 66 76 67 77 More info about AV1 can be found here:
