Tested workflowUpdated September 22, 2026 Reviewed by Dana Brooks

Video Codecs

Video codecs decide whether those moving pixels can be compressed, delivered, and decoded on the screen in front of you.

Start with the file, then test the exact playback path. That order prevents a lot of wasted installs, mystery conversions, and MP4 files that still refuse to open.

Playback diagnostic path
  1. 01Inspect file
  2. 02Test exact sample
  3. 03Check OS and hardware
  4. 04Convert if needed

What is a video codec?

A codec is the method and software used to encode compressed video and decode it again. Cameras and encoders turn raw frames into a practical stream. The decoder reconstructs those frames during playback. That definition codec pages often give you is correct, though it leaves out the part that causes trouble: a working decoder needs the right profile, bit depth, container, and delivery path too.

Five terms keep getting tangled together:

  • Codec. H.264/AVC, HEVC/H.265, VP9, and AV1 describe the compressed video stream.
  • An encoder creates that stream. Two encoders targeting the same codec can produce very different speed and quality results.
  • Decoder means the software or hardware that turns the stream back into frames.
  • The container holds video, audio, subtitles, timestamps, and metadata.
  • Bitrate measures data over time. Resolution and frame rate describe the picture dimensions and cadence.

Codec versus container

An extension is a clue. It isn’t a complete diagnosis.

Container

MP4, WebM, or MKV holds streams and timing data. The extension usually names this outer layer.

Codec

H.264, HEVC, VP9, or AV1 describes how the video stream was compressed and must be decoded.

An MP4 can contain H.264 or HEVC. Renaming the extension leaves that codec unchanged.
File you seePossible video streamPossible audioWhat inspection settles
.mp4H.264, HEVC, sometimes AV1AAC, ALAC, or another trackCodec tag, profile, bit depth, streams
.webmVP8, VP9, or AV1Opus or VorbisExact video and audio codec
.mkvH.264, HEVC, AV1, VP9, and moreMany possibilitiesEverything inside the flexible container

Changing holiday.mov to holiday.mp4 changes the label. The bytes inside stay put. A proper remux moves compatible streams into another container; transcoding decodes and re-encodes them.

Common video codecs

H.264 / AVC

H.264 is the usual starting point for broad playback. Hardware decoding is common, encoding is mature, and MP4 plus H.264 plus AAC covers many browsers and devices. That reach is why the codec keeps showing up long after newer standards arrived.

HEVC / H.265

Is HEVC the same as H 265? Yes. The same standard has two common names. HEVC can deliver strong compression, especially at higher resolutions, while browser support depends heavily on the operating system and available decode path. Run the HEVC test on each target environment.

AV1

AV1 was designed for efficient internet video and royalty-free adoption. Decode support has expanded, including hardware on newer chips, but older devices and editing tools can still be the constraint. Encoding can also demand more time depending on the encoder and preset.

VP9

VP9 is established in web video, particularly inside WebM. Many browsers and devices decode it well. It remains relevant even as AV1 grows because deployed hardware and existing libraries matter more than a spec-sheet win.

A practical trade-off map

H.264Broad playback baseline
HEVCEfficient, ecosystem-dependent
AV1Efficient, encode/decode cost varies
The bars illustrate relative compatibility as a starting point, not a measured market share. Profiles, containers, audio, operating systems, and hardware change the result.

H264 vs HEVC in one minute

Choose H.264 when unknown or older playback targets matter. HEVC becomes attractive in an ecosystem you control, especially when storage or delivery costs matter and you have tested the target machines.

The underlying comparison changes with source material, encoder, preset, quality target, and hardware. Our H264 vs HEVC comparison keeps those conditions visible instead of attaching one percentage to every video ever made.

AV1 vs H265 and H.264

For a modern controlled stack, AV1 or HEVC may reduce bandwidth at a matched visual-quality target. H.264 remains the conservative delivery baseline. Local archives introduce another concern: can tomorrow’s editing and playback tools decode the chosen profile without a slow software fallback?

Read AV1 vs H265 for the 10-bit, hardware, browser, and encoding-cost trade-offs.

Identify and test a file

  1. Open the Video Codec Identifier. It distinguishes the outer container from common codec tags without uploading the file.
  2. If it finds HEVC, run the HEVC / H.265 browser test. That test attempts real playback; a metadata hint alone is weaker evidence.
  3. Check the hardware acceleration guide when playback stutters, drops frames, or behaves differently after a GPU setting changes.
  4. Use the Video Bitrate Calculator to connect bitrate, duration, and file size.

Which codec should you use?

SituationStarting pointVerify before publishing
Broad browser playbackH.264 in MP4Container, MIME type, AAC support, exact browser set
Modern controlled devicesHEVC or AV1Profile, bit depth, hardware decode, battery impact
Web delivery with several renditionsH.264 baseline plus measured alternativesAudience analytics and fallback behavior
Local playbackCodec supported by the intended playerReal device, display path, audio stream
A failed fileInspect firstConvert only after finding the failed layer

“Best” becomes useful only after the audience and quality target are written down. I prefer a boring H.264 fallback for public utilities. It saves support work, even when the newer encode looks nicer on a bandwidth chart.

Fix failed playback by symptom

Retest the same file in the same application after each change. Switching both browser and sample at once hides which variable moved.

Convert only when necessary

Remuxing preserves compressed streams and changes the container. Transcoding creates a new video stream and can lose quality. A browser MIME correction changes the server’s declaration; it cannot teach the browser to decode an unsupported stream.

Keep the original file. Record the source resolution, frame rate, codec, and audio before conversion. Then test the output on the oldest or most restrictive target that matters.

FAQ

Is HEVC the same as H.265?
Yes. HEVC is the name of the standard and H.265 is its ITU-T designation. Applications and file inspectors may use either label.
Is MP4 a codec?
No. MP4 is a container. Its video stream may use H.264, HEVC, AV1, or another codec, and its audio stream has a codec of its own.
Which codec is best for browser playback?
H.264 remains a practical compatibility baseline, but the right choice depends on your audience, container, audio format, operating systems, and device hardware. Test the actual production file.
How can I identify a video codec?
Inspect the file metadata with the local Video Codec Identifier. For a full forensic report, use a desktop analyzer such as MediaInfo.
Why can VLC open a file when my browser cannot?
VLC brings its own demuxers and decoders. A browser uses a different media pipeline that can depend on the operating system, hardware, container, MIME type, and web delivery.