intel / libvpl

Intel® Video Processing Library (Intel® VPL) API, dispatcher, and examples
https://intel.github.io/libvpl/
MIT License
262 stars 80 forks source link

[onevpl_enctools] when add "-extbrc 1 -strict -1" on ffmpeg cmd, VBR and CBR mode output same clips #116

Closed wenqingx closed 6 months ago

wenqingx commented 6 months ago

When setting "- extbrc 1- restrict -1", the output bitrate, md5, psnr are the same CBR: $ffmpeg -v verbose -hwaccel qsv -qsv_device /dev/dri/renderD128 -f rawvideo -pix_fmt yuv420p -s:v 1024x768 -r 30 -i /h1024x768.yuv -frames:v 500 -c:v hevc_qsv -b:v 600000 -maxrate 600000 -extbrc 1 -strict -1 -vsync passthrough -y output.h265 VBR: $ffmpeg -v verbose -hwaccel qsv -qsv_device /dev/dri/renderD128 -f rawvideo -pix_fmt yuv420p -s:v 1024x768 -r 30 -i 1024x768.yuv -frames:v 500 -c:v hevc_qsv -b:v 600000 -maxrate 1200000 -extbrc 1 -strict -1 -vsync passthrough -y output.h265

Removing any one of "-extbrc 1 -strict -1 " would result in a different outcome, which is expected. CBR: $ffmpeg -v verbose -hwaccel qsv -qsv_device /dev/dri/renderD128 -f rawvideo -pix_fmt yuv420p -s:v 1024x768 -r 30 -i 1024x768.yuv -frames:v 500 -c:v hevc_qsv -b:v 600000 -maxrate 600000 -extbrc 1 -vsync passthrough -y output.h265 VBR: $ffmpeg -v verbose -hwaccel qsv -qsv_device /dev/dri/renderD128 -f rawvideo -pix_fmt yuv420p -s:v 1024x768 -r 30 -i 1024x768.yuv -frames:v 500 -c:v hevc_qsv -b:v 600000 -maxrate 1200000 -extbrc 1 vsync passthrough -y output.h265

my test env: OS:22.04 kernel:6.2.0-26-generic platform:DG2 (A380)

media-stack: libva:https://github.com/intel/libva/commit/63d2b2232148a493d6a5b385a1ebbbd3fa37ece3 gmmlib:https://github.com/intel/gmmlib/commit/5fb4180e22695ad4e3c155cf680119913c9f44bc media-driver:https://github.com/intel/media-driver/commit/a9f272496fc0f3e823cc4a814666ea27b443d902 libvpl:https://github.com/intel/libvpl/commit/2274efcd3672b43297ef774f332e1fed6781381c vpl-runtime:https://github.com/oneapi-src/oneVPL-intel-gpu/commit/852fa9f705ef44c004d014548601f3804a6de705 ffmpeg:https://github.com/FFmpeg/FFmpeg/commit/3047f05a99a9189cfdcc8d904cd2bd15aaa1f162

I think this should be unrelated to the format of the output , and AV1 and AVC should also have the same problem.

wenqingx commented 6 months ago

BTW:At present, I am not sure if this is a Regression, and I have not found a good node.

akwrobel commented 6 months ago

These tools are owned by the runtime team, @wenqingx please file this issue with them here: https://github.com/oneapi-src/oneVPL-intel-gpu/issues

wenqingx commented 6 months ago

These tools are owned by the runtime team, @wenqingx please file this issue with them here: https://github.com/oneapi-src/oneVPL-intel-gpu/issues

thanks, i file new one,https://github.com/oneapi-src/oneVPL-intel-gpu/issues/311 and close this issue.