.H264

H264 File

Raw H.264 / AVC Video Elementary Stream
Ask a question
QUICK ANSWER

An .h264 (or .264) file is a raw H.264 video stream - pure compressed video with no container, no audio, and no timing info, typically exported by a CCTV camera or DVR. VLC media player can usually play it directly. To make it work everywhere, remux it into MP4 with ffmpeg: ffmpeg -i in.h264 -c copy out.mp4 - no quality loss, no re-encoding.

Developer: ITU-T / ISO-IEC (H.264/MPEG-4 AVC); written by CCTV DVRs, cameras and encoders Category: Video Files Open standard MIME: video/h264
OPENS ON Windows macOS Linux
Related: .DAV · .MKV · .MP4 · .VOB

On this page

19k+ extensions indexed
Last reviewed Jul 24, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

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: LOW

A 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 nutshell
FULL NAMERaw H.264 / AVC Video Elementary Stream
DEVELOPERITU-T / ISO-IEC (H.264/MPEG-4 AVC); written by CCTV DVRs, cameras and encoderssince H.264/AVC standard finalized 2003 (ITU-T Rec. H.264 / ISO/IEC 14496-10)
CATEGORYVideo Files
MIME TYPEvideo/h264
TYPERaw H.264 elementary stream (no container, no audio, no timing metadata)
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
00010203
HEX
00000001
ASCII
····
A raw H.264 stream is a sequence of NAL units separated by the start-code prefix 00 00 00 01 (or the 3-byte 00 00 01). The first NAL is usually an SPS (byte 0x67) then PPS (0x68). This is NOT a container signature - there is no ftyp/RIFF/box header, no audio and no duration, which is why players that expect a container often refuse the file.

Programs that open H264 files

Windows2 apps
VLC media player Open-source Drag the .h264/.264 onto VLC; if it won't play, set Preferences → Input/Codecs → Demuxers → 'H264 video demuxer'.
FFmpeg Open-source Remux losslessly: 'ffmpeg -i in.h264 -c copy out.mp4' (add '-r 25' if there's no timing). Use out.mkv if MP4 errors.
macOS2 apps
VLC media player Open-source Open the raw stream in VLC; for sharing, remux to MP4 with ffmpeg.
FFmpeg Open-source 'ffmpeg -i in.264 -c copy out.mp4' wraps the stream in a container without re-encoding.
Linux2 apps
VLC media player Open-source Play directly, or use mpv; remux with ffmpeg for a portable file.
FFmpeg Open-source 'ffmpeg -i in.h264 -c copy out.mp4' - the standard remux on Linux.

Technical details

deep spec
File structureRaw H.264 NAL unit sequence; no container wrapper, no audio track, no timing metadata
Magic bytes00 00 00 01 (4-byte NAL start-code prefix) or 00 00 01 (3-byte short variant) at offset 0
MIME typevideo/h264
First NAL unitsSPS (0x67) → PPS (0x68) → IDR/slice NAL units - define resolution, profile, and encoding parameters
Audio trackNone - audio must be muxed separately into a container format
Timing / seek indexNone - 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 producersCCTV DVRs, IP cameras, surveillance systems, hardware encoders and transcoders
Supported profilesBaseline, Main, High, High 10, High 4:2:2, High 4:4:4 Predictive
Maximum resolutionUp to 8192 × 4320 px at Level 6.2
Chroma subsampling4:2:0 (standard), 4:2:2 and 4:4:4 supported in extended profiles
Bit depth8-bit (most common); 10-bit and 12-bit available in High 10 and Hi422P profiles
Container alternativesMP4 (.mp4), Matroska (.mkv), MPEG-TS (.ts), AVI (.avi)
Compression methodDCT-based inter/intra-frame prediction with motion compensation and in-loop deblocking filter
ReleasedH.264/AVC standard finalized 2003 (ITU-T Rec. H.264 / ISO/IEC 14496-10)
Open standardYes · royalty-free
Specificationwww.itu.int

H264 conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with H264 files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about H264 files.

Frequently asked questions

How do I play an .h264 file?
Use VLC media player - it plays raw H.264 streams directly (if needed, pick the 'H264 video demuxer' in Preferences). Most other players fail because the file has no container.
How do I convert .h264 to MP4?
Remux it with ffmpeg: 'ffmpeg -i input.h264 -c copy output.mp4'. This wraps the existing video in an MP4 container with no re-encoding and no quality loss. Add '-framerate 25' if playback speed is wrong.
Why is there no sound in my .h264 file?
A raw H.264 stream is video only - it carries no audio track by design. If your CCTV recording had audio, it was either a separate file or in a different container export.
Why won't my .h264 file open in Windows Media Player?
It's a raw elementary stream with no container, which WMP can't read. Open it in VLC, or remux it to MP4 with ffmpeg first; then it plays in any player.
My converted .h264 plays too fast or too slow - how do I fix it?
The raw stream has no timing info, so the muxer guessed the frame rate. Re-remux specifying it: 'ffmpeg -framerate 25 -i in.h264 -c copy out.mp4' (use your camera's actual fps).
What's the difference between .h264 and .mp4?
.h264 is the raw video codec stream by itself; .mp4 is a container that holds H.264 video plus audio, timing and metadata. Putting the .h264 into an MP4 (remuxing) is what makes it a normal, playable video.

References

1ITU-T H.264 - Advanced video codingwww.itu.int
2VideoLAN - VLC media playerwww.videolan.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.JPGJPEG Image
4.DATProgram Data File (generic)
5.EXEWindows Executable (Portable Executable)
6.PARTPartial Download File
7.RPMSGRestricted Permission Message
8.JSONJavaScript Object Notation file
9.ICSiCalendar data file
10.BINCD/DVD Disc Image (BIN/CUE)

Related extensions

.DAVDVR365 / Dahua DVR Video File (DHAV stream)
.MKVMatroska Video
.MP4MPEG-4 Part 14 Video File
.VOBDVD Video Object File
.264Raw H.264 / AVC Video Elementary Stream (DVR/CCTV export)
.SWFSmall Web Format (Shockwave Flash)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z