Opened 7 years ago

Closed 4 years ago

#3271 closed enhancement (fixed)

Allow using additional pixel formats with libvpx-vp9

Reported by: GreatEmerald Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: libvpx
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Currently ffmpeg assumes that libvpx is only capable of yuv420p pixel format. However, libvpx-vp9 with Profile 1 allows additional pixel formats - yuv422p and yuv444p, and possibly also yuva422p and yuva444p (the libvpx code states that they also support alpha in Profile 1). So these pixel formats should be made available.

The code comments for that can be found here (line 1133):
The announcement of yuv444p support can be found here:!topic/webm-discuss/UzoX7owhwB0

Change History (7)

comment:1 Changed 7 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords libvpx added
  • Priority changed from normal to wish
  • Status changed from new to open
  • Version changed from 2.1.1 to git-master

comment:2 Changed 6 years ago by GreatEmerald

Still happens in libavcodec 55.52.102.

comment:3 Changed 6 years ago by SocDemScum

libavcodec 56.19.100 produces an error saying that yuv420p colour spaces can only be used on profile 0 and 2, when telling it to use profile 1 and a yuv444p colour space.

Version 0, edited 6 years ago by SocDemScum (next)

comment:4 Changed 5 years ago by cehoyos

Is this still a valid ticket for yuva4xxp or was alpha abandoned for vp9?

comment:5 Changed 4 years ago by jzern

Alpha never made it to the final vp9 bitstream, but can be done in the same way as vp8 -- encoding and muxing the alpha plane separately.

comment:6 Changed 4 years ago by cdlvcdlv

I've made vp8/webm videos with alpha using ffmpeg with this command:

ffmpeg -i INPUT -c:v libvpx -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" OUTPUT.webm

But when I try

ffmpeg -i INPUT -c:v libvpx-vp9 -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" OUTPUT.webm

ffmpeg complains and changes the pixel format

Incompatible pixel format 'yuva420p' for codec 'libvpx-vp9', auto-selecting form at 'yuv420p'

Nevertheless, it seems there is a little utility to make vp9 videos. I've not tested it to see whether it works using Chrome but, as a part of chromium, we could assume compatibility.

The README tells about VP8 only, but in the source code you can see the options:

printf(" -c codec (vp8 or vp9). default is vp8\n");

comment:7 Changed 4 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Implemented by Vignesh Venkatasubramanian in acca56d9629b7fc158ce188190d22314c3d92c39

Note: See TracTickets for help on using tickets.