fraunhoferhhi / vvenc

VVenC, the Fraunhofer Versatile Video Encoder
https://www.hhi.fraunhofer.de/en/departments/vca/technologies-and-solutions/h266-vvc.html
BSD 3-Clause Clear License
942 stars 170 forks source link

how to fix the qp value of each frame? #217

Closed Bobfan closed 1 year ago

Bobfan commented 1 year ago

I want to fix each frame ( at least frame P) to 25. So I use --qp 25 --qpa 0 and --qp25 --qpa 1, both times I find QP cannot be fixed when encoding yuv to h266. image I'd appreciate some help.

adamjw24 commented 1 year ago

You would need to edit the QPoffset QPOffsetModelOff QPOffsetModelScale CbQPoffset CrQPoffset QPfactor entries of the FrameN (N in [1-32]) parameters and basically set them either to 0 or to 1.0, as well as set IntraQPOffset to 0. Please just mind that you are breaking the encoder and your results will be bad and not representative of either VVC or VVenC.

Bobfan commented 1 year ago

Thanks very much. You mean edit FrameN in the vvenc/randomaccess_faster.cfg(if I use -preset faster), and then rebuild vvenc? After that, use the following command? vvencFFapp --preset faster --InputFile example.yuv -s 2560x1440 -fr 25 --QP 30 --LambdaFromQpEnable 1 --IntraQPOffset 0 --CbQpOffset 0 --CrQpOffset 0 -b example.h266

adamjw24 commented 1 year ago

Yes, first edit the randomaccess_faster.cfg file.

Than no, you don't have to recompile, rather you'd have to use the FFapp, and use the -c rancomaccess_faster.cfg parameter to set the preset options.

The config files are parsed at runtime if specified using the -c option of the FF-app.