1*abb65b4bSAndroid Build Coastguard Worker 2*abb65b4bSAndroid Build Coastguard Worker# OpenAPV (Open Advanced Professional Video Codec) 3*abb65b4bSAndroid Build Coastguard Worker 4*abb65b4bSAndroid Build Coastguard Worker[](https://github.com/openapv/openapv/actions/workflows/build.yml) 5*abb65b4bSAndroid Build Coastguard Worker 6*abb65b4bSAndroid Build Coastguard WorkerOpenAPV provides the reference implementation of the [APV codec](#apv-codec) which can be used to record professional-grade video and associated metadata without quality degradation. OpenAPV is free and open source software provided by [LICENSE](#license). 7*abb65b4bSAndroid Build Coastguard Worker 8*abb65b4bSAndroid Build Coastguard WorkerThe OpenAPV supports the following features: 9*abb65b4bSAndroid Build Coastguard Worker 10*abb65b4bSAndroid Build Coastguard Worker- fully compliant with 422-10 and 400-10 profile of [APV codec](#apv-codec) 11*abb65b4bSAndroid Build Coastguard Worker- Low complexity by optimization for ARM NEON and x86(64bit) SEE/AVX CPU 12*abb65b4bSAndroid Build Coastguard Worker- Supports tile-based multi-threading 13*abb65b4bSAndroid Build Coastguard Worker- Supports Various metadata including HDR10/10+ and user-defined format 14*abb65b4bSAndroid Build Coastguard Worker- Constant QP (CQP), average bitrate (ABR), and constant rate factor (CRF) are supported 15*abb65b4bSAndroid Build Coastguard Worker 16*abb65b4bSAndroid Build Coastguard Worker 17*abb65b4bSAndroid Build Coastguard Worker## APV codec 18*abb65b4bSAndroid Build Coastguard WorkerThe APV codec is a professional video codec, which was developed in response to the need for professional level high quality video recording and post production. The primary purpose of the APV codec is for use in professional video recording and editing workflows for various types of content. 19*abb65b4bSAndroid Build Coastguard Worker 20*abb65b4bSAndroid Build Coastguard WorkerAPV codec utilizes technologies known to be over 20 years to achieve a royalty free codec. APV builds a video codec using only conventional coding technologies, which consist of traditional methods published between the early 1980s and the end of the 1990s. 21*abb65b4bSAndroid Build Coastguard Worker 22*abb65b4bSAndroid Build Coastguard WorkerThe APV codec standard has the following features: 23*abb65b4bSAndroid Build Coastguard Worker 24*abb65b4bSAndroid Build Coastguard Worker- Perceptually lossless video quality, which is close to raw video quality 25*abb65b4bSAndroid Build Coastguard Worker- Low complexity and high throughput intra frame only coding without pixel domain prediction 26*abb65b4bSAndroid Build Coastguard Worker- Support for high bit-rate range up to a few Gbps for 2K, 4K and 8K resolution content, enabled by a lightweight entropy coding scheme 27*abb65b4bSAndroid Build Coastguard Worker- Frame tiling for immersive content and for enabling parallel encoding and decoding 28*abb65b4bSAndroid Build Coastguard Worker- Support for various chroma sampling formats from 4:2:2 to 4:4:4, and bit-depths from 10 to 16 29*abb65b4bSAndroid Build Coastguard Worker- Support for multiple decoding and re-encoding without severe visual quality degradation 30*abb65b4bSAndroid Build Coastguard Worker- Support multi-view video and auxiliary video like depth, alpha, and preview 31*abb65b4bSAndroid Build Coastguard Worker- Support various metadata including HDR10/10+ and user-definded format 32*abb65b4bSAndroid Build Coastguard Worker 33*abb65b4bSAndroid Build Coastguard Worker### Related specification 34*abb65b4bSAndroid Build Coastguard Worker- APV Codec (bitstream): [https://datatracker.ietf.org/doc/draft-lim-apv/](https://datatracker.ietf.org/doc/draft-lim-apv/) 35*abb65b4bSAndroid Build Coastguard Worker - Scope of OpenAPV project 36*abb65b4bSAndroid Build Coastguard Worker- APV ISO based media file format: [APV-ISOBMFF](/readme/apv_isobmff.md) 37*abb65b4bSAndroid Build Coastguard Worker- APV RTP payload format: [https://datatracker.ietf.org/doc/draft-lim-rtp-apv/](https://datatracker.ietf.org/doc/draft-lim-rtp-apv/) 38*abb65b4bSAndroid Build Coastguard Worker 39*abb65b4bSAndroid Build Coastguard Worker## How to build 40*abb65b4bSAndroid Build Coastguard Worker- Build Requirements 41*abb65b4bSAndroid Build Coastguard Worker - CMake (download from [https://cmake.org/](https://cmake.org/)) 42*abb65b4bSAndroid Build Coastguard Worker - GCC 43*abb65b4bSAndroid Build Coastguard Worker 44*abb65b4bSAndroid Build Coastguard Worker For ARM 45*abb65b4bSAndroid Build Coastguard Worker - gcc-aarch64-linux-gnu 46*abb65b4bSAndroid Build Coastguard Worker - binutils-aarch64-linux-gnu 47*abb65b4bSAndroid Build Coastguard Worker 48*abb65b4bSAndroid Build Coastguard Worker- Build Instructions PC 49*abb65b4bSAndroid Build Coastguard Worker ``` 50*abb65b4bSAndroid Build Coastguard Worker cmake -DCMAKE_BUILD_TYPE=Release -S . -B build 51*abb65b4bSAndroid Build Coastguard Worker cmake --build build 52*abb65b4bSAndroid Build Coastguard Worker ``` 53*abb65b4bSAndroid Build Coastguard Worker 54*abb65b4bSAndroid Build Coastguard Worker- Build Instructions ARM 55*abb65b4bSAndroid Build Coastguard Worker ``` 56*abb65b4bSAndroid Build Coastguard Worker cmake -DCMAKE_BUILD_TYPE=Release -S . -B build-arm -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DARM=TRUE -DCMAKE_SYSTEM_PROCESSOR=aarch64 57*abb65b4bSAndroid Build Coastguard Worker cmake --build build-arm 58*abb65b4bSAndroid Build Coastguard Worker ``` 59*abb65b4bSAndroid Build Coastguard Worker 60*abb65b4bSAndroid Build Coastguard Worker- Output Location 61*abb65b4bSAndroid Build Coastguard Worker - Executable applications can be found under build/bin/ or build-arm/bin/ 62*abb65b4bSAndroid Build Coastguard Worker - Library files can be found under build/lib/ or build-arm/lib/ 63*abb65b4bSAndroid Build Coastguard Worker 64*abb65b4bSAndroid Build Coastguard Worker## How to use 65*abb65b4bSAndroid Build Coastguard Worker### Encoder 66*abb65b4bSAndroid Build Coastguard Worker 67*abb65b4bSAndroid Build Coastguard WorkerEncoder as input require raw YUV file (422, 444), 10-bit or more. 68*abb65b4bSAndroid Build Coastguard Worker 69*abb65b4bSAndroid Build Coastguard WorkerDisplaying help: 70*abb65b4bSAndroid Build Coastguard Worker 71*abb65b4bSAndroid Build Coastguard Worker oapv_app_enc --help 72*abb65b4bSAndroid Build Coastguard Worker 73*abb65b4bSAndroid Build Coastguard WorkerEncoding: 74*abb65b4bSAndroid Build Coastguard Worker 75*abb65b4bSAndroid Build Coastguard Worker oapv_app_enc -i input_1920x1080_yuv422_10bit.yuv -w 1920 -h 1080 -d 10 -z 30 --input-csp 2 -o encoded.apv 76*abb65b4bSAndroid Build Coastguard Worker oapv_app_enc -i input.y4m -o encoded.apv 77*abb65b4bSAndroid Build Coastguard Worker 78*abb65b4bSAndroid Build Coastguard Worker### Decoder 79*abb65b4bSAndroid Build Coastguard Worker 80*abb65b4bSAndroid Build Coastguard WorkerDecoder output can be in yuv or y4m formats. 81*abb65b4bSAndroid Build Coastguard Worker 82*abb65b4bSAndroid Build Coastguard WorkerDisplaying help: 83*abb65b4bSAndroid Build Coastguard Worker 84*abb65b4bSAndroid Build Coastguard Worker oapv_app_dec --help 85*abb65b4bSAndroid Build Coastguard Worker 86*abb65b4bSAndroid Build Coastguard WorkerDecoding: 87*abb65b4bSAndroid Build Coastguard Worker 88*abb65b4bSAndroid Build Coastguard Worker oapv_app_dec -i encoded.apv -o output.y4m 89*abb65b4bSAndroid Build Coastguard Worker 90*abb65b4bSAndroid Build Coastguard Worker## Testing 91*abb65b4bSAndroid Build Coastguard Worker 92*abb65b4bSAndroid Build Coastguard WorkerIn build directory run ``ctest`` 93*abb65b4bSAndroid Build Coastguard Worker 94*abb65b4bSAndroid Build Coastguard Worker## Packaging 95*abb65b4bSAndroid Build Coastguard Worker 96*abb65b4bSAndroid Build Coastguard WorkerFor generating package ready for distribution (default deb) execute in build directory ``cpack``, or other formats (tgz, zip etc.) ``cpack -G TGZ``. 97*abb65b4bSAndroid Build Coastguard Worker 98*abb65b4bSAndroid Build Coastguard Worker## License 99*abb65b4bSAndroid Build Coastguard Worker 100*abb65b4bSAndroid Build Coastguard WorkerSee [LICENSE](LICENSE) file for details. 101*abb65b4bSAndroid Build Coastguard Worker 102*abb65b4bSAndroid Build Coastguard Worker## Graphic logo 103*abb65b4bSAndroid Build Coastguard Worker   104*abb65b4bSAndroid Build Coastguard Worker   105