Changes between Version 5 and Version 6 of Encode/AV1


Ignore:
Timestamp:
Jun 4, 2018, 9:54:29 PM (4 months ago)
Author:
llogan
Comment:

fixed toc, used human readable -strict value, removed anchors as they are automatically created, re-order rate control methods from most to least useful.

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;"> 
     4libaom AV1 Encoding Guide 
     5</h1> 
     6}}} 
    27 
    3 [[PageOutline(2, Contents)]] 
     8[[PageOutline]] 
    49 
    510`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. 
     
    712To 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. 
    813 
    9 libaom offers the following rate-control modes, which determine the quality and file size obtained: 
     14libaom offers the following rate-control modes which determine the quality and file size obtained: 
    1015 
     16- Constant quality 
     17- 2-pass average bitrate 
    1118- 1-pass average bitrate 
    12 - 2-pass average bitrate 
    13 - Constant quality 
    1419 
    1520For a list of options, run `ffmpeg -h encoder=libaom-av1`. 
     
    1722{{{ 
    1823#!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. 
    2025}}} 
    2126 
    22 === Average Bitrate (ABR) ===#averageb 
     27= Constant Quality = 
    2328 
    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. 
     29In 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. 
    2530 
    2631{{{ 
    27 ffmpeg -i input.mp4 -c:v libaom-av1 -b:v 2M -strict -2 output.mkv 
     32ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -strict experimental av1_test.mkv 
    2833}}} 
    2934 
    30 Use this option if file size and encoding time are more important. 
     35The CRF value can be from 0–63. Lower values mean better quality and greater file size.  
    3136 
    32 === Two-Pass ===#twopass 
     37= Two-Pass = 
    3338 
    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: 
     39In 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: 
    3540 
    3641* In pass 1 and 2, use the `-pass 1` and `-pass 2` options, respectively. 
     
    3843* In pass 1, you need to specify an output format (with `-f`) that matches the output format you will use in pass 2. 
    3944* 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. 
     48Which cases? 
     49}}} 
    4050 
    4151{{{ 
     
    4959}}} 
    5060 
    51 === Constant Quality ===#constantq 
     61= Average Bitrate (ABR) = 
    5262 
    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. 
     63libaom-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. 
    5464 
    5565{{{ 
    56 ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -strict -2 av1_test.mkv 
     66ffmpeg -i input.mp4 -c:v libaom-av1 -b:v 2M -strict experimental output.mkv 
    5767}}} 
    5868 
    59 The CRF value can be from 0–63. Lower values mean better quality and greater file size.  
     69Use 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. 
    6070 
    61 === Controlling Speed / Quality === 
     71= Controlling Speed / Quality = 
    6272 
    6373`-cpu-used` sets how efficient the compression will be. Default is 1. Lower values mean slower encoding with better quality, and vice-versa. 
    6474 
    65 === More Info === 
     75= More Info = 
    6676 
    6777More info about AV1 can be found here: