What is the H264 file format?
A .h264 file contains video data encoded using the H.264 compression standard, also known as AVC (Advanced Video Coding). Unlike a .mp4 or similar container, a .h264 file is a raw elementary stream - a bare sequence of encoded video data with no container wrapper, no audio track, and no timing metadata. The H.264/AVC standard was officially ratified in 2003 as ITU-T Recommendation H.264 and ISO/IEC 14496-10 (MPEG-4 Part 10).
A raw .h264 stream is structured as a sequence of NAL units, each preceded by a 4-byte start-code prefix (00 00 00 01). Because there is no container header, many players that expect a container - such as .mkv or .avi - refuse the file outright. .h264 files are commonly produced by CCTV DVRs, IP cameras, and hardware encoders.
H.264 codec can also store encoded video inside defined container formats, but those use their own extensions rather than .h264. To open or convert a .h264 file, VLC media player and ffmpeg are the most reliable tools. The companion extension .264 identifies the same raw format.
Security & safety
RISK: LOWA raw .h264 stream is inert video data, not executable, so it's safe to play and remux. Two practical notes: crafted streams have occasionally triggered decoder bugs, so keep VLC/ ffmpeg updated; and because surveillance exports can be evidence, remux with '-c copy' (lossless) rather than re-encoding if you need to preserve the original frames. Online converters upload your footage to a third party - for CCTV/private video, remux locally with ffmpeg.
Format details
in a nutshellPrograms that open H264 files
Technical details
deep spec| File structure | Raw H.264 NAL unit sequence; no container wrapper, no audio track, no timing metadata |
| Magic bytes | 00 00 00 01 (4-byte NAL start-code prefix) or 00 00 01 (3-byte short variant) at offset 0 |
| MIME type | video/h264 |
| First NAL units | SPS (0x67) → PPS (0x68) → IDR/slice NAL units - define resolution, profile, and encoding parameters |
| Audio track | None - audio must be muxed separately into a container format |
| Timing / seek index | None - no duration, timestamps, or random-access index embedded in the file |
| Companion extension | .264 - identical raw elementary stream format used interchangeably by some encoders |
| Common producers | CCTV DVRs, IP cameras, surveillance systems, hardware encoders and transcoders |
| Supported profiles | Baseline, Main, High, High 10, High 4:2:2, High 4:4:4 Predictive |
| Maximum resolution | Up to 8192 × 4320 px at Level 6.2 |
| Chroma subsampling | 4:2:0 (standard), 4:2:2 and 4:4:4 supported in extended profiles |
| Bit depth | 8-bit (most common); 10-bit and 12-bit available in High 10 and Hi422P profiles |
| Container alternatives | MP4 (.mp4), Matroska (.mkv), MPEG-TS (.ts), AVI (.avi) |
| Compression method | DCT-based inter/intra-frame prediction with motion compensation and in-loop deblocking filter |
| Released | H.264/AVC standard finalized 2003 (ITU-T Rec. H.264 / ISO/IEC 14496-10) |
| Open standard | Yes · royalty-free |
| Specification | www.itu.int |
H264 conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about H264 files.