Is there any way to have Android play video with transparent areas? When I try to play a WebM video containing transparent areas in VideoView, the background of the view remains black. Instead of black I'd expect to see the background of the parent view shown through on the transparent areas.
The only working solution I've found so far is to create a drawable animation out of the video frames, which isn't very memory efficient.
Adding on to Krishna's answer, I've created a fork of alpha-movie that plays transparent videos with the alpha data included separately in each frame.
This means that you'll be able to convert transparent webm videos to normal mp4 for use with the AlphaMovieView. It produces accurate transparency as opposed to the chroma key method, allows for partial transparency and doesn't rely on you having to manually set the alpha colour. However you will need to preprocess your transparent video.
ffmpeg -vcodec libvpx -i input_video.webm -vf "split [a], pad=iw*2:ih [b], [a] alphaextract, [b] overlay=w" -x264opts keyint=30 -y output_video.mp4
. Replace input_video.webm and output_video.mp4 with the desired input file and output filename.This method is inspired by the feature in AVProVideo.