Decoding VP9 with Alpha Channel in Android, is this possible?

FFmpeg currently supports VP9 compression for yuv a 420p.

Using grafika as a code base, I will implement VP9 yuva420p encoded video playback on Android (using SurfaceTexture and MediaCodec), but I can 'get the alpha channel from the video.

I checked the video encoded using VideoAlphaMode; ID: 0x53c0 size: 4, so I'm sure the video contains an alpha channel.

So the question is: does the Android 4.4+ decoder support VP9 with alpha?

+6
source share
2 answers

Try

ffmpeg -i input.mov -c:v libvpx -pix_fmt yuva420p out.webm 
0
source

We recommend that you start by creating the latest version of libvpx itself on a 64-bit Linux workstation. The libvpx test suite should include a test for the alpha channel. Make sure the test passes. If this is not the case, this is a bad sign, because libvpx is the reference implementation for VP9.

If this happens, the next step will be to attempt alpha decoding and overlay using a higher-level library still located on Linux. I suggest using GStreamer 1.8.2 or higher. Put your clip on top of the videotestsrc generator, which will generate most video formats.

If any of these tests failed, I would recommend that you carefully study the reason before proceeding.

The reason for starting Linux is that you will have an easier time to create and troubleshoot, and I suspect that you may run into the edge of a specification that was not even implemented in the reference implementation (libvpx), or which is difficult to integrate into libraries more high level (hence the proposal of GStreamer).

However, although I have extensive experience with VP8 and libvpx, I have not used the feature set specific to VP9. However, I am curious to follow your efforts and perhaps you will be able to give advice as you move forward.

0
source

All Articles