Video Codec Support in Browsers: What Opens, What Doesn't, How to Convert
A video file that won't open in a browser tool is almost never a broken file. The extension (.mp4, .mov, .mkv) only names the container; the codec inside decides whether your browser can decode it, and that depends on the browser and the computer. Before reading on, you can test this browser now: it checks each codec live and decodes a real frame from a file you drop in.
Containers and codecs
| Container | Codecs you'll usually find inside |
|---|---|
| .mp4, .m4v | H.264, HEVC, sometimes AV1 |
| .mov | H.264, HEVC, Apple ProRes |
| .webm | VP8, VP9, AV1 |
| .mkv | Anything: H.264, HEVC, VP9, AV1, MPEG-2… |
| .avi | MPEG-4 Part 2 (DivX, Xvid), Motion JPEG, older codecs |
Two .mov files can behave completely differently: an iPhone .mov holds HEVC, a Final Cut master holds ProRes.
What we measured
Our test script encodes a set of short clips with ffmpeg and opens each one on this site in headless Chrome 148 on an Apple-silicon Mac. Every clip that opened was also checked frame by frame: the stills exported from it were the exact frames asked for.
| Test file | What the site did |
|---|---|
| H.264 High, MP4, with AAC audio | Opened, frame by frame |
| H.264, QuickTime MOV | Opened, frame by frame |
| H.264, Matroska MKV | Opened, frame by frame |
| H.264 MKV whose first frame is at 1.5 s | Opened, frame by frame |
| H.264 High 10 (10-bit) | Opened, frame by frame |
| HEVC Main (8-bit), MP4 | Opened, frame by frame |
| HEVC Main 10, MP4 | Opened, frame by frame |
| HEVC Main 10 tagged HDR (BT.2020, HLG) | Opened, frame by frame |
| H.264 at 29.97 fps (70 s) | Opened, frame by frame |
| H.264 at 23.976 fps (50 s) | Opened, frame by frame |
| VP8, WebM | Opened, frame by frame |
| VP9, WebM | Opened, frame by frame |
| AV1, WebM | Opened, frame by frame |
| AV1, MP4 | Opened, frame by frame |
| H.264 with a variable frame rate | Opened, frame by frame |
| H.264 stored sideways with a 90° rotation flag | Opened, frame by frame |
| Apple ProRes 422, MOV | Refused: “Apple ProRes 422 can't be decoded in this browser” |
| MPEG-4 Part 2, MP4 | Refused: “MPEG-4 Part 2 (DivX/Xvid style) isn't decoded by browsers” |
| MPEG-4 Part 2, AVI | Refused: “The tool can't read this file type. It opens MP4, MOV, M4V, WebM, MKV, MPEG-TS and Ogg files. AVI, WMV and FLV need converting to MP4 first.” |
| Audio only (AAC) | Refused: “This file has no video track (it may be audio only).” |
| Random bytes named .mp4 | Refused: “The tool can't read this file type. It opens MP4, MOV, M4V, WebM, MKV, MPEG-TS and Ogg files. AVI, WMV and FLV need converting to MP4 first.” |
That's one browser on one computer. HEVC in particular depends on the machine: Chrome decodes it through the operating system's decoder, so the same file can open on a Mac and fail on a Linux laptop.
Codec by codec
H.264 (AVC)
The safe choice. 8-bit H.264 in the Baseline, Main and High profiles is the most widely supported video codec on the web and the one to convert to when something won't open. It covers exports from editors, screen recorders and most phones set to "Most Compatible". Camera files in 10-bit or 4:2:2 H.264 (some Sony, Panasonic and Fujifilm modes) are less certain: Chrome decoded our 10-bit 4:2:0 test file, but we haven't tested 4:2:2, and other browsers may refuse both.
HEVC (H.265)
What iPhones record by default ("High Efficiency"), and many Android phones, drones and action cameras. Browsers don't ship their own HEVC decoder; they use the one the operating system and graphics hardware provide. If a tool says it can't decode HEVC, try another browser on the same computer (on a Mac, Safari), or convert to H.264. To avoid it on future iPhone recordings: Settings › Camera › Formats › Most Compatible.
VP8, VP9 and AV1
The web's own codecs, mostly in .webm files: browser and screen recordings, YouTube downloads, video exported for websites. Current Chrome decoded all three in our tests, including AV1 in an .mp4. Older devices may lack AV1 decoding.
Apple ProRes
An editing codec, not a delivery codec. Chrome, Edge and Firefox don't include a ProRes decoder, so a web page can't read ProRes frames in them; our Chrome test refuses it. Safari on a Mac may play ProRes through macOS (we haven't tested it), in which case this site opens it in compatibility mode with approximate frame times. Export an H.264 or HEVC copy at the same resolution and frame rate; its frames line up with the master's.
MPEG-2, MPEG-4 Part 2, DNxHD, Motion JPEG
Older camcorder, DVD, AVI and broadcast formats. Browsers don't decode them. Convert first.
How to find out which codec a file uses
- Drop it on the codec check: it names the container and codec and tries to decode a frame.
- On a Mac, select the file in Finder and choose File › Get Info; the codec is listed under More Info.
- In VLC, open the file and choose Tools › Codec Information (Window › Media Information on a Mac).
- With ffmpeg installed: ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,profile,pix_fmt input.mov
Converting a file that won't open
From your editor, export H.264 in an MP4 at the same resolution and frame rate as the original. That is enough for frame grabs, contact sheets and thumbnails.
With ffmpeg, this keeps the size and frame timing and converts to 8-bit H.264:
ffmpeg -i input.mov -c:v libx264 -crf 16 -preset slow -pix_fmt yuv420p -c:a aac output.mp4
CRF 16 is close to visually lossless; higher numbers make smaller files. Don't add a frame-rate option: changing the frame rate changes which frame sits at which timecode.
Limits that converting won't fix
- Links aren't files. A browser tool can't open a YouTube, Vimeo or Drive link as a video file, and we don't download videos from websites. Use the file you have.
- Protected video (purchased movies, streaming apps) is encrypted and can't be decoded by a web page.
- HDR footage (HLG or PQ, as iPhones record by default) comes out as standard-range stills, so colors can look flatter than in an HDR player. Chrome gave the right frames from our HLG-tagged HEVC test clip, but we haven't compared colors on an HDR display or tested PQ (HDR10) and Dolby Vision files.
- Memory. Very large batches of 4K PNG stills need several gigabytes of space in your browser. JPG is several times smaller.
Back to work
Once the file opens, the frame tool picks frames by interval, count, scene change or by hand and exports stills, contact sheets and thumbnails. For a plain MP4 to JPG conversion, use the simpler converter.
Frame-accurate stills, contact sheets and thumbnails from your own video, made in your browser.