[FFmpeg-trac] #8941(undetermined:new): Wrong color levels with kmsgrab and vaapi

FFmpeg trac at avcodec.org
Wed Oct 21 13:16:14 EEST 2020


#8941: Wrong color levels with kmsgrab and vaapi
-------------------------------------+-------------------------------------
             Reporter:  kokoko3k     |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:  kmsgrab      |               Blocked By:
  vaapi color levels                 |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Hi, i'm trying to capture my screen and encode the result via kmsgrab.
 Unfortunately i'm facing overexposed levels when doing so.
 It happens under Xorg (didn't tried wayland), with modesetting or intel
 driver.
 How to reproduce:
 The following examples produce wrong color levels (bright grey becomes
 white and dark gray becomes black):
 {{{
 1> timeout 2 ffmpeg -report -v 9 -loglevel 99 -f kmsgrab -i - -vf
 'hwmap=derive_device=vaapi,scale_vaapi=format=nv12' -c:v h264_vaapi -f nut
 - | ffplay -

 2> timeout 2 ffmpeg -report -v 9 -loglevel 99 -f kmsgrab -i - -vf
 'hwmap=derive_device=vaapi,hwdownload,format=bgr0' -c:v png -f nut - |
 ffplay -
 }}}

 ...this one looks ok instead (needs a linear framebuffer):
 {{{
 3> timeout 2 ffmpeg -report -v 9 -loglevel 99 -f kmsgrab -i - -vf
 'hwdownload,format=bgr0' -c:v png -f nut - | ffplay -
 }}}

 The common option between 1,2 and 3 is the use of
 hwmap=derive_device=vaapi, so i think the problem is there.

 Log files are here:
 1: http://sprunge.us/Zqozr7
 2: http://sprunge.us/ZAORG7
 3: http://sprunge.us/3qaCpH

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8941>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list