uavs3e
uavs3e is an open-source encoder for the AVS3 codec, developed by Chinese research institutions including Peking University Shenzhen Graduate School, Peng Cheng Laboratory, and Guangdong Bohua UHD Innovation Corporation.
The encoder receives infrequent updates, which may result in bugs and compilation issues. It supports AMD64 with AVX2, ARM with NEON, and LoongArch CPUs.
Installationâ
- Linux & macOS
- Windows
The developers do not provide pre-built binaries, so you'll need to compile it yourself. Compilation requires GNU Make and CMake. As of August 2024, uavs3e
does not compile with GCC 14, using Clang 18 instead resolves this issue.
git clone https://github.com/uavs3/uavs3e.git
cd uavs3e
mkdir build/linux && cd build/linux
cmake ../.. -DCOMPILE_10BIT=0 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
make -j 8
If you encounter undefined calls to close
or lseek64
functions, add the following two lines at the top of the test/utest.c
file:
#define _LARGEFILE64_SOURCE
#include <unistd.h>
Binaries will be available in the build/linux
folder. On Linux, you can run make install
to install the encoder (may require elevated permissions).
- Ensure you have the following prerequisites installed before starting the build process:
- Microsoft C++ Build Tools: Select "Desktop development with C++".
- Git
-
Open Developer PowerShell for VS 2022.
-
Run the following commands:
git clone https://github.com/uavs3/uavs3e.git
cd uavs3e
.\version.bat
cd build\x86_windows
devenv uavs3e.sln /Upgrade
msbuild uavs3e.sln /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0
Binaries will be available in the bin
folder.
10-bit Supportâ
- Linux & macOS
- Windows
To enable 10-bit support, set -DCOMPILE_10BIT=1
in the CMake command. However, the encoder compiled with this flag has been reported to cause segmentation faults on some systems.
To enable 10-bit support, change the line #define COMPILE_10BIT 0
to #define COMPILE_10BIT 1
in the inc/com_api.h
file.
Usageâ
The encoder cannot parse .y4m
files, they need to be converted to raw video (.yuv
) format.
uavs3enc -i input.yuv -w 1920 -h 1080 -d 8 --fps_num 24000 --fps_den 1001 -q 20 -o output.avs3
uavs3enc -i input.yuv -w 1920 -h 1080 -d 8 --fps_num 24000 --fps_den 1001 -p 120 --wpp_threads 8 --frm_threads 8 --speed_level 2 --rc_type 1 -q 20 -o output.avs3
Currently, uavs3e does not support piping.
Notesâ
- Usable speed presets range from 0 to 4, where 0 is the slowest and 4 is the fastest.
- The encoder can be quite competitive, even compared with the newest AV1 and VVC encoders in terms of visual fidelity.
uavs3d
can be used to decode the output bitstream. For real-time playback, you need to have FFmpeg compiled with--enable-libuavs3d
.