Does MP4 Support Transparency?

Last updated: · Written by the RenderAlpha team

Facts checked against the sources below on November 13, 2026. Playback tested the same day in Safari 18.6, Chrome 156, Edge 156 and Firefox 160 on macOS 15.6.1 with FFmpeg 9.0.2.

People save a transparent clip as an MP4 and get a solid background back. The cause is usually not the file extension but the codec inside it. This guide separates the two, then shows what happened when we put a transparent HEVC stream into an .mp4 file and opened it in four browsers.

Short answer

A normal H.264 MP4 has no alpha channel, so it cannot be transparent. The .mp4 extension names a container, and the codec inside decides. We rewrapped a transparent HEVC stream from .mov to .mp4: Safari 18.6, Chrome 156 and Edge 156 refused to decode it, and Firefox 160 played it with a solid background. For transparency on the web, use a WebM, with a HEVC .mov for Safari.

A container is not a codec

MP4 is a container: a box that holds a video stream, an audio stream and some metadata. MDN’s container guide, which we opened on November 13, 2026, describes MP4 as broadly supported. Whether a picture inside can be transparent depends on the codec that made the stream, not on the box around it.

The codec most MP4 files use is H.264. A pixel format with an alpha plane has an “a” in its name, such as yuva420p. Our H.264 test MP4 reports yuv420p, and in all four browsers a pixel read from the corner of the frame came back fully opaque. That is why a transparent clip saved as an ordinary MP4 comes back with a black or white background: the export step flattened it.

What happened when we put HEVC with alpha in an .mp4

HEVC with alpha is the format Safari uses for transparent video, and it normally lives in a .mov file. MDN’s codec guide lists MP4 as the container for HEVC, so we tried the obvious thing: copy the same stream into an .mp4 file without re-encoding it.

We made one file, copied its stream into the new container, and loaded both in each browser on macOS 15.6.1. Each page drew the first frame to a canvas and read a pixel from a corner that should be transparent. The .mov results match the ones in our format comparison. The .mp4 is the new part.

BrowserHEVC alpha in .movSame stream in .mp4
Safari 18.6TransparentDecode error (canPlayType said “probably”)
Chrome 156Transparent when loaded directlyDecode error
Edge 156Transparent when loaded directlyDecode error
Firefox 160Plays, solid backgroundPlays, solid background
Copy the HEVC stream from the .mov into an .mp4 without re-encoding.
ffmpeg -i hevc-alpha.mov -c copy -tag:v hvc1 hevc-alpha-copy.mp4

ffprobe cannot tell you whether the alpha is there

Both the .mov and the .mp4 report pix_fmt=yuv420p, the same as an opaque H.264 file, and ffmpeg printed “PPS id out of range: 1” many times while decoding either one. So reading pix_fmt is a reliable check for a VP9 WebM or ProRes 4444, but not for this format. Load the file in the browser you care about and read a pixel, as we did.

What to use instead of an MP4

Choose by where the clip will play. The guides linked here carry the tested details.

You needUseGuide
A web page or stream overlayTransparent WebMCreate a transparent WebM
Safari as wellA WebM plus a HEVC .mov as a second sourceWhy WebM turns grey or black in Safari
A video editorProRes 4444 in a .movExport ProRes 4444 with alpha
A clip that has to be an MP4A solid background or an image behind the subjectExport a video with an alpha channel

What this test does not tell you

This is one stream, rewrapped with ffmpeg 9.0.2, on one Mac. We could not read Apple’s documentation page on HEVC with alpha, so we do not know whether a file written by Apple’s own tools as .mp4 behaves differently. We did not test iPhone, Windows or Android, or an MP4 with a different alpha codec.

The result says that this particular rewrap did not play. It does not prove that no tool can write a transparent .mp4.

What RenderAlpha does with MP4

RenderAlpha exports MP4 only on a color or an image you choose, so the result is opaque by design. For transparency it exports WebM, ProRes 4444 or GIF. Specs and limits lists the formats, and pricing explains credits.

Frequently asked questions

Can an MP4 have a transparent background?

Not an ordinary H.264 one. In our tests only the .mov and WebM files rendered transparent, and an HEVC stream copied into an .mp4 either failed to decode or played opaque.

Why does my transparent video get a black or white background in MP4?

The MP4 has no alpha plane, so the editor fills the transparent area with a color when it exports. Choose a transparent format such as WebM or ProRes 4444 instead.

Does Safari play a transparent HEVC video inside an .mp4?

Not the one we made. Safari 18.6 reported “probably” for the type but then failed to decode the .mp4, while the same stream in a .mov was transparent.

Can I just rename a .mov to .mp4?

We did not test a rename. We rewrapped the stream with ffmpeg, which changes the container’s structure, and that file failed in three browsers.

What is the best format for transparent video on a website?

A VP9 WebM for most browsers, with a HEVC .mov as a second source for Safari. The format comparison has the sizes.

Sources

Primary sources we checked. The date is when we last opened each page.