intel / vpl-gpu-rt

MIT License
109 stars 92 forks source link

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

Open wenqingx opened 9 months ago

wenqingx commented 9 months ago

Which component impacted?

Encode

Is it regression? Good in old configuration?

No, this issue exist a long time

What happened?

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 1024x768.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

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

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.

What's the usage scenario when you are seeing the problem?

Others

What impacted?

No response

Debug Information

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

Do you want to contribute a patch to fix the issue?

None

Sherry-Lin commented 9 months ago

@dvrogozh could you take a look whether it's expected or not?