Introduction
A .hevc, .h265 or .265 file holds H.265 video
exactly as an encoder produced it, with no container. H.265, also called HEVC (High
Efficiency Video Coding) or MPEG-H Part 2, is defined by ITU-T H.265 and ISO/IEC
23008-2. It is the successor to H.264 and needs about
half the bit rate for the same quality, which made it the usual codec for 4K and HDR
video.
Like a raw H.264 stream, the file has no audio, no index and usually no timestamps. It is used for testing and as a step before the video is put into an MP4, MOV or MKV file.
Structure
The stream uses the Annex B byte stream format: NAL units, each preceded by the start
code 00 00 01 or 00 00 00 01, with emulation prevention
bytes inserted as in H.264. Unlike H.264, each NAL unit has a 2-byte header: a
forbidden bit, a 6-bit nal_unit_type, a 6-bit layer ID and a 3-bit
temporal ID plus one.
Common NAL unit types are 32, the video parameter set; 33, the sequence parameter set; 34, the picture parameter set; 19 and 20, IDR slices where decoding can start; 21, a clean random access slice; 35, an access unit delimiter; and 39 and 40, supplemental enhancement information. A stream normally starts with the VPS, SPS and PPS.
000 00 00 01 start code, then VPS (type 32)varies…00 00 00 01 start code, then SPS (type 33)varies…00 00 00 01 start code, then PPS (type 34)varies…00 00 01 start code, then an IDR slice (type 19 or 20)varies…slices of the following framesrepeated
Versions
The first edition of H.265 (ITU-T, April 2013; ISO/IEC 23008-2:2013) defined the Main, Main 10 and Main Still Picture profiles. Later versions kept the same bitstream syntax and added to it: version 2 (2014) the format range extensions (4:2:2, 4:4:4, higher bit depths) and the scalable and multiview extensions; version 3 (2015) 3D-HEVC; version 4 (2016) screen content coding and more high throughput profiles; versions 5 to 8 new SEI messages and the Monochrome 10 and Main 10 Still Picture profiles; version 9 levels 6.3 to 7.2 and 8.5; versions 10 and 11 (January 2026) more multiview profiles and SEI messages taken from ITU-T H.274. A file says which features it needs through its profile and the extension flags of its parameter sets, not through a version number.
Reference
- Byte stream – start codes, emulation prevention and the bit syntax
- NAL units – the two-byte header, every type from 0 to 63, picture types and access units
- Video parameter set – every field, layer sets and timing
- Sequence parameter set – every field, sizes, scaling lists, reference picture sets and extensions
- VUI and HRD – aspect ratio, colour codes, timing and the buffering model
- Picture parameter set – every field, tiles and extensions
- Slice header – slice types, reference lists, weights and entry points
- Slice data – coding tree units down to residual coefficients
- CABAC tables – every context initValue, binarisations, context selection and the decoder tables
- SEI messages – framing, every payload type and the common message fields
- SEI message fields – the syntax and codes of every other Annex D message
- Profile, tier and level – every
general_profile_idc, the constraint flags and the level table - Multi-layer (MV-HEVC, SHVC) – Annexes F to H: VPS extension, representation formats, layer SPS and PPS extensions, colour mapping, slice header additions and the layer SEI messages
- 3D-HEVC – Annex I: VPS, SPS and PPS 3D extensions, depth look-up tables, coding unit additions and their CABAC contexts, the 3D Main profile
Not described
The reference pages follow ITU-T H.265 (01/2026, version 11), which is free to read.
Known, not yet covered
- Reference: the decoding processes of clauses 8 and 9 and of Annexes F to I (layer output, POC reset, inter-layer reference derivation, resampling, 3D prediction tools), sub-bitstream extraction (F.10) and the hypothetical reference decoders of Annex C and F.13.
- Reference: the level tables of Annexes G, H and I (G.11.2, H.11.2, I.11.2), the profile constraints of the Multiview Extended, format range and high throughput scalable forms, the wedgelet table process (I.6.6) and Table A.10 of profile factors.
- Reference: the semantics of the multi-layer extensions of the scalable nesting and decoding unit information SEI messages, and the H.274 messages not yet written (neural-network post-filter, digital signature, generative face video, object mask, text description, packed regions, image format metadata; see SEI messages).
- Viewer: there is no HEVC viewer plugin yet; the explorer shows a raw stream as bytes.
Links
Software
- FFmpeg and ffplay – command-line tools that play, write and wrap raw HEVC streams (Windows, macOS, Linux)
- VLC media player – free media player that plays raw HEVC files (Windows, macOS, Linux)
- mpv – free, minimal media player (Windows, macOS, Linux)
- x265 – free HEVC encoder that can write raw streams (Windows, macOS, Linux)
- GPAC and MP4Box – tools that put raw streams into MP4 (Windows, macOS, Linux)
Developers
- libavcodec – FFmpeg’s codec library, which decodes HEVC (C)
- libde265 – an open HEVC decoder (C++)
Reference
- ITU-T Recommendation H.265 – the standard, with the byte stream format in Annex B
- RFC 7798 – RTP payload format for HEVC, with the NAL unit header and the aggregation and fragmentation types
- cbs_h265_syntax_template.c – FFmpeg’s field-by-field syntax of the parameter sets, slice header and SEI