corrupt output and rate control issues when using vp9_vaapi encoder in CBR or VBR mode
|Reported by:||armena||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Summary of the bug:
When using the vp9_vaapi encoder in CBR or VBR mode, the output video may be corrupted. At a dissolve from a full-screen logo to video from a camera, the output became garbled for several seconds. Also, in VBR mode, the output bitrate is approximately 1/2 of the requested value.
This was found using the i965 vaapi driver on an Intel Kabylake cpu. I attempted to reproduce using vp9enc (shipped with vaapi-utils) but was not able to do so, so my initial assumption is that this is an ffmpeg issue. I've been able to encode the same file successfully using other vaapi codecs (vp8, h264, hevc) with similar ffmpeg options.
How to reproduce:
/usr/local/bin/ffmpeg -vaapi_device /dev/dri/renderD128 -i /var/www/html/rpitv_test/20170121_whockey_union_p0.mp4 -vf "format=nv12,hwupload,deinterlace_vaapi,scale_vaapi=w=1920:h=1080" -c:v vp9_vaapi -b:v 4400k -bufsize 17600k -maxrate 4400k -g 150 -keyint_min 150 -bf 1 -bsf:v vp9_raw_reorder,vp9_superframe -an -f webm -dash 1 -r 29.97 20170121_whockey_union_p0-v4400.webm ffmpeg version N-87873-g2e94490225 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18) 20170516 configuration: --enable-libvorbis --enable-libvpx --enable-vaapi