Tool

Transparent Video Checker and Maker

You want to put a logo or a caption effect on a web page without a background, but sometimes you cannot tell whether the video you received is really transparent. Transparency (the alpha channel) can be hidden by a black background and invisible to the eye. Paste the ffprobe output to read whether alpha is inside, and if it is not, take the command that makes a VP9 alpha WebM.

① Paste the ffprobe output

Paste the output of ffprobe -hide_banner filename, or the -show_streams output, as it is. The text is read only inside this browser.

The text behind the example buttons is fake output that shows the format; it is not a measurement from this site.

② Command to make a VP9 alpha WebM

Encode command (replace the file names with your own)

ffmpeg -i "input.mov" -c:v libvpx-vp9 -pix_fmt yuva420p -crf 30 -b:v 0 -auto-alt-ref 0 -an "output.webm"

Check after encoding (if you see alpha_mode=1, the alpha marker is in)

ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,pix_fmt:stream_tags=alpha_mode -of default=nw=1 "output.webm"

The default CRF of 30 is only a starting point, and this site has not measured the quality or size of alpha video. To include sound, delete -an and add audio options. -auto-alt-ref 0 is an option that is widely cited as needed for alpha encoding; we could not confirm whether recent builds still need it, so we include it. To see whether your ffmpeg includes libvpx-vp9, use the build capability checker. The numbers for green removal (0.15, 0.05) are starting values and need adjusting for each video.

③ Measure the size added by alpha

Encode the same source twice with the same CRF, once without alpha (yuv420p) and once with alpha (yuva420p), enter the two file sizes, and it calculates the increase. Any unit works as long as both use the same one.

This is only the ratio of the two numbers you entered, not a value that applies to other videos.

④ Does this browser accept the codecs?

canPlayType only answers whether the codec can be opened; it does not say whether alpha is drawn as transparent. To see real transparency, play it over a colored background and look with your eyes.

How do you tell whether a video has an alpha channel?

  • Check whether pix_fmt has an a. A pixel format that includes an alpha plane, such as yuva420p, yuva444p12le, rgba or gbrap, has alpha. yuv420p has none.
  • WebM (VP9) is an exception. VP9 alpha stores an alpha video alongside the color video in one file, so FFmpeg’s default VP9 decoder is known not to read the alpha and to show yuv420p. That is why a WebM with alpha can also show yuv420p in pix_fmt; in that case the stream tag alpha_mode=1 is the sign that alpha is inside. This tool reads both.
  • HEVC alpha barely shows up in the output. Apple-style HEVC alpha is known to store the alpha as a separate layer, and it does not seem to be distinguishable by pix_fmt. That is why this tool answers ‘can’t tell’. This site has not made an HEVC alpha file itself.
  • Having alpha is not the same as looking transparent. The side that plays it (browser, player, editor) has to read the alpha for it to become transparent. In a player that ignores alpha, a black background is common.

Which codec and browser combinations do you use?

What follows is not something this site tested but generally known information. Before you publish, play it in your target browsers yourself.

  • VP9 alpha WebM: known to play with transparency in Chrome, Edge and Firefox. Safari varies by version and device, so it needs checking.
  • HEVC alpha (MOV or MP4, hvc1): known to play in Safari and other Apple platforms. Other browsers vary by environment, so it needs checking.
  • ProRes 4444 (with alpha): an intermediate file for editing and compositing. Rather than putting it in a web page’s <video>, it is usual to convert it to one of the two formats above.
  • If you upload both formats and want the browser to choose, you put the <source> elements in order. Note that ‘can open it’ and ‘draws it as transparent’ can differ, so you need to check on a colored background in each browser. You can build the type and codecs strings with the video codec fallback snippet builder.

Making a VP9 alpha WebM

  1. First check with the tool above whether the source has alpha. Converting an MP4 without alpha to WebM does not make it transparent.
  2. If the file has alpha, encode with -pix_fmt yuva420p and -c:v libvpx-vp9. Pick what you have in the tool’s ‘What you have’ menu and copy the command.
  3. If the input is a VP9 WebM that contains alpha, you are known to need -c:v libvpx-vp9 before the input for the alpha to be read. Without it, you can get a result where the alpha silently disappeared.
  4. For video shot against a green background, the chromakey filter can turn the background into alpha. The similarity and blend values differ for every video, and hair and semi-transparent edges may not come out clean.
  5. After making it, use the ffprobe check command the tool gives you to see whether alpha_mode=1 appears, and play it over a colored page background to check with your eyes.

How much bigger does the file get?

Carrying alpha means one more alpha video goes into the file, so it is natural for the file to grow. However, this site has not measured how much it grows. It will probably depend on whether the alpha is a simple rectangular logo or semi-transparent smoke and shadows, and we have no number that can be generalized. Instead, encode the same source twice with the same CRF in ③ above and measure it yourself. The only difference is -pix_fmt yuv420p for the file without alpha and -pix_fmt yuva420p for the file with alpha.

The per-codec size measurements on this site (how we measure) are values for 1080p25 clips without alpha, so they do not fit alpha video.

Limits worth knowing

  • It does not build an HEVC alpha conversion command. FFmpeg’s libx265 is known not to be able to encode alpha. There are reports of paths on macOS tools or hardware encoders that support alpha, but this site could not confirm them.
  • It reads only the marker that alpha ‘exists’. The tool cannot know whether the alpha plane really has transparent areas (or is fully opaque).
  • The output behind the example buttons is fake, to show the format. Codec and tag notation can differ slightly by FFmpeg version, so if it cannot find what it needs in the text you paste, it answers ‘not readable’.
  • Asking this browser only answers about codec support. It does not tell you whether alpha is drawn, and you have to check other browsers and devices yourself. Your input is not sent to a server and is processed only inside the browser.