uavs3e
37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0AVS3 encoder which supports AVS3-P2 baseline profile.
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:
git clone https://github.com/uavs3/uavs3e.gitcd uavs3emkdir -p build/linux && cd build/linuxcmake ../.. -DCOMPILE_10BIT=0 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_C_FLAGS="-Wno-incompatible-pointer-types -D_LARGEFILE64_SOURCE -include unistd.h"make -j8The 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.
Encode
Section titled “Encode”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:
ffmpeg -i input.mkv -pix_fmt yuv420p -f rawvideo input.yuvuavs3enc -i input.yuv -w 1920 -h 1080 -d 8 --fps_num 24000 --fps_den 1001 -q 30 -o output.avs3Note that -h is the height, not help. For rate-controlled encodes and more threads:
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.avs3With --rc_type 1 (CRF) the quality comes from --rc_crf, and -q is ignored.
| Option | Meaning |
|---|---|
-q | Fixed QP in CQP mode (the default): 0–63 for 8-bit, −16–63 for 10-bit. |
--rc_type | 0 CQP (default), 1 CRF, 2 ABR, 3 CBR. |
--rc_crf | CRF value, 0–63. |
--rc_bitrate, --rc_max_bitrate | Target and maximum bitrate in kbit/s for ABR/CBR. |
--speed_level | 0 to 4. 0 is the default and the slowest; 4 is the fastest. |
-p | Intra period in frames; 0 means only the first frame is intra. |
--wpp_threads, --frm_threads | Wavefront and frame-level threading. |
-f | Maximum number of frames to encode. |
--config | Read options from a file; command-line options override it. |
Decode and play
Section titled “Decode and play”The output is a raw AVS3 stream. Decode it with uavs3d, or with FFmpeg built with --enable-libuavs3d, which is not the default.