Processed on this device
File formats at a glance.Formats

MP4 file: container, codecs and device compatibility

.mp4

MP4 is a widely used media container for video, audio, subtitles and metadata. Whether a specific file plays depends not only on the extension but mainly on the video and audio codecs stored inside it.

Format at a glance

Full name
MPEG-4 Part 14 Media Container
File extensions
.mp4
MIME types
video/mp4
Category
Video
Compression
Depends on the contained codec
Transparency
Not applicable
Animation
Not applicable
Properties
Multiple media tracks, Subtitles, Chapters

Suitable tools

What is this format?

MP4 is based on the ISO Base Media File Format and organizes tracks, timing information and metadata in boxes. The container does not compress pictures itself; it packages audio and video streams that have already been encoded.

H.264 with AAC is the best-known compatible combination. MP4 may also carry HEVC, AV1, MPEG-4 Part 2 and other codecs whose support varies between browsers, operating systems and devices.

What is it used for?

  • Video captured by phones and cameras
  • Downloads, presentations and general video exchange
  • Web video using H.264 and AAC
  • Media libraries with thumbnails and metadata

Which programs can open it?

  • VLC, mpv and other media players
  • Windows Media Player and QuickTime Player
  • DaVinci Resolve, Adobe Premiere Pro and many editors
  • Current browsers when the codec combination is supported

Support across devices and browsers

Windows

H.264/AAC is broadly supported; HEVC or AV1 may require an available system codec.

macOS

QuickTime and Safari support common MP4 combinations, particularly H.264 and HEVC on suitable devices.

Linux

VLC is flexible, while browser support depends on the distribution and available codecs.

Android

H.264/AAC is nearly universal; newer codecs depend on the device.

iOS

H.264/AAC and HEVC on suitable hardware are broadly supported.

Browsers

The extension is not enough: the browser must support every audio and video codec in the file.

Advantages

  • Very broad hardware and software compatibility
  • Can bundle video, audio, subtitles and metadata
  • Suitable for streaming and downloads with compatible codecs

Disadvantages

  • Codec support cannot be inferred from the extension
  • Patent and system-codec availability can matter for H.264 or HEVC
  • Not every conversion path preserves multiple audio and subtitle tracks

Comparison with alternatives

MP4 vs. WebM

WebM uses web-oriented codecs such as VP9 and Opus; MP4 is often more compatible with devices and traditional video software.

MP4 vs. MKV

MKV is more flexible with tracks, subtitles and codecs, while hardware players and phones accept MP4 more often.

MP4 vs. MOV

MOV is closely associated with Apple and production workflows; MP4 is usually more universal for distribution.

LocalFileLab support

InputSupported

MP4 is read locally through browser media features or FFmpeg/WebAssembly; the specific decoder remains codec-dependent.

OutputSupported

Configured MP4 outputs include H.264 or MPEG-4 video and AAC or MP3 audio, depending on the selected settings.

CompressionSupported

CRF, dimensions, frame rate, video codec and audio settings can be changed locally.

PreviewSupported

A local preview is available when the browser can play the contained codec combination.

MetadataSupported

Metadata can be retained when configured, but multiple audio tracks, chapters and subtitles are not fully represented.

Container and codecs

The LocalFileLab statements below come from the FFmpeg/WASM and WebCodecs paths actually configured in the repository. Decoders or tracks not explicitly evidenced in code are marked unverified.

Container
MP4
Typical video codecs
H.264 / AVC, H.265 / HEVC, AV1, MPEG-4 Part 2
Typical audio codecs
AAC, MP3, ALAC, AC-3
CodecTypeInputOutputNotes
H.264 / AVCVideoUnverifiedSupportedThe project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. WebCodecs is probed at runtime and FFmpeg/WASM remains the fallback.
H.265 / HEVCVideoUnverifiedSupportedThe project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. Playback may require a matching browser or system codec.
AV1VideoUnverifiedNot supportedThe project does not enumerate the FFmpeg/WASM input decoder per codec. This codec is not offered as an output for this container.
MPEG-4 Part 2VideoUnverifiedSupportedThe project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository.
AACAudioUnverifiedSupportedThe project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. WebCodecs is probed at runtime and FFmpeg/WASM remains the fallback.
MP3AudioUnverifiedSupportedThe project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository.
ALACAudioUnverifiedNot supportedThe project does not enumerate the FFmpeg/WASM input decoder per codec. This codec is not offered as an output for this container.
AC-3AudioUnverifiedNot supportedThe project does not enumerate the FFmpeg/WASM input decoder per codec. This codec is not offered as an output for this container.
Text and subtitle tracksSubtitleUnverifiedNot supportedThis track is not mapped explicitly during export.

Tracks and metadata

Subtitle tracks
Unverified
Multiple audio tracks
Not supported
Chapters
Unverified
Metadata
Configurable

Known combinations

H.264 / AVC + AACBrowser-dependent

A concrete FFmpeg/WASM encoder is configured in the repository. WebCodecs is probed at runtime and FFmpeg/WASM remains the fallback.

H.265 / HEVC + AACBrowser-dependent

A concrete FFmpeg/WASM encoder is configured in the repository. Playback may require a matching browser or system codec.

AV1 + OpusNot supported

This codec is not offered as an output for this container.

Related formats

Frequently asked questions

Is MP4 a video codec?

No. MP4 is a container. The video inside may be encoded with H.264, HEVC or MPEG-4 Part 2, among other codecs.

Why do some MP4 files fail in a browser?

The browser may recognize the MP4 container but still need working decoders for every contained audio and video codec.

Which MP4 combination is most compatible?

H.264/AVC video with AAC audio is particularly widespread across current and many older devices.