Skip to content

uavs3e

currentMigrated from docs/encoders/uavs3e.mdx at 37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0
No commits since Aug 2023

AVS3 encoder which supports AVS3-P2 baseline profile.

Latest release
v1.1
Last commit
Stars
162

uavs3e is an open-source encoder for AVS3, the Chinese video standard, supporting the AVS3-P2 baseline profile. It was developed by Peking University Shenzhen Graduate School, Peng Cheng Laboratory and Guangdong Bohua UHD Innovation, and is licensed under the BSD 4-clause license. It is optimized for SSE4/AVX2 and also builds for ARM and LoongArch.

Development has stopped: the last commit on master is from August 2023, and the only tags, v1.3 and v1.1, date from 2022. It is slow by default and awkward to build today.

There are no binaries. On Linux:

Terminal window
git clone https://github.com/uavs3/uavs3e.git
cd uavs3e
mkdir -p build/linux && cd build/linux
cmake ../.. -DCOMPILE_10BIT=0 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_C_FLAGS="-Wno-incompatible-pointer-types -D_LARGEFILE64_SOURCE -include unistd.h"
make -j8

The extra flags work around three problems with current toolchains: CMake 4 rejects the project’s old minimum version, GCC 14+ and recent Clang treat an incompatible-pointer warning in the AVX2 code as an error, and test/utest.c (where the encoder’s main lives) uses lseek64/read/write without including <unistd.h>. The result is a uavs3enc binary in the build directory. On Windows, run version.bat and build build/x86_windows/uavs3e.sln in Visual Studio.

uavs3enc reads raw planar YUV only, from a seekable file: no Y4M, and -i - (stdin) does not work. Convert first, and give it the size and frame rate yourself:

Terminal window
ffmpeg -i input.mkv -pix_fmt yuv420p -f rawvideo input.yuv
uavs3enc -i input.yuv -w 1920 -h 1080 -d 8 --fps_num 24000 --fps_den 1001 -q 30 -o output.avs3

Note that -h is the height, not help. For rate-controlled encodes and more threads:

Terminal window
uavs3enc -i input.yuv -w 1920 -h 1080 -d 8 --fps_num 24000 --fps_den 1001 -p 120 \
--speed_level 2 --rc_type 1 --rc_crf 28 --wpp_threads 8 --frm_threads 8 -o output.avs3

With --rc_type 1 (CRF) the quality comes from --rc_crf, and -q is ignored.

OptionMeaning
-qFixed QP in CQP mode (the default): 0–63 for 8-bit, −16–63 for 10-bit.
--rc_type0 CQP (default), 1 CRF, 2 ABR, 3 CBR.
--rc_crfCRF value, 0–63.
--rc_bitrate, --rc_max_bitrateTarget and maximum bitrate in kbit/s for ABR/CBR.
--speed_level0 to 4. 0 is the default and the slowest; 4 is the fastest.
-pIntra period in frames; 0 means only the first frame is intra.
--wpp_threads, --frm_threadsWavefront and frame-level threading.
-fMaximum number of frames to encode.
--configRead options from a file; command-line options override it.

The output is a raw AVS3 stream. Decode it with uavs3d, or with FFmpeg built with --enable-libuavs3d, which is not the default.