Skip to content
ع
Tutorials

Video Formats and Conversion: Containers vs Codecs and Which Format to Choose

A video that plays on your phone but not your TV isn't broken; the issue is usually the container or the codec. Understanding the difference saves hours of trial and error.

Ahmad Khreiswebmaster5.0(2)
Published Updated 14 min read
Illustration for the article: Video Formats Explained: MP4, MOV, WebM, MKV — Which to Choose and How to Convert

You've surely met a video that plays on your phone but not your TV, or a file a platform rejects on upload. The cause usually isn't a broken file but differences in video formats and what's inside them. Our Video Converter converts between common formats in your browser, but understanding the basics helps you choose the right format from the start.

Key takeaways

  1. 1The format (container) is a wrapper holding video, audio and subtitle tracks.
  2. 2The codec is how the picture and sound inside are compressed, and the device must support it.
  3. 3MP4 with H.264 video and AAC audio is the most compatible choice.
  4. 4Every re-encode loses a little quality, so convert from the original file.

Video formats: what's inside a video file?

A video file is like a box: the container is the box itself, and inside are separate tracks, each with its own codec:

What's inside an MP4 file?

The MP4 container
  1. Video track

    Compressed with a codec such as H.264, H.265 or AV1

  2. Audio track

    Compressed with a codec such as AAC

  3. Subtitles

    Accompanying text that can be shown or hidden

  4. Metadata

    Duration, dimensions and recording date

A device must understand the container and every codec inside it; if it doesn't support the video codec, it rejects the file even though the container is familiar.

Mozilla's MDN covers the containers and codecs browsers support in its guide to media on the web, a useful reference if you publish video on your own site.

An illustrative example: two files called MP4

Two files both end in .mp4; one plays on every device and the TV refuses the other. The container is the same, but the codec inside differs: the first uses H.264, supported almost everywhere, and the second uses a newer codec such as HEVC that not every older device supports. The extension only tells you the container, not what's inside it.

1. Comparing common formats

FormatBest forNotes
MP4Sharing, uploading and playing anywhereThe widest compatibility, especially with H.264 and AAC
WebMThe webOpen, using codecs such as VP9 and AV1
MOVThe Apple ecosystem and editingCommon from Apple devices; may need converting for others
MKVArchiving and multiple tracksHolds several audio and subtitle tracks; less supported on some devices
AVIOld filesAn old format best converted to MP4

Which format for which use?

For general sharing and sending video to people whose devices you don't know: MP4 with H.264. For video on your own site: MP4, optionally with a WebM version for browsers that support it, to cut file size. For archiving and later editing: keep the original at the highest quality available and only convert when needed, because every conversion with a lossy codec loses quality you can't get back. Choosing video formats by purpose saves a lot of trouble later.

2. Why does a device refuse to play a video?

Unsupported codec

The container is familiar but the video codec inside isn't supported, such as a new codec on an old TV.

Unsupported container

A format like MKV on a device that can't read it.

Resolution or frame rate too high

A 4K file on a device supporting lower resolution.

Size over the platform limit

The platform rejects the file for its size, not its format.

3. How to choose and convert safely

  1. 1
    Decide the destination first

    The platform or device that will show the video decides the format.

  2. 2
    Choose MP4 when in doubt

    With H.264 video and AAC audio for the widest compatibility.

  3. 3
    Convert from the original

    Using the Video Converter, not a previously converted copy.

  4. 4
    Adjust the size

    Compress with the Video Compressor or change dimensions with the Video Resizer.

Before converting your important files, remember this rule:

Privacy when converting

Some conversion websites upload your video to their servers for processing, and the video might be an internal meeting or personal footage. Choose tools that run in the browser on your own device when the content is private, or read the privacy policy to find out when files are deleted. And always keep a copy of the original before converting.

Common mistakes with video formats

Renaming instead of converting. Renaming a file from .mov to .mp4 doesn't change what's inside, and may stop it playing at all. Real conversion re-encodes the file or moves it into a new container.

Converting over and over. Each conversion with a lossy codec loses some quality. Always convert from the original file, not from an earlier converted copy.

Ignoring the audio. Sometimes the picture plays but the sound doesn't, because the audio codec isn't supported. Check the audio codec too, and choose AAC when compatibility matters most.

Uploading huge files to your website. A video of hundreds of megabytes on a web page slows it down dramatically. Compress it to the resolution it will actually be shown at, or host it on a video platform and embed it.

Assuming newer always means better. Newer codecs compress more efficiently, but if your audience's devices can't play them, the saving is worthless. Match video formats to the people who will watch, and keep a widely compatible version available.

Resolution and bitrate: what really decides file size

A video's file size depends mainly on its bitrate, the amount of data per second, more than on the format itself. A 1080p video with a high bitrate can be larger than a 4K video with a low one. So when you want a smaller file, first lower the resolution to suit the screen it will be shown on, then reduce the bitrate gradually while checking quality by eye, especially in fast-moving scenes, where artefacts appear first.

Common situations and fixes

An iPhone MOV won't play on a client's PC: convert to MP4 — fast if it's H.264; HEVC may need re-encoding for older devices. A platform rejects MKV: convert to MP4. A long video too big for WhatsApp: compress it and drop to 720p. You only need a lecture's audio: extract it as MP3. Default to MP4 with H.264 and AAC unless you have a clear reason not to.

Conclusion

A video format is a container, holding tracks that each have a codec, and the device must support both. Choose MP4 with H.264 and AAC when in doubt, convert from the original and adjust the size for the destination. To optimise video for the web and social media, read our video compression guide, and to make a tutorial, read our screen recording guide.

Frequently asked questions

What's the difference between a format and a codec?

The format or container, such as MP4, is the wrapper holding the tracks; the codec, such as H.264, is how the picture inside is compressed. A device must support both.

What's the most compatible format?

MP4 with H.264 video and AAC audio is the most compatible with devices, browsers and platforms.

Does converting lose quality?

Re-encoding with lossy compression loses a little quality each time, so convert from the original file when possible and avoid repeated conversions.

What's the best format for uploading to social media?

MP4 with H.264 video and AAC audio is the most widely accepted on most platforms. Before uploading, check each platform's limits on file size and duration and its preferred aspect ratio; vertical video, for example, suits stories and short clips better than landscape.

Why is a video sometimes larger after converting?

Because the new codec may be less efficient than the original, or the conversion quality settings are higher than the source. Converting can't add quality that wasn't there, so choose settings close to the original, or lower, when the goal is a smaller file.

Sources & references

  1. MDN Web Docs — Media container formats
  2. MDN Web Docs — Web video codec guide
Ahmad Khreis

About the author

webmaster

I believe technology is useful when it solves a clear problem — not when it's adopted because it's trendy. AI is a powerful tool for speeding up research, writing, analysis and automation, but it needs human expertise to review, guide and verify accuracy. That's why I prefer to start by understanding the business and its goals, then choose the simplest solution that delivers a measurable result, and build audience trust with honest, useful content.

Reader rating
5.0(2)
Published articles
82
  • #video formats
  • #MP4
  • #WebM
  • #video converter
  • #codecs
Share

How would you rate this article?

Be the first to rate

Comments

No comments yet. Share your thoughts!

Leave a comment

Related articles