Education7 min read

Best File Formats for Online Video and Audio

Written and reviewed by Aman Kumar

"Just use MP4" is the advice most people get, and it is not wrong exactly — but MP4 is a container, not a format in the way most people mean it, and the codec inside that container is what actually decides quality, file size and compatibility. Choosing formats properly means picking a container and a codec together, for a specific purpose: archiving, streaming, editing or sharing. Get the pairing wrong and you either waste storage, lose quality you cannot get back, or hand someone a file their device refuses to open.

Containers vs Codecs: The Distinction That Confuses Everyone

A container (MP4, MKV, WebM, MOV) is a wrapper that holds video, audio, subtitle and metadata streams together and defines how a player finds and syncs them. A codec (H.264, H.265, AV1, AAC, Opus) is the actual compression algorithm that turns raw pixels or audio samples into a smaller stream of data. The same container can hold different codecs — an MP4 can carry H.264 or H.265 video with AAC or AC-3 audio — which is why two MP4 files of the same length can differ wildly in size and in which devices can play them.

Video Codecs Compared

H.264 (AVC)

The safest default. Every browser, phone and smart TV made in the last decade decodes H.264 natively, often with hardware acceleration. At 1080p, a reasonable bitrate for good quality is 8–12 Mbps for fast-motion content and 5–8 Mbps for talking-head or screen-recorded material. It is the least efficient of the modern codecs by file size, but the most universally compatible.

H.265 (HEVC)

Roughly 40–50% smaller than H.264 at equivalent visual quality, which matters a lot at 4K where H.264 files get enormous. The trade-off is compatibility: older Android devices, some Windows setups without a codec pack, and most web browsers other than Safari either cannot play it or need licensing that complicates open publishing. Good choice for archiving your own 4K footage; risky choice for a file you are sending to someone else to play in a browser.

AV1

Royalty-free and more efficient again than H.265 at high resolutions, AV1 is what YouTube, Netflix and most CDNs now transcode content into for delivery. Encoding AV1 yourself is still noticeably slower than H.264 or H.265 on the same hardware, so it suits pre-processed delivery copies more than a working project file you will re-edit repeatedly.

A Rough Bitrate Reference by Resolution

    • 480p — 1–2.5 Mbps, fine for mobile data and voice-led content.

    • 720p — 2.5–5 Mbps for typical content, up to 7.5 Mbps for high-motion footage.

    • 1080p — 5–8 Mbps standard, 8–12 Mbps for action/sports.

    • 4K (2160p) — 25–45 Mbps with H.264, roughly half that with H.265 for the same visual result.

These numbers matter directly for anyone uploading over a limited connection: a 10-minute 1080p clip at 8 Mbps is roughly 600MB, while the same clip re-encoded at 4 Mbps drops to around 300MB with only a modest, often unnoticeable, quality difference for talking-head content. If bandwidth is your constraint rather than storage, our guide on optimising video files for faster sharing walks through picking a bitrate for the connection at the other end.

Audio Codecs Compared

    • AAC — the standard lossy codec for video containers; 128kbps is acceptable for speech, 192–256kbps recommended for music.

    • MP3 — older, slightly less efficient than AAC at the same bitrate, but still the most universally playable audio-only format across old hardware, car stereos and basic media players.

    • Opus — the most efficient lossy codec available today, outperforming both MP3 and AAC at low-to-medium bitrates. It is the default inside WebM and is excellent for voice and podcast-style content, but it is not supported by some legacy devices.

    • FLAC — lossless compression, roughly half the size of an equivalent WAV with zero quality loss. The right choice for archiving master audio or music you plan to edit again later.

    • WAV/PCM — uncompressed, largest files, but the format of choice mid-production because it has no encode/decode overhead and no generational quality loss when passed between editing tools.

Container Choice by Use Case

MP4

The default for delivery: near-universal playback, supports H.264/H.265/AV1 video with AAC audio, and is what almost every platform expects for upload. If you are unsure what to pick, MP4 with H.264 and AAC is the format that will open correctly on the widest possible range of devices without conversion.

MKV

Built for flexibility rather than compatibility: it can hold multiple audio tracks, multiple subtitle tracks and almost any codec, which makes it popular for archiving footage with alternate language tracks or commentary. Not all platforms accept direct MKV upload, so treat it as a working/archive format rather than a delivery one.

WebM

An open, royalty-free container built around VP8/VP9/AV1 video and Vorbis/Opus audio, widely used for web embeds because it tends to produce smaller files than MP4 at similar visual quality, at some cost to compatibility with non-browser software.

MOV

Apple’s container, near-identical in capability to MP4, commonly the default export from iPhones and Final Cut. Convert to MP4 for anywhere outside the Apple ecosystem to avoid playback surprises on Windows or Android devices.

Practical Conversion Commands

Re-encode an MOV from an iPhone into a broadly compatible MP4:

ffmpeg -i input.mov -c:v libx264 -crf 20 -preset slow -c:a aac -b:a 192k output.mp4

The -crf value controls quality directly rather than targeting a fixed bitrate — lower numbers mean higher quality and larger files; 18–23 is the useful range for most footage, with 18 being visually close to lossless and 23 being a reasonable web-quality compromise.

Convert a lossless FLAC archive down to a smaller MP3 for a mobile device:

ffmpeg -i master.flac -c:a libmp3lame -b:a 256k output.mp3

Common Mistakes

    • Uploading H.265 content somewhere expecting universal browser playback and finding a chunk of visitors see a black box.

    • Re-encoding an already-compressed file at a higher bitrate, assuming it restores lost quality — it does not; quality lost to lossy compression cannot be recovered by re-encoding at a higher setting.

    • Archiving finished, distributed copies (MP4/H.264 at delivery bitrate) instead of keeping a higher-quality master, then having nothing better to re-export from later.

    • Choosing WAV for long-term storage of music purely out of caution, when FLAC gives identical quality at roughly half the disk space.

If you regularly need to move between these formats without installing desktop software, the video converter and audio converter tools on this site handle container and codec conversion entirely in the browser, which is enough for the vast majority of one-off format questions covered above.

Choosing a Frame Rate Alongside Your Codec

Format choice does not stop at codec and container — frame rate affects both file size and how footage feels. 24fps gives a cinematic look and is standard for scripted video; 30fps is the safe default for general online content and screen recordings; 60fps is worth the extra file size only for fast motion such as sport, gaming or action footage, since it roughly doubles the data needed for the video stream compared with 30fps at the same bitrate. Mixing frame rates within one project by re-encoding clips to match, rather than leaving a jarring speed mismatch, is one of the more overlooked steps in a clean final export.

Related Articles