Bilibili Video Formats & Codecs, Explained

You downloaded a Bilibili video and got an MKV — or the file won’t play on your phone. Every video file is a container (the box: MP4, WebM, MKV) holding a codec (how the picture is compressed: H.264, HEVC, AV1). When the box and codec don’t match what your device understands, the file won’t open — even though nothing is broken.

This SaveBili guide explains each container and codec, shows which combos play on iPhone, Android, PC, or smart TV, and tells you exactly which format to pick before you download.

Containers, Explained: MP4, WebM, MKV

A container is just a wrapper: it holds the compressed video, audio, subtitles, and metadata in one file. The wrapper doesn’t change picture quality by itself — it changes what can play the file.

MP4 — the universal default

MP4 is the closest thing video has to a universal language. Phones, tablets, TVs, game consoles, and every major editing app play it natively. If you only remember one rule from this page, make it this one: when in doubt, choose MP4.

WebM — the web-first format

WebM was designed for the open web, typically pairing VP9 or AV1 video with Opus audio. Browsers love it and it compresses well. The catch: native support on phones and older players is patchier than MP4, and some editors handle WebM awkwardly.

MKV — the flexible power wrapper

MKV is an open container that can hold practically any codec combination plus multiple audio tracks and subtitles. So why did you get an MKV? Some pipelines output MKV because it accepts codec pairings that MP4 technically doesn’t support — certain newer codecs or audio streams simply can’t live inside an MP4. If your player handles MKV (most desktop players do), the file is perfectly fine.

If you need an MP4 anyway, look for a remux: it copies the streams into a new MP4 container without re-encoding, so there’s no quality loss. Free tools like VLC or FFmpeg can do it. (Remuxing only works when the streams are MP4-compatible; it won’t fix an unsupported codec.)

The Codecs: H.264, HEVC, AV1, and VP9

While the container is the box, the codec is the compression algorithm that shrinks raw video. Newer codecs make smaller files at the same quality — but need newer hardware to decode smoothly.

H.264 (AVC) — universal compatibility

H.264 is the workhorse of internet video and the safest choice you can make. It is widely documented to play on virtually every device built in the last decade. Files run a little larger than newer codecs produce, but nothing you own will struggle to open them.

HEVC / H.265 — smaller files, newer hardware

HEVC delivers roughly the same quality as H.264 at noticeably smaller file sizes, which is why it’s popular when storage matters. The trade-off is decoding: older phones and budget devices may stutter or fail on it. Recent flagships handle it fine, but “newer” here really does mean newer.

AV1 — newest, best compression, patchy support

AV1 is the newest open codec, with the best compression — files can be considerably smaller than HEVC at similar quality. But support is patchy: many phones, TVs, and editors lack hardware decoding, and software decoding drains batteries. Choose AV1 only after confirming your player handles it.

VP9 — the middle child

VP9 is Google’s open web codec, bridging H.264 and AV1: better compression than H.264, better support than AV1 — but largely eclipsed by both.

Codec choice also interacts with quality — resolution, bitrate, and codec pull in different directions. For a full walkthrough of quality settings, see our Bilibili video quality guide.

The Compatibility Matrix: What Plays Where

The table below summarizes general, widely documented playback behavior — a rule of thumb, not a promise about your specific model. Plays easily means native playback on virtually all devices in that category; needs VLC means a general-purpose player like VLC or MPV usually handles it; won’t play means stock players on many devices in that category commonly fail or stutter.

Codec / container iPhone Android Windows Mac Smart TV Video editors
H.264 in MP4 Plays easily Plays easily Plays easily Plays easily Plays easily Plays easily
HEVC in MP4 Plays easily (newer models) Plays easily (newer devices); needs VLC on older ones Plays easily on modern hardware Plays easily (recent Macs) Mixed — check your model Generally fine, slower on older machines
AV1 in MP4/WebM Won’t play natively on most models — needs VLC Needs VLC on most devices; newer flagships play natively Usually needs VLC or a modern browser Mixed — needs VLC on older Macs Won’t play on most sets Won’t play / unsupported in most editors
VP9 in WebM Needs VLC (no native support) Plays easily on most devices Plays easily in browsers; needs VLC elsewhere Plays easily in browsers; needs VLC elsewhere Mixed Needs VLC / awkward in editors
H.264 in MKV Won’t play in the stock player — needs VLC Needs VLC (some players handle it) Plays easily with VLC or Films & TV Needs VLC (QuickTime won’t) Mixed — many sets support MKV, some don’t Plays easily in most editors

If a file won’t open, check the codec and container in your player’s media info panel first — the fix is usually “open it in VLC” or “pick H.264 MP4 next time,” not a corrupt file. For files that download but won’t cooperate, see our download troubleshooting guide.

A Note on DASH and .m4s Files

A download sometimes arrives as .m4s segments — video-only and audio-only. Bilibili delivers video via DASH (Dynamic Adaptive Streaming over HTTP), splitting picture and sound into separate streams that get combined at playback. They just need multiplexing (merging) into one MP4. The classic symptom is a video with no sound — our no-sound guide explains the fix.

Which Format Should You Choose?

Match the format to your weakest playback device — the oldest phone, the family TV, the editor you’ll cut in:

  • Must play everywhere → H.264 in MP4. Largest files, zero headaches — the right answer for most people.
  • Storage matters, devices are recent → HEVC in MP4. Noticeably smaller files; confirm your phone and TV decode it first.
  • Smallest file, and you know your player → AV1, only after verifying your device handles it.
  • You got an MKV and just want it to play → open it in VLC, or remux to MP4 when the streams are compatible.
  • You’re editing the footage → H.264 MP4 for the smoothest experience; avoid AV1 and WebM in editors.

Format also drives file size alongside resolution and length — estimate before you commit with our Bilibili file size calculator.

Frequently Asked Questions

Why did my Bilibili download come as an MKV instead of MP4?

MKV is a flexible container that accepts codec and audio combinations MP4 can’t hold. Some download pipelines output MKV when the stream’s codec pairing isn’t MP4-compatible. The file isn’t broken — most desktop players handle MKV, and you can remux it to MP4 without re-encoding when the streams allow it.

What’s the difference between a container and a codec?

The container (MP4, WebM, MKV) is the wrapper; the codec (H.264, HEVC, AV1) is the compression algorithm. A file that “won’t play” is almost always a codec your device can’t decode or a container your player doesn’t understand — not a corrupt download.

Which Bilibili download format is best for iPhone?

H.264 in MP4 — it plays natively in the Photos app and every player. HEVC in MP4 also works on newer iPhones with smaller files. Avoid AV1 and MKV for stock apps.

What’s the best format for watching on a smart TV?

H.264 in MP4 — the most universally supported combo on TVs. HEVC support is mixed by model, AV1 support is rare. If your TV rejects a file, remuxing to H.264 MP4 usually fixes it.

Does choosing a newer codec improve quality?

Not exactly. Newer codecs deliver similar quality at smaller file sizes — they don’t create more detail. If file size is no concern, H.264 gives the same visual quality with maximum compatibility. Visible quality depends mostly on resolution and bitrate.

Can I convert an MKV to MP4 without losing quality?

Yes — that’s remuxing: copying the streams into an MP4 without re-encoding. It works only when the streams are MP4-compatible; VLC and FFmpeg do it free. If the codec itself is unsupported, remuxing won’t help — you’d need a full re-encode.

Why does my downloaded video have no sound?

Bilibili serves video via DASH, splitting picture and sound into separate streams. Grabbing only the video stream gives you a silent file. Merging the streams fixes it — our no-sound guide shows how.

What is remuxing, and is it safe?

Remuxing repackages streams into a different container without touching the streams — no quality loss, just a format change. It’s the standard fix when you need an MP4 but got an MKV.

Ready to download in the format that fits your device? SaveBili lets you preview and download Bilibili videos in the format and quality you need — free, no sign-up.

A quick reminder: only download videos you own, created yourself, or have permission to save — your own uploads, Creative Commons content, or videos whose creators allow downloading. Respect copyright and Bilibili’s terms of service.