VideoHelp Forum
+ Reply to Thread
Results 1 to 19 of 19
Thread
  1. Hi,

    I have webm files with transparency. They play well on Firefox and chrome but safari doesnt seem to support webm so I have to convert them to mov. Is it possible to keep the transparency when doing that? I tried with ffmpeg but I coudlnt even convert them

    Code:
    ffmpeg -c:v libvpx-vp9 -i aa1a1.webm -c:v libvpx-vp9 -crf 30 -b:v 0 -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" -c:a copy aa1a1.mov
    this is the error I get:

    Code:
    [mov @ 0000000000393000] vp9 only supported in MP4.
    Could not write header for output file #0 (incorrect codec parameters ?): Invali
    d argument
    Error initializing output stream 0:0 --
    Maybe its the wrong codec?

    Thank you.
    Quote Quote  
  2. The error says :
    vp9 only supported in MP4
    Try changing your output file to .mp4

    If that works then see if you can convert that .mp4 to .mov if you need the .mov format.
    Quote Quote  
  3. that one works but the problem is that mp4 wont support transparency.
    Quote Quote  
  4. Using the .mp4 you just created try this:

    Code:
    ffmpeg -i input_file.mp4 -c:v copy -c:a copy -c:s copy -f mov output_file.mov
    Note transparency is not something I have worked with.
    This means the .mov file created from the .mp4 might not have transparency.
    It may even give the vp9 error again.
    Worth a try though
    Quote Quote  
  5. That does convert it to mov but the problem is it wont be transparent because the transparency will get lost upon converting to mp4.
    Quote Quote  
  6. I tried both versions of ffmpeg I have & I got the same error as you did in both.
    It seems that ffmpeg can only use vp9 to .mp4.
    I also read that .mp4 con't have transparency.
    There are some howtos that say .mp4 can have transparency.
    Several .png files are created & then merged back into a .mp4.
    I don't plan to do that but if you want to check it out it might be possible.
    Quote Quote  
  7. I think its just faster to convert from webm to mov directly.
    Quote Quote  
  8. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by supercain View Post
    That does convert it to mov but the problem is it wont be transparent because the transparency will get lost upon converting to mp4.
    try this here - https://www.reddit.com/r/ffmpeg/comments/cyp5vh/encoding_a_webm_as_mov_without_losing_the/
    Quote Quote  
  9. It doesnt work. The first solution gives me this error:

    Metadata:
    ALPHA_MODE : 1
    ENCODER : Lavc59.18.100 libvpx-vp9
    DURATION : 00:00:03.390000000
    [NULL @ 0000000000477600] Unable to find a suitable output format for 'copy'

    whereas the second one gives me the same error I posted previously.
    copy: Invalid argument
    Quote Quote  
  10. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by supercain View Post
    It doesnt work. The first solution gives me this error:

    Metadata:
    ALPHA_MODE : 1
    ENCODER : Lavc59.18.100 libvpx-vp9
    DURATION : 00:00:03.390000000
    [NULL @ 0000000000477600] Unable to find a suitable output format for 'copy'

    whereas the second one gives me the same error I posted previously.
    copy: Invalid argument
    see here for the 2 errors you are getting - https://superuser.com/questions/1283430/what-is-wrong-with-my-ffmpeg-command
    Quote Quote  
  11. Im not using the -profile option. Sorry to ask but whats the relation?
    Quote Quote  
  12. I found an older version of ffmpeg that I have that works.
    I'm attaching a .zip file with it if you want it.

    Try this:
    Code:
    ffmpeg -i aa1a1.webm -c:v libvpx-vp9 -crf 30 -b:v 0 -pix_fmt yuv420p -metadata:s:v:0 alpha_mode="1" aa1a1.mov

    It will give this warning:
    [mov @ 02f63e40] Using MS style video codec tag, the file may be unplayable!
    I also had to use yuv420p instead of yuva420p.

    It played ok in VLC .
    The sample I found & used did not have Audio so I couldn't test if Audio works.
    Image Attached Files
    Quote Quote  
  13. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by supercain View Post
    Im not using the -profile option. Sorry to ask but whats the relation?
    disregard the last post and see if this reddit thread will help - https://www.reddit.com/r/VideoEditing/comments/d66y6f/converting_a_webm_with_alpha_to_...ov_with_alpha/
    Quote Quote  
  14. [QUOTE=october262;2662654
    see if this reddit thread will help[/QUOTE]

    it does convert it but no transparency is kept. Also, the output file is very big.
    Quote Quote  
  15. Originally Posted by cholla View Post
    I'm attaching a .zip file with it if you want it.
    thanks but didt work. The video wont keep transparency and it wont even play on the browser.
    Quote Quote  
  16. Originally Posted by supercain View Post
    thanks but didt work. The video wont keep transparency and it wont even play on the browser.
    Sorry I should have tested the .mov file in the browser.
    It wouldn't play in FireFox for me either.
    I don't have Safari.

    I tested in VLC & MPC-HC.

    That's all the solutions I have
    Quote Quote  
  17. Can you encode it with hvc1?
    Quote Quote  
  18. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Mov file format might be able to "include" a vp9 video stream, but for modern QT formats it is not a legit option, so is no surprise that it might not play. For mov, QT will want to convert to avc, hevc, or prores, or maybe the old "animation" codec. Of those, only prores and animation are commonly created with transparency (alpha channel). And they would be very, or extremely big, respectively.

    You could go way round about and create hevc with alpha by following these steps
    https://kitcross.net/hevc-web-video-alpha-channel/

    Or you could just make everything more easy on yourself by skipping using Safari.


    Scott
    Quote Quote  
  19. I would do that because I really hate apple but unfortunately many people use their products so I must make my site responsive for those as well.
    Last edited by supercain; 17th Jul 2022 at 01:01.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!