I've created a WebM media file with transparent background in Adobe After Effects. Due to Widevine specs, I have to encode this file to an adaptive format for playing.
With the following command I've successfully created a webm file with DASH:
ffmpeg -i example.webm -c:v libvpx-vp9 -s 200x113 -b:v 250k -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 -an -f webm -dash 1 adaptive.webm
Unfortunately, the resulting video has lost the alpha channel completely.
Is it possible to encode a video to an adaptive format without losing the alpha channel?
Yes, it is possible. In this case, you need to use libvpx for decoding as well as encoding, in order to access the alpha channel in the source video. Note the additional codec specifier before the input:
ffmpeg -c:v libvpx-vp9 -i example.webm -c:v libvpx-vp9 -b:v 250k -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 -an -f webm -dash 1 adaptive.webm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With