mpv icon indicating copy to clipboard operation
mpv copied to clipboard

VP9 Alpha channel isn't decoded

Open Zipdox opened this issue 2 years ago • 4 comments

Important Information

  • mpv 0.34.1
  • Debian GNU/Linux bookworm/sid x86_64
  • Installed with apt

Reproduction steps

Make sure your system supports transparency rendering. On Linux you might need a build of mesa with these patches.

Refer to the example files. Play these two files with the following commands. The gif will play transparently but the WebM will not.

mpv --alpha=yes travolta.webm
mpv --alpha=yes Nikki.gif

Expected behavior

The WebM plays with transparency.

Actual behavior

The WebM plays with a black background.

Log file

mpv_transparency.log

Sample files

  • travolta.webm: https://0x0.st/ouvI.webm
  • Nikki.gif: https://0x0.st/ouvl.gif

Zipdox avatar Jun 18 '22 22:06 Zipdox

It appears that forcing the decoder using --vd=libvpx-vp9 works as a workaround, though it would be nice if this is not necessary.

Zipdox avatar Jun 18 '22 22:06 Zipdox

Yeah I was aware that FFmpeg does this too, and you need to specify the decoder to decode alpha. Maybe MPV could detect alpha channel and force the decoder of necessary.

Zipdox avatar Jun 21 '22 15:06 Zipdox

Can you play alpha webm?

TeeMoYan avatar Aug 24 '22 09:08 TeeMoYan

Can you play alpha webm?

Only if I install the mesa patches and force the encoder like I said.

Zipdox avatar Aug 25 '22 19:08 Zipdox