0

I have a small avi file I rendered with After Effects with both RGB and Alpha channels, therefore keeping its transparency. However, when converting this .avi to webm, all transparency is lost.

here is the the command line I use to convert my file :

ffmpeg.exe -i input.avi -c:v libvpx-vp9 -pix_fmt yuv420p -an -crf 30 -b:v 0 output.webm

The video file is rendered but all transparency is lost. How can I keep that transparency?

edit : yuv422p was automatically selected if I removed "-pix_fmt yuv420p" from the command line. Adding "-pix_fmt yuva420p" instead did not fix the issue, but was necessary. Adding "-metadata:s:v:0 alpha_mode="1"" to the command line did the trick (along with the pixel format change).

  • Remove `-pix_fmt yuv420p` as `yuva420p` should be automatically selected. – llogan Jun 03 '18 at 02:06
  • Yet it is not automatically selected. For whatever reason, yuv422 is automatically selected on my system and I can't playback my output without specifying the pixel format. As for marking my question as duplicate, I disagree, I've already read the question you linked and none of the suggestions there worked for me, hence my own question here. I'll try to specify yuva420p instead of yuv420p and see if the issue is resolved. Thanks. – Filsde Svanir Jun 03 '18 at 09:41
  • Upgrade your `ffmpeg`. That's the only suggestion I can provide without seeing the complete log from the command. – llogan Jun 03 '18 at 16:55
  • I am using the latest nightly build. I updated the question with an answer as I finally got around the issue. Thanks for your help! – Filsde Svanir Jun 04 '18 at 11:31

0 Answers0