Video Formats Is There a Best Video File Format? 10 Top Video Formats 5 Ways to Change Videos to Any Format Lossless Video Format: 7 Popular Formats and How to Choose All You Need To Know About MP4 To MOV Conversion Choosing Your Codec: AVC (H.264) vs. HEVC (H.265) Decoding the Future: x264 vs. x265 Mastering HEVC: The Future-Ready Video Compression Standard Pixel Perfect: H.264 VS H.265 Explained FFmpeg: Features, Use Cases, and Pros/Cons You Should Know VP9 vs. H.264 What Are Container File Formats (Media Containers)? VP8 vs VP9: 8 Key Differences and How to Choose What Is the M4A Format? | M4A vs. MP3 vs. WAV What Is MPEG-DASH? And MPEG-DASH vs. HLS What Are Video Subtitles? Common Formats and Best Practices H.264 Video Encoding: How It Works, Benefits, and 9 Best Practices QuickTime File Format (MOV): Apple’s MPEG-4 Predecessor MP4 Format (MPEG-4 Part 14): How It Works, Pros and Cons MKV Format: How It Works and How It Compares to MP4 AVI Format: Should You Still Use AVI? Windows Media Video (WMV) Format: What You Should Know HD Format: History of HD Video and 8 Formats You Should Know M4V Format: How It Works and MP4 vs. MPV FLV Format: Security Concerns and 5 Reasons to Switch to MP4 Top Six Web-Video Formats of 2024 What Is Video Transcoding? Video Frame Rates Explained Along With Tips for Picking the Right FPS A Primer on Video Codecs Open-Source and Royalty-Free AV1 Compresses Video Efficiently and Effectively Convert Video Formats: Six Essential Features of Video-Conversion Tools OGG Format: An In-Depth Look WebM Format: Basic Facts, Compatibility, and WebM vs. MP4

MP4 Format (MPEG-4 Part 14): How It Works, Pros and Cons

mp4 format

What Is the MP4 Format?

MP4 is a popular video format used to share, download, and stream video content. In addition to video, the format can store audio, images, and also subtitles. It is a container format, meaning it can store various types of audio and video, as long as they are encoded in a codec supported by the MP4 format.

MP4 provides strong compression, which is lossy but retains high video quality. This makes it highly suitable for streaming and downloading videos over the Internet. It can package multiple media types including video, audio, images, and 3D imagery, together with complex metadata, making it possible to deliver navigation and other interactive elements to viewers.

MP4 stands for MPEG-4 Part 14, and is based on the QuickTime File Format (.mov). Its first version (named MPEG-4 Part 12) was released in 2001, and the current version (Part 14) was released in 2003.

In this article:

What is the difference between MP4 and MPEG-4?

The terms MP4 and MPEG-4, though often used interchangeably, are two different concepts.. MP4, formally known as MPEG-4 Part 14, is a digital container format used to store audio and video files. On the other hand, MPEG-4 is a method of defining compression of audio and visual (AV) digital data and refers to the standard for encoding the media content that resides within such container files.

In simpler terms, the MP4 container is like a package that holds media content, while MPEG-4 is the encoding standard, similar to the specific formulation or type of content inside the package. So, when discussing an MP4 file, it’s referring to the container itself, whereas MPEG-4 refers to the compression and encoding method utilized to create the media within the container.

MP4 File Format Versions

The MP4 file format began with MPEG-4 Part 14, an instance of the ISO/IEC 14496-12:2004 format based on the QuickTime file format. The only difference is MPEG-4 Part 14’s official support for MPEG features like initial object descriptors (IODs). The first version of the MPEG-4 file format (ISO/IEC 14496-1:2001), released in 2001, was revised from the 1999 specification, MPEG-4 Part 1: Systems.

MPEG-4 Part 14: MP4 (ISO/IEC 14496-14:2003), or version 2 of the MPEG-4 file format, replaced version 1 in 2003. It used the structure defined by the ISO base media file format (ISO/IEC 14496-12:2004). Extensions over the ISO format enabled support for MPEG-4 features like visual and audio codecs (other ISO-based formats also use these extensions).

Apple Inc. is the registration authority for identifier values (code-points). It is recommended that codec creators register their code. When a designer creates a specification based on the ISO base media file format, existing specifications can serve as examples and provide definitions. For instance, you can use existing specifications covering a media type’s storage mechanism rather than inventing new definitions.

Structure of MP4 Files

MP4 is a container file format, which does not have a strict structure. It is extensible, meaning that you can define a custom structure and hierarchy for the data in an MP4 file. MP4 files are divided into two sections:

  • Media-related data containing audio and video
  • Metadata such as flags and timestamps

The individual components of an MP4 file are called atoms. The minimal size of an atom is 8 bytes—the first bytes specify the size of the atom and the next 4 bytes specify its type.

Here is the list of the most common atom types used in an MP4 file:

Level Type Description
Root ftyp Specifies the file type, description, and data structures used.
Root pdin Settings for progressive loading and downloading of videos.
Root moov Stores all metadata for the video
Root moof A container with fragments of video content
Root mfra A container that has random access to a video fragment
Root mdat A data container for other media (such as images)
Root ssts/stsc Sample-to-time and sample-to-chunk tables.
Root stsz Sample sizes defining framing for the video.
Root meta Container storing metadata for the MP4 file.
Second-Level mvhd Video header information.
Second-Level trak A container including an individual video track.
Second-Level udta A container holding information about the creator and other information about the track.
Second-Level iods The MP4 file descriptor

mp4 format

MP4 Pros and Cons

Pros of MP4

  • Broadly supported by all common operating systems, consumer electronic devices, and many software media players, including open source players such as VLC.
  • Supports metadata and additional data stored according to the Extensible MetaData Platform (EDP) format, such as subtitles, JPEG or PNG images, and even PDF files.
  • Provides strong compression and has a relatively small file size, making it highly suitable for video streaming and large-scale video storage.
  • Makes it possible to package video content with user navigation options, 3D visuals, and other interactive elements.
  • Provides several variants including .m4a for files that only contain audio, and .m4v for visual bitstreams.

“Video

Cons of MP4

  • MP4 is strictly speaking not a video format—it is a container format. It does not have a native method of processing media, so it relies on codecs. A media player must support these codecs to play an MP4 file. However, due to the huge popularity of MP4, many of its codecs have become standards themselves.
  • Codec compatibility issues can sometimes result in video being out of sync with audio.
  • Playback and editing of MP4 files requires significant processing power, because a file can contain several types of multimedia content and metadata.
  • MP4 compression results in good quality video, but it is still lossy. It is not a suitable choice for very high-definition video.
  • The convenience of the MP4 format has made it possible to illegally distribute copyrighted media content, which is a major problem for publishers.

MP4 Alternatives

AVI vs. MP4

Developed by Microsoft in 1992, AVI is Windows’ standard video format. It uses the DivX codec (as opposed to MP4’s MPEG-4 AVC/H.264 codec). AVI files can provide high-quality outputs if intact because they retain the alpha channel, while MP4 files use different compression codecs to encode and ensure high quality. AVI offers slightly higher quality, but the difference is not noticeable to the bare eye.

AVI has more efficient data compression than other formats, including MP4. However, the average file sizes are enormous (2 or 3 GB/minute), making it unsuitable for uses with limited storage and requiring compression. MP4 is a lossy compression format requiring less storage space, with smaller output files than AVI, and is compatible with more media players.

Related content: Read our guide to the AVI format

MKV vs. MP4

Like MP4, MKV is a popular container format for storing multimedia data and streaming content online. MKV relies on support from the non-profit loi 1901 and has open specifications under a GNU L-GPL personal use license. The patented MP4 format restricts copying with DRM.

MKV stores unlimited content like audi0, video, and subtitles and supports most coding formats (MP4 supports fewer codecs).

Both formats support UHD video resolutions, but only MKV supports lossless audio compression with FLAC. MP4 only allows lossless audio with the less efficient ALAC. However, MKV files are generally larger, and the format is less compatible with mobile devices than MP4. Neither format is inherently better, and the choice should consider the content creator’s individual needs. For instance, MKV is well-suited to ripping DVDs, while MP4 is better for playing video files on an Android device.

Related content: Read our guide to MKV format

WebM vs. MP4

The WebM container format is especially suited to online streaming. It is a Matroska-based, open-source video format developed by Google. It uses royalty-free VP8 encoding (unlike Mp4’s patented H.264). Given its web-centric design, WebM has a higher compression ratio but is lossier than MP4.

MP4 is compatible with more devices, including mobile and desktop, and can also support online streaming on various browsers. Many sites are joining YouTube to support MP4 HEVC files. WebM lacks native support from popular devices and browsers like Safari and iPhone.

The H.264 and VP8 (Vorbis) are two competing compression codecs for HTML5 video files. Google discontinued H.264 support on Chrome in 2011 in favor of VP8, but H.264 remains the leading codec for mobile and web streaming.

Related content: Read our guide to WebM format

Converting Video to MP4 Or WebM With Cloudinary

MP4 is a popular file format supported by most platforms, and WebM is a modern video format that provides advanced compression. Cloudinary can help you automatically convert video files to these modern video formats for faster loading, and an enhanced user experience.

Cloudinary performs the task in the cloud through automation in three steps:

  1. Convert any video to MP4s or WebM through dynamic URLs.
  2. Resize, crop, and transform the videos generated in step 1.
  3. Optimize the transformed videos through a fast content delivery network (CDN).

The conversion capability is available in all Cloudinary plans, including the free tier. Do check it out.

QUICK TIPS
Kimberly Matenchuk
Cloudinary Logo Kimberly Matenchuk

In my experience, here are tips that can help you better utilize and optimize the MP4 format for various applications:

  1. Leverage H.264 codec for universal compatibility
    When encoding videos in MP4, use the H.264 codec. It’s widely supported across platforms and devices, ensuring that your videos play smoothly for the broadest audience. It also provides a good balance between compression efficiency and quality.
  2. Optimize for streaming with adaptive bitrate encoding
    If you’re delivering content over the web, consider using adaptive bitrate streaming (ABR) with MP4. ABR ensures that viewers receive the highest possible video quality based on their network conditions, reducing buffering and improving playback experience.
  3. Use metadata to enhance video searchability and SEO
    Embed metadata in your MP4 files to make your videos more searchable and improve SEO. Include information like title, description, and keywords to help search engines index your content, increasing its visibility and accessibility.
  4. Compress wisely to balance quality and file size
    While MP4 provides strong compression, you should still carefully balance quality and file size. Test different bitrates to find the optimal setting that maintains quality while minimizing the file size, especially for mobile or bandwidth-limited environments.
  5. Ensure codec compatibility across devices
    Even though MP4 is widely supported, different devices may prefer different codecs. For instance, some older devices may not support newer codecs like HEVC. Test your MP4 files on various devices and browsers to ensure compatibility, or consider providing alternative formats if necessary.
  6. Convert legacy formats to MP4 for easier distribution
    If you have content in older formats like AVI or WMV, consider converting these to MP4. This will make your content more accessible and easier to distribute, as MP4 is supported by virtually all modern devices and platforms.
  7. Utilize MP4’s support for subtitles and closed captions
    Embed subtitles or closed captions directly within the MP4 container using compatible formats like SRT or WebVTT. This enhances accessibility for viewers with hearing impairments and can also cater to non-native speakers or those watching in noisy environments.
  8. Take advantage of MP4’s interactive features
    MP4 supports interactive elements like menus and chapter navigation, which can be particularly useful for educational content, tutorials, or presentations. Utilize these features to enhance the user experience and make your videos more engaging.
  9. Regularly update your encoding tools and software
    The tools and software you use to encode MP4 videos should be regularly updated to ensure they support the latest codecs and compression techniques. This will help you maintain the best possible video quality and compatibility with new devices and platforms.
  10. Consider MP4 for archival with proper documentation
    While MP4 is a lossy format, its widespread compatibility makes it a good option for long-term storage of video content. When archiving, ensure that you also store information about the codec, bitrate, and resolution used, to make future conversions or restorations easier.

These tips should help you make the most of the MP4 format, ensuring your video content is high quality, widely accessible, and optimized for performance across different platforms and devices.

Last updated: Aug 31, 2024