After 5 years of work and over 2700 commits against the reference software, the Alliance for Open Media (AOMedia) has recently released the AV2 specification. This next-generation open video codec provides up to 40% bandwidth reduction over AV1 at equivalent quality.
The document entitled “AV2 Bitstream & Decoding Process Specification” specifies the Alliance for Open Media Video 2 (AV2) bitstream syntax, semantics, parsing process, and decoding process.
AV2 builds upon the foundation of AV1 and has been engineered to provide higher compression efficiency and high-quality video delivery at lower bitrates. The Alliance for Open Media also highlights that it provides better “support for AR/VR applications, split-screen delivery of multiple programs, improved handling of screen content, and an ability to operate over a wider visual quality range”.
The AOMedia Video Model (AVM) serves as the official reference software, and tools and source code can be found on GitLab. Note that reference software is usually provided to showcase an implementation that works and is optimized for performance. So we’d have to wait for projects like Dav1d (or will it be Dav2d?) to get an optimized AV2 decoder and encoder with SIMD and assembler.
I still tried to build it on an Ubuntu 24.04 laptop:
|
1 2 3 4 5 6 |
sudo apt install build-essential cmake git nasm # other dependencies may be needed git clone https://gitlab.com/AOMediaCodec/avm.git mkdir avm_build cd avm_build cmake ../avm make -j 16 |
And it could compile just fine:
|
1 2 3 4 5 6 7 8 9 10 11 12 |
[100%] Built target test_avm_encoder [100%] Built target test_avm_common [100%] Building CXX object CMakeFiles/test_libavm.dir/test/av2_quantize_test.cc.o [100%] Building CXX object CMakeFiles/test_libavm.dir/test/test_libavm.cc.o [100%] Building CXX object CMakeFiles/test_libavm.dir/test/simd_cmp_sse4.cc.o [100%] Building C object CMakeFiles/test_libavm.dir/gen_src/usage_exit.c.o [100%] Building CXX object CMakeFiles/test_libavm.dir/test/simd_cmp_sse2.cc.o [100%] Building CXX object CMakeFiles/test_libavm.dir/test/simd_cmp_ssse3.cc.o [100%] Building CXX object CMakeFiles/test_libavm.dir/test/corner_match_test.cc.o [100%] Building CXX object CMakeFiles/test_libavm.dir/test/simd_cmp_avx2.cc.o [100%] Linking CXX executable test_libavm [100%] Built target test_libavm |
At this point, we can download test data:
|
1 |
make -j16 testdata |
If you want to run unit tests, you can do so with
|
1 |
./test_liabavm |
But instead, let’s go inside the example directory to try the simple encoder and simpler decoder demos:
|
1 2 3 4 5 6 7 8 9 10 11 12 |
cd examples jaufranc@CNX-LAPTOP-5:~/edev/avm_build/examples$ ls -lh ../*.yuv -rw-rw-r-- 1 jaufranc jaufranc 3.8M Feb 3 11:10 ../Debugging_480x270p3000_yuv420p_20frames.yuv -rw-rw-r-- 1 jaufranc jaufranc 65M Feb 3 11:11 ../desktop1.320_180.yuv -rw-rw-r-- 1 jaufranc jaufranc 53M Feb 3 11:10 ../hantro_collage_w352h288.yuv -rw-rw-r-- 1 jaufranc jaufranc 16M Feb 3 11:10 ../hantro_odd.yuv -rw-rw-r-- 1 jaufranc jaufranc 207M Feb 3 11:10 ../niklas_640_480_30.yuv -rw-rw-r-- 1 jaufranc jaufranc 35M Feb 3 11:10 ../pixel_capture_w320h240.yuv -rw-rw-r-- 1 jaufranc jaufranc 150M Feb 3 11:10 ../vase10x10.yuv jaufranc@CNX-LAPTOP-5:~/edev/avm_build/examples$ time ./simple_encoder av2 320 180 ../desktop1.320_180.yuv desktop.ivf 30 0 30 Using AOMedia Project AV2 Encoder 13.0.0-107-gb946aba9ff .................. |
I encoded 30 frames of a 320×180 YUV file into AV2. It took over 18 minutes, or a little over 31 seconds per frame.
|
1 2 3 4 5 6 7 8 9 10 |
jaufranc@CNX-LAPTOP-5:~/edev/avm_build/examples$ ./simple_encoder av2 640 480 ../desktop 30 0 60 desktop1.320_180.yuv desktop_credits.y4m jaufranc@CNX-LAPTOP-5:~/edev/avm_build/examples$ time ./simple_encoder av2 320 180 ../desktop1.320_180.yuv desktop.ivf 30 0 30 Using AOMedia Project AV2 Encoder 13.0.0-107-gb946aba9ff .............................. Processed 30 frames. real 18m37.570s user 18m36.546s sys 0m0.461s |
Parameters as follows:
|
1 |
./simple_encoder <codec> <width> <height> <infile> <outfile> <keyframe-interval> <error resilient> <frames to encode> |
Mediainfo can still parse the file, as it probably follows the exact same IVF container format as AV1, except for the AV02 Codec ID:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
jaufranc@CNX-LAPTOP-5:~/edev/avm_build/examples$ mediainfo desktop.ivf General Complete name : desktop.ivf Format : IVF File size : 25.6 KiB Duration : 1 s 0 ms Overall bit rate : 210 kb/s Frame rate : 30.000 FPS Video Format : AV02 Codec ID : AV02 Duration : 1 s 0 ms Bit rate : 206 kb/s Width : 320 pixels Height : 180 pixels Display aspect ratio : 16:9 Frame rate : 30.000 FPS Bits/(Pixel*Frame) : 0.119 Stream size : 25.2 KiB (99%) |
Decoding with the simple decoder did not work:
|
1 2 3 4 5 6 7 |
jaufranc@CNX-LAPTOP-5:~/edev/avm_build/examples$ time ./simple_decoder desktop.ivf desktop-320x180.yuv Using AOMedia Project AV2 Decoder 13.0.0-107-gb946aba9ff Failed to decode frame.: Invalid parameter real 0m0.159s user 0m0.025s sys 0m0.134s |
It’s either a bug or I used some incorrect parameters while encoding.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress. We also use affiliate links in articles to earn commissions if you make a purchase after clicking on those links.




