这是indexloc提供的服务,不要输入任何密码
Skip to content
Trix edited this page Jul 4, 2025 · 5 revisions

Welcome to the official AOMedia community wiki!

To view the aom codebase, you can go here

Disclaimer: This is a community driven wiki. This wiki may not represent the AOMedia Alliance.

Get the latest Windows release builds of libaom here: https://www.gyan.dev/ffmpeg/builds/#release-builds (Direct Link)

Table of Contents

  1. Running the encoder
  2. Sample command lines
  3. Common and important options
  4. How to make encoding faster

Running the encoder

This section describes how to run the encoder application aomenc from the command line, including descriptions of the most commonly used input parameters and outputs.

The sample application typically takes the following command line parameters:

Basic Usage: aomenc <options> -o dst_filename src_filename

src_filename is a Y4M file (e.g. 8 bit 4:2:0 planar) containing the video sequence that will be encoded.

The Y4M File can be obtained with e.g. ffmpeg (ffmpeg -i input.mp4 -r 24000/1000 -pix_fmt yuv420p output.y4m) Another option would be directly piping from ffmpeg to aomenc: ffmpeg -i "input.mkv" -pix_fmt yuv420p -f yuv4mpegpipe - | aomenc.exe -

-o dst_filename is the resulting video output of the encoder. The container is typically ivf. E.g. output.ivf

aomenc supports 8/10/12 bit 4:0:0/4:2:0/4:2:2/4:4:4 outputs. 4:2:0 10-bit should be preferred to make the best quality encodes that are supported by all AV1 hardware decoders.

Sample command lines

2-Pass VBR 10bit 23.976fps

1st Pass: aomenc.exe --passes=2 --pass=1 --width=1920 --height=1080 --bit-depth=10 --fps=24000/1001 --target-bitrate=250 --fpf=stats.log --output=NUL input.y4m

2nd Pass: aomenc.exe --passes=2 --pass=2 --width=1920 --height=1080 --bit-depth=10 --fps=24000/1001 --target-bitrate=250 --fpf=stats.log --output=out.ivf input.y4m

1-Pass Constant Quality 10bit 23.976fps

aomenc.exe --passes=1 --bit-depth=10 --fps=24000/1001 --end-usage=q --cq-level=20 --output=out.ivf input.y4m

Common and important options

Command Line Description
--help Show usage options and exit
--output=arg Output filename
--passes=arg Number of passes (1/2)
--pass=arg Pass to execute (1/2)
--fpf=arg First pass statistics file name
--width=arg Frame width
--height=arg Frame height
--fps=arg Stream frame rate (rate/scale) e.g. 24000/1001 = 23.976
--bit-depth=arg Bit depth (8, 10, 12)
--end-usage=arg Rate control mode (vbr, cbr, cq, q)
--target-bitrate=arg Bitrate (kbps)
--cq-level=arg Constant/Constrained Quality level
--cpu-used=arg CPU Used (0..6 in good mode, 5..12 in realtime mode, 0..9 in all intra mode) - Speed/Quality Setting - 0 = slowest - 12 = fastest
--tile-columns=arg Number of tile columns to use, log2
--tile-rows=arg Number of tile rows to use, log2

<options> All Encoder Options can be found with --help

How to make encoding faster

Due to the slow encoding, many people may ask themselves, how to improve the encoding time.

Here are some solutions to look into:

  1. --cpu-used=arg The cpu-used setting is a speed setting. By lowering the value, encoding will be slower and visual quality will increase at the same bitrate. Increasing the value improves performance, at the cost of quality at a given file size. Range: 0..6 in good mode, 5..12 in realtime mode, 0..9 in all intra mode. Recommended: 4 in good mode.
  2. --tile-columns=arg and --tile-rows=arg - these settings split each frame into columns and rows. Higher values may improve multi-threading capability and encoding speed, but the video quality decreases slightly and the resulting file size is slightly bigger. Tiles are mostly meant to improve decoding speeds.
  3. Instead of splitting the video-image into pieces, it's also possible to cut the video file into chunks, encode them parallel and concatenate them later. ffmpeg Concatenate. The resulting size may be a little bit bigger, due to the fact it may have a little overhead. Tools like NEAV1E or Av1an may also be viable options.
  4. Consider using the Scalable Video Technology for AV1 encoder (SVT-AV1), which possesses much better thread-ability out-of-the-box.
Clone this wiki locally