vvenc和vvdec
Posted Dillon2015
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vvenc和vvdec相关的知识,希望对你有一定的参考价值。
VVC是最新一代视频编码标准,相比于HEVC在相同质量下能节省50%的码率。VTM是VVC的官方参考软件,由于VVC集成了大量新的编码工具导致复杂度也急剧上升,VTM的编码速度也非常慢。
Fraunhofer 开发了速度比VTM更快和更实用的VVC编码器和解码器。分别为VVenC和VVdeC,项目链接如下:
VVenC:https://github.com/fraunhoferhhi/vvenc
VVdeC:https://github.com/fraunhoferhhi/vvdec
两个项目编译都非常简单,此次略去编译过程。
VVenC
VVenC编译完成之后会产生两个可执行文件,分别是标准编码器vvencapp和全功能的专业编码器vvencFFapp。
标准编码器vvencapp
vvencapp有5个预定义的preset (faster, fast, medium, slow, slower),其中最慢档preset的编码速度最慢但是编码质量最好,最快档preset的编码速度最快但编码质量最差 。vvencapp的主要,命令行参数如下:
OPTION | DEFAULT | DESCRIPTION |
---|---|---|
--help,-h | - | Show basic help |
--input,-i <str> | - | Raw yuv input file or '-' for reading from stdin |
--size,-s <wxh> | 1920x1080 | Input file resolution (width x height) |
--framerate,-r <int> | 60 | Temporal rate of input file. Required for VBR encoding and calculation of output bit-rate. Also recommended with perceptual QP adaptation (see --qpa option below). |
--format,-c <str> | yuv420 | Set input format to YUV 4:2:0 8bit (yuv420) or YUV 4:2:0 10bit (yuv420_10) |
--output,-o <str> | not set | Bit-stream output file |
--preset <str> | medium | Preset for specific encoding setting (faster, fast, medium, slow, slower) |
--qp,-q <int> | 32 | Quantization parameter (0..63) |
--bitrate <int> | 0 | Bitrate for rate control (0: constant-QP encoding without rate control, otherwise bits per second). Rate control requires correct --framerate (see option above). |
--passes,-p <int> | 2 | Number of rate control passes (1: single-pass rate control, 2: two-pass rate control) |
--qpa <int> | 1 | Perceptual QP adaptation (QPA) to improve subjective video quality (0: off, 1: on) |
--refreshsec,-rs <int> | 1 | Intra period/refresh in seconds |
--threads,-t <int> | size >= 1280x720: 8, else: 4 | Number of threads (1-N) |
--hdr <str> | off | HDR mode (+ SEI messages) + BT.709 or BT.2020 color space (off, pq, pq_2020, hlg, hlg_2020) |
命令行示例:假设输入的序列采样格式为YUV420,位深为8比特,分辨率为176x144,则可以采用下面的命令使用medium preset进行编码:
vvencapp --preset medium -i BUS_176x144_75@15.yuv -s 176x144 -o str.266
专业编码器vvencFFapp
vvencFFapp的使用方式类似于VTM,也是使用配置文件进行。大部分编码参数和VTM保持一致,但是某些参数会增加额外的可选模式。其配置文件可在cfg文件夹下找到。配置文件描述如下:
CONFIGURATION FILE | DESCRIPTION |
---|---|
sequence.cfg | Sequence specific configuration parameters. Must be always adapted to the input sequence. |
randomaccess_faster.cfg randomaccess_fast.cfg randomaccess_medium.cfg randomaccess_slow.cfg randomaccess_slower.cfg | Random access configuration for different presets. Each configuration file corresponds to one of the 5 preset modes. |
qpa.cfg | Perceptually optimized QPA configuration file. |
rc1p.cfg | Single pass rate control configuration, overriding default fix QP setup. |
rc2p.cfg | Two pass rate control configuration, overriding default fix QP setup. |
使用方式如下:
vvencFFapp -c randomaccess_medium.cfg -c sequence.cfg
感兴趣的请关注微信公众号Video Coding
以上是关于vvenc和vvdec的主要内容,如果未能解决你的问题,请参考以下文章