Audio & Video Format Guide: Containers, Codecs, and How to Choose

2026-08-12

Choosing the right audio or video format is confusing because most people mix up two different things: the container (the file type) and the codec (the compression method). This guide explains both, compares the formats tools.beer supports, and tells you which one to pick.

All of our media tools run 100% in your browser with WebAssembly, so your files never leave your device. See the Media Tools hub for the full list.

1. The key concept: container vs codec

A media file is like a shipping box:

  • Container (the box): MP4, MKV, MOV, AVI, WebM, FLV. It defines how video, audio, subtitles, and metadata are packaged and interleaved together.
  • Codec (the compression): H.264, H.265, VP9, AV1 for video; MP3, AAC, OGG, Opus, FLAC, WAV for audio. It defines how each stream is compressed and decompressed.

The same MP4 container can hold H.264 or H.265 video. That is why "my MP4 won't play on my TV" usually means the codec inside is unsupported, not the MP4 box itself. When you convert, you can keep the container and only change the codec (for example, re-encode H.265 to H.264 while staying in MP4).

2. Audio formats

Audio formats fall into three groups:

  • Uncompressed (WAV): perfect quality, huge files. Used for recording and editing.
  • Lossless compressed (FLAC): perfect quality, about half the size of WAV. Used for archival and audiophiles.
  • Lossy compressed (MP3, AAC, OGG, Opus): discards inaudible data for small files. Used for distribution and streaming.

Audio format comparison

FormatTypeQualitySize per minBrowser supportBest for
MP3LossyGood~1 MB @ 128 kbps100% (all browsers)Universal sharing, podcasts
AACLossyBetter than MP3 at same bitrate~1 MB @ 128 kbps100% (incl. Safari)Apple, YouTube, modern distribution
OGG (Vorbis)Lossy, open-sourceGood~1 MB @ 128 kbpsChrome, Firefox, Edge; limited on Safari/iOSOpen-source projects, games
OpusLossyBest quality per bitSmallestChrome, Firefox, Edge; Safari 15+ limitedVoice, WebRTC, streaming
FLACLosslessPerfect (identical to source)~5 MBChrome, Firefox, Edge, Safari 11+Archival, audiophiles
WAVUncompressedPerfect~10 MB100% (all browsers)Recording, editing master

Format notes

  • MP3 — The legacy standard. Universal compatibility, but less efficient than newer codecs. Great when you need a file that opens everywhere.
  • AAC — The modern lossy standard. At the same bitrate it sounds better than MP3, and it is supported by 100% of browsers including Safari. Default for Apple Music and YouTube.
  • OGG Vorbis — Open-source and royalty-free with quality close to AAC. Well supported in Chrome, Firefox, and Edge, but only partially on Safari/iOS.
  • Opus — The most efficient lossy codec available. Excellent at low bitrates, which is why it powers Discord, WebRTC, and voice chat. Broad support in Chrome/Firefox/Edge.
  • FLAC — Lossless compression: the file is smaller than WAV but bit-for-bit identical to the original. Ideal for music you want to keep forever.
  • WAV — Raw, uncompressed PCM audio. No decoding overhead, so it is the natural choice inside editors and for recording, at the cost of very large files.

3. Video containers

Video containers package one or more video streams, audio streams, subtitles, and metadata.

Video container comparison

ContainerTypeCommon codecs insideBrowser supportBest for
MP4StandardH.264, H.265, AV1, AAC, MP3UniversalWeb, mobile, social, streaming
MKVOpen, flexibleAlmost any codecModerate (players/TVs good, some mobile weak)Archival, multi-language films
MOVAppleH.264, H.265, ProRes, AACApple devices; limited elsewhereEditing on macOS/iOS
AVILegacyDivX, Xvid, H.264, MP3Older devicesMostly obsolete
WebMOpen, webVP8, VP9, AV1, Vorbis, OpusChrome, Firefox, EdgeRoyalty-free web video
FLVObsoleteH.264, VP6, MP3None (Flash discontinued)Legacy only — convert away
GIFAnimation256 colors, no audioUniversalShort looping clips, memes

Container notes

  • MP4 (MPEG-4 Part 14) — The gold standard. Every device, browser, and platform supports it. MP4 with H.264 video and AAC audio is the default output of nearly every camera and the accepted format of every social platform.

  • MKV (Matroska) — The "Swiss Army knife" of containers. Open-source, supports virtually unlimited tracks and advanced subtitles, and can hold almost any codec. Perfect for high-quality archives and movies with multiple audio/subtitle languages, but weaker on some mobile devices.

    What does "virtually unlimited tracks" mean? A video file is really a bundle of independent tracks (streams) packed together — not just "picture + one audio." Take a movie: a single MKV can hold 1 video track + an English 5.1 audio track + a Chinese dub + a Japanese track + a director's commentary track + several subtitle tracks. When you play it (e.g. in VLC) you switch languages or subtitles from a menu, just like a DVD or Blu-ray. MKV is built on EBML (an extensible binary structure), so it can natively hold a large number of tracks — hence "virtually unlimited." By contrast, AVI barely supports multiple audio tracks, and MP4, while it can hold several, is more restrictive and weaker on subtitles. That is why MKV is the de-facto choice for archiving Blu-ray remuxes and multi-language films.

  • MOV (QuickTime) — Apple's format, optimized for macOS and iOS. Supports ProRes for professional editing. Best when you are working inside Final Cut or iMovie.

  • AVI — Microsoft's old format. Simple and widely compatible with legacy systems, but inefficient (large files) and missing modern features like embedded subtitles.

  • WebM — Google's open, royalty-free format built for the web. Uses VP8/VP9/AV1 video and Vorbis/Opus audio. Great browser support (Chrome/Firefox/Edge) and ideal for HTML5 video.

  • FLV — Adobe Flash Video. Flash was retired at the end of 2020, so no modern browser plays FLV. If you have old FLV files, convert them to MP4.

  • GIF — Technically an image format, not video. Limited to 256 colors and no audio, but universally supported for short looping animations. Use MP4 to GIF to make one.

4. Video codecs quick reference

The codec decides compression efficiency and compatibility more than the container does.

CodecWhat it isNotes
H.264 (AVC)The universal video standardPlays everywhere; the safe default
H.265 (HEVC)~50% smaller than H.264 at equal qualityLimited browser support; complex licensing
VP9Google's open codecGood compression, royalty-free; used by YouTube
AV1Newest open codecBest compression, royalty-free, slow to encode, growing hardware support
ProResApple's pro codecHigh quality for editing; large files

5. Which format should I use?

Audio

  • Share online / maximum compatibility → MP3 (128–320 kbps)
  • Better quality, Apple or YouTube → AAC (128–256 kbps)
  • Open-source project → OGG Vorbis
  • Voice, calls, streaming → Opus
  • Keep forever / audiophile → FLAC
  • Record or edit → WAV

Extract audio from a video with the MP4 to MP3 Converter, which can also output AAC and OGG.

Video

  • Maximum compatibility / web / social → MP4 (H.264 + AAC)
  • Archive with many audio/subtitle tracks → MKV
  • Edit on Apple software → MOV
  • Royalty-free web video → WebM
  • Legacy AVI or FLV → convert to MP4

Our converters handle all of these: MOV to MP4, MKV to MP4, WebM to MP4, AVI to MP4, FLV to MP4, and the reverse directions MP4 to MOV, MP4 to AVI, MP4 to WebM, MP4 to MKV.

6. Why browser-based conversion matters

Most online converters upload your file to a server. tools.beer processes everything locally in your browser using WebAssembly (FFmpeg.wasm), so:

  • Your files never leave your device (privacy-first).
  • There is no server queue or upload wait for large videos.
  • Conversion works offline after the page loads.

This is the same FFmpeg engine used in desktop tools, compiled to run in the browser.

Summary

  • A container is the package; a codec is the compression. "MP4 won't play" is usually a codec issue.
  • For audio: MP3 for compatibility, AAC for quality, Opus for voice, FLAC for archiving, WAV for editing.
  • For video: MP4 (H.264) for everything, MKV for archives, MOV for Apple editing, WebM for open web video.
  • Avoid AVI and FLV for new work; convert them to MP4.

Browse all converters on the Media Tools hub.