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
this is the error I get: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
Maybe its the wrong codec?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 --
Thank you.
+ Reply to Thread
Results 1 to 19 of 19
-
-
The error says :
vp9 only supported in MP4
If that works then see if you can convert that .mp4 to .mov if you need the .mov format. -
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
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 -
That does convert it to mov but the problem is it wont be transparent because the transparency will get lost upon converting to mp4.
-
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. -
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
-
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!
It played ok in VLC .
The sample I found & used did not have Audio so I couldn't test if Audio works. -
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=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. -
-
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 -
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 00:01.
Similar Threads
-
What can I use to compress a webm file without losing transparency?
By supercain in forum EditingReplies: 17Last Post: 24th May 2022, 19:59 -
How To Use ffmpeg to merge audio_only.webm with video_only.webm
By carlarogers in forum Video ConversionReplies: 3Last Post: 4th Aug 2020, 08:21 -
mp4/mkv to webm (I see lots of posts going the other way but not TO webm)
By AshleyQuick in forum Video ConversionReplies: 9Last Post: 10th Aug 2018, 09:19 -
Convert WEBM to MP4 with audio
By cottage in forum Video ConversionReplies: 4Last Post: 7th Aug 2018, 15:03 -
ffmpeg convert from mkv to mp4 [matroska,webm @ 0x1d06640] Read error at
By blurry in forum Video ConversionReplies: 6Last Post: 15th Jan 2018, 05:36