hdrfileformat.txt Take this text file and create a nice html output I can insert in a joomla article on www.drastic.tv It will replace this old one https://www.drastic.tv/support-59/supporttipstechnical/57-dhdr-hdr-yuv-raw-video-format edit Thought for 21.8 seconds Here is a complete HTML document for your Joomla article, replacing the old DHDR HDR file format page. It presents the header specification with clear sections, tables, and code samples.
Drastic software can read many file formats which it does not natively understand. Formats that have a fixed video frame size and are logically organized can be described using the industry standard HDR text file format (NOTE: Not the still image HDR). This page describes the file format.
Drastic Technologies · Technical Note
DHDR / HDR Raw Video File Format
A plain-text header that describes fixed-size raw video frames together with their associated audio and timecode, used by the dtx_HdrYuv.d1x plugin for videoQC, Net-X-Code Server, DTMediaRead, and QuickClip / VVW.
1 Overview
This document describes the header (*.dthdr / *.hdr) file format for use with the Drastic Technologies dtx_HdrYuv.d1x plugin for MediaReactor and QuickClip / VVW. This format has been in use for over 25 years in various forms as a *.hdr. By default, Drastic software now writes and reads a *.dthdr (as well as still reading the .hdr). The *.dthdr is the same format with more capabilities, including better audio, split long file and time code support.
Herein are outlined the most common descriptors and their meanings as they have been standardized in our software. An updated version of this document is available at drastictech.com/hdrfileformat.txt.
The basic concept of the hdr file is a text file that describes a simple video stream in which each frame is the same size, and its associated video and audio information. On disk, there will be 2 or more files, normally with the same starting name:
- E:\TestRecord\Testing.dthdr
- E:\TestRecord\Testing.yuv
- E:\TestRecord\Testing.wav
In this example the yuv file contains all the captured frames (as opposed to individually numbered yuv files), the wav file contains the matched audio and the hdr file describes them as specified below. When loading these files into QuickClip or MediaReactor, the hdr file should be chosen to make sure all files are picked up properly.
The basic format of the hdr file consists of a series of settings, each taking two text lines. The first line is the label and is always preceded by a percentage sign (%) and the second line is the value of the setting:
% Image Size (This line describes what the next line specifies)
486 720 (This contains the values - NTSC 720 x 486)
2 Settings
Color Format
% Color Format
YUV420
This setting describes the format of the video frames within the file. The current possible formats are listed below.
Planar YUV 4:2:2 — high bit depth
| Token | Description |
|---|---|
| yuv422_16 | 4:2:2 planar YCbCr in I420 order, 16 bits per component |
| yuv422_16le | Little endian 4:2:2 planar YCbCr in I420 order, 16 bits per component |
| yvu422_16 | 4:2:2 planar YCbCr in YV12 order, 16 bits per component |
| yvu422_16le | Little endian 4:2:2 planar YCbCr in YV12 order, 16 bits per component |
| yuv422_10 | 4:2:2 planar YCbCr in I420 order, 10 bits per component in 16 bit container |
| yuv422_10le | Little endian 4:2:2 planar YCbCr in I420 order, 10 bits per component in 16 bit container |
| yvu422_10 | 4:2:2 planar YCbCr in YV12 order, 10 bits per component in 16 bit container |
| yvu422_10le | Little endian 4:2:2 planar YCbCr in YV12 order, 10 bits per component in 16 bit container |
| yuv422_12 | 4:2:2 planar YCbCr in I420 order, 12 bits per component in 16 bit container |
| yuv422_12le | Little endian 4:2:2 planar YCbCr in I420 order, 12 bits per component in 16 bit container |
| yvu422_12 | 4:2:2 planar YCbCr in YV12 order, 12 bits per component in 16 bit container |
| yvu422_12le | Little endian 4:2:2 planar YCbCr in YV12 order, 12 bits per component in 16 bit container |
| yuv422_14 | 4:2:2 planar YCbCr in I420 order, 14 bits per component in 16 bit container |
| yuv422_14le | Little endian 4:2:2 planar YCbCr in I420 order, 14 bits per component in 16 bit container |
| yvu422_14 | 4:2:2 planar YCbCr in YV12 order, 14 bits per component in 16 bit container |
| yvu422_14le | Little endian 4:2:2 planar YCbCr in YV12 order, 14 bits per component in 16 bit container |
Planar YUV 4:4:4 — high bit depth
| Token | Description |
|---|---|
| yuv444_10 | 4:4:4 planar YCbCr in I420 order, 10 bits per component in 16 bit container |
| yuv444_10le | Little endian 4:4:4 planar YCbCr in I420 order, 10 bits per component in 16 bit container |
| yvu444_10 | 4:4:4 planar YCbCr in YV12 order, 10 bits per component in 16 bit container |
| yvu444_10le | Little endian 4:4:4 planar YCbCr in YV12 order, 10 bits per component in 16 bit container |
| yuv444_12 | 4:4:4 planar YCbCr in I420 order, 12 bits per component in 16 bit container |
| yuv444_12le | Little endian 4:4:4 planar YCbCr in I420 order, 12 bits per component in 16 bit container |
| yvu444_12 | 4:4:4 planar YCbCr in YV12 order, 12 bits per component in 16 bit container |
| yvu444_12le | Little endian 4:4:4 planar YCbCr in YV12 order, 12 bits per component in 16 bit container |
| yuv444_14 | 4:4:4 planar YCbCr in I420 order, 14 bits per component in 16 bit container |
| yuv444_14le | Little endian 4:4:4 planar YCbCr in I420 order, 14 bits per component in 16 bit container |
| yvu444_14 | 4:4:4 planar YCbCr in YV12 order, 14 bits per component in 16 bit container |
| yvu444_14le | Little endian 4:4:4 planar YCbCr in YV12 order, 14 bits per component in 16 bit container |
Planar YUV 4:2:0 — high bit depth
| Token | Description |
|---|---|
| yuv420_10le | Little endian 4:2:0 planar YCbCr in I420 order, 10 bits per component, 16 bit container |
| yvu420_10le | Little endian 4:2:0 planar YCbCr in YV12 order, 10 bits per component, 16 bit container |
| yuv420_10 | 4:2:0 planar YCbCr in I420 order, 10 bits per component, 16 bit container |
| yvu420_10 | 4:2:0 planar YCbCr in YV12 order, 10 bits per component, 16 bit container |
| yuv420_12le | Little endian 4:2:0 planar YCbCr in I420 order, 12 bits per component, 16 bit container |
| yvu420_12le | Little endian 4:2:0 planar YCbCr in YV12 order, 12 bits per component, 16 bit container |
| yuv420_12 | 4:2:0 planar YCbCr in I420 order, 12 bits per component, 16 bit container |
| yvu420_12 | 4:2:0 planar YCbCr in YV12 order, 12 bits per component, 16 bit container |
Planar / semi-planar 8 bit YUV
| Token | Description |
|---|---|
| YUV420 | Planar YCbCr in IYUV/I420 order (ST/Thompson/MPEG Groups) |
| YV12 | Planar YCbCr in YV12 order |
| NV12 | Planar YCbCr in I420 order, interleaved chroma (NVIDIA) |
| NV21 | Planar YCrCb in YV12 order, interleaved chroma (NVIDIA) |
| YUV422P | Planar YCbCr with 4:2:2 sub sampling (Sony) |
| YVU422P | Planar YCbCr with 4:2:2 sub sampling (chroma inverted) |
Interleaved / packed YUV
| Token | Description |
|---|---|
| V210 | Interleaved 10 bit YCbCr v210 format (standard QuickClip 10 bit YCbCr) |
| YUV4224_10 | Interleaved 10 bit YCbCr v210 format with alpha/key channel |
| YUV4224 | Interleaved 8 bit YCbCr yuv2/UYVY format with alpha/key channel |
| YUV422_fields | Separate fields of 4:2:2 YCbCr (Crescent) |
| YUV422 | Interleaved 8 bit YCbCr UYVY format (standard QuickClip 8 bit YCbCr), alias uyvy422 |
| yuvi422_16 | Interleaved 16 bit YCbCr UYVY format |
| yuvi422_16le | Little endian interleaved 16 bit YCbCr UYVY format |
| UYVY422 | YUV 4:2:2 interleaved 8 bit packed as U Y V Y U Y V Y … |
| YUY2_16 | YUV 4:2:2 interleaved 16 bit packed as Y U Y V Y U Y V … |
| YUY2_16le | Little endian YUV 4:2:2 interleaved 16 bit packed as Y U Y V Y U Y V … |
| YUY2 | YUV 4:2:2 interleaved 8 bit packed as Y U Y V Y U Y V … |
DPX RGB / ABGR
| Token | Description |
|---|---|
| DPXRGBLEFILL | DPX 10 bit RGB, little endian, filled |
| DPXRGBLE | DPX 10 bit RGB, little endian, padded |
| DPXRGBFILL | DPX 10 bit RGB, big endian, filled |
| DPXRGB | DPX 10 bit RGB, big endian, padded |
| DPXABGRLEFILL | DPX 10 bit ABGR, little endian, filled |
| DPXABGRLE | DPX 10 bit ABGR, little endian, padded |
| DPXABGRFILL | DPX 10 bit ABGR, big endian, filled |
| DPXABGR | DPX 10 bit ABGR, big endian, padded |
Planar RGB
| Token | Description |
|---|---|
| PRGB | 8 bit × 3 planar RGB |
| PRGBA | 8 bit × 4 planar RGBA |
| PBGR | 8 bit × 3 planar BGR |
| PABGR | 8 bit × 4 planar ABGR |
| PBGRA | 8 bit × 4 planar BGRA |
| PARGB | 8 bit × 4 planar ARGB |
Interleaved RGB
| Token | Description |
|---|---|
| RGBA | 32 bit interleaved RGB (TIFF) |
| ARGB | 32 bit interleaved RGB (Mac) |
| BGRA | 32 bit interleaved RGB (Windows BMP/TGA) |
| BGR | 24 bit interleaved RGB (Windows BMP/TGA) |
| RGB | 24 bit interleaved RGB (TIFF) |
| TIFF24 | 24 bit interleaved RGB TIFF ordering |
| TIFF32 | 32 bit TIFF (same as RGBA) |
Special, stereo, Bayer and compressed formats
| Token | Description |
|---|---|
| FULLDUAL | 10 bit dual frame YCbCr (stereo) |
| Grey | 8 bit grey/gray plane of video data, alias Gray |
| DVSD | DVSD 'dv/dif' stream 4:2:0 or 4:1:1 8 bit SD |
| DV25 | DV25 'dv/dif' stream 4:2:0 8 bit SD |
| DV50 | DVCPro 50 stream 4:2:2 8 bit SD, alias avdv |
| DV100 | DVCPro HD/DV-100 stream 4:2:2 8 bit HD, alias avd1 |
| AVCI100 | Panasonic AVCi 100 |
| DNXHD | Avid DNxHD stream, alias av10, avd0~avd9 |
| IMX30 | Sony IMX MPEG 30 Mbit stream 4:2:2 8 bit |
| IMX40 | Sony IMX MPEG 40 Mbit stream 4:2:2 8 bit |
| IMX50 | Sony IMX MPEG 50 Mbit stream 4:2:2 8 bit |
| STEREO8 | Dual 8 bit YCbCr interleaved streams (one after another) |
| STEREO10 | Dual 10 bit YCbCr interleaved streams (one after another) |
| STEREO30 | Dual 10 bit RGB DPX interleaved streams (one after another) |
| STEREO32 | Dual 8 bit BGRA (Windows order) interleaved streams (one after another) |
| stereo12bggr | Dual 12 bit raw Bayer (one after another) |
| stereo12rggb | Dual 12 bit raw Bayer (one after another) |
| stereo12gbrg | Dual 12 bit raw Bayer (one after another) |
| stereo12grbg | Dual 12 bit raw Bayer (one after another) |
| bggrbe12 | Bayer pattern, 12 bits per component packed big endian |
| rggbbe12 | Bayer pattern, 12 bits per component packed big endian |
| gbrgbe12 | Bayer pattern, 12 bits per component packed big endian |
| grbgbe12 | Bayer pattern, 12 bits per component packed big endian |
| bggr12 | Bayer pattern, 12 bits per component packed little endian |
| rggb12 | Bayer pattern, 12 bits per component packed little endian |
| gbrg12 | Bayer pattern, 12 bits per component packed little endian |
| grbg12 | Bayer pattern, 12 bits per component packed little endian |
| ARRIBAYERDLRAW12 | ARRI dual link raw 12 bit Bayer packed into YCbCr 10 |
Deprecated
| Token | Description |
|---|---|
| RGB_10 | 30 bit DPX/Cineon ordering |
| RGB_10LE | 30 bit little endian DPX/Cineon ordering |
No legacy alias — use the descriptive names below
| Token | Use instead |
|---|---|
| YUV411 | use "YUV 4:1:1 8-bit" |
| YUV411P | use "YUV 4:1:1 8-bit" |
| YUV410 | use "YUV 4:1:0 8-bit" |
| YUV410P | use "YUV 4:1:0 8-bit" |
| YUVA444 | use "YUVA 4:4:4 8-bit" or "AYUV 4:4:4 8-bit packed" |
| UYV444 | use "YUV 4:4:4 8-bit packed" |
| n/a MJPEG | Motion JPEG (not supported) |
YUView and pyuv descriptive names
The reader also accepts the descriptive raw pixel format names used by YUView 2.x and the short names used by pyuv 0.7. These value lines carry the whole layout, so no additional descriptors are needed. Names are case insensitive.
YUView style YUV
<order> <subsampling> <bits>-bit [BE|LE] [packed|packed-B] [(IL)] [Cx<n>] [Cy<n>]
<order> YUV, YVU, YUVA, YVUA planar YCbCr
UYVY, VYUY, YUYV/YUY2, YVYU packed 4:2:2
AYUV, YUVA, VUYA packed 4:4:4 with alpha
<subsampling> 4:4:4, 4:4:0, 4:2:2, 4:2:0, 4:1:1, 4:1:0, 4:0:0
<bits> 8, 9, 10, 12, 14, 16
BE / LE byte order for samples wider than 8 bits (default LE)
packed each sample is stored in the next whole byte/word
packed-B samples are bit packed without byte alignment
(IL) UV (and alpha) samples share one interleaved plane
Cx/Cy<n> chroma siting. Accepted for compatibility; the reader
uses the default siting for the selected subsampling.
Examples
YUV 4:4:4 8-bit
YVU 4:2:2 10-bit BE
YUV 4:2:0 10-bit LE
UYVY 4:2:2 8-bit packed
YUYV 4:2:2 10-bit packed-B
YUVA 4:4:4 12-bit
YUV 4:0:0 8-bit
YUView style RGB
<channels> <bits>bit [planar] [BE]
<channels> RGB, RBG, GRB, GBR, BRG or BGR, optionally with A first
or last (ARGB, RGBA, ABGR, BGRA, ...).
planar three or four separate channel planes instead of packed
pixels.
BE big endian samples for formats wider than 8 bits.
Examples
RGB 8bit
RGBA 8bit
BGR 10bit planar
ABGR 12bit BE
pyuv / libyuv short names (8 bit)
P444 P422 P420 P411 P410 P400 planar YUV; P400 is luma only
I420 I422 I444 I411 accepted as planar in that subsampling
I410 i410 is also a libyuv 10-bit 4:4:4 name;
use "YUV 4:1:0 8-bit" for the rare
PYUV 4:1:0 8-bit layout
IYUV planar 4:2:0
UYVY YUY2 YVYU packed 4:2:2
Common short aliases
Microsoft / Media Foundation
| Token | Layout |
|---|---|
| P010, P012, P016 | 4:2:0 semi-planar, 10 / 12 / 16 bit |
| P210, P212, P216 | 4:2:2 semi-planar, 10 / 12 / 16 bit |
| P410, P412, P416 | 4:4:4 semi-planar, 10 / 12 / 16 bit |
| Y210, Y216 | packed 4:2:2, 10 / 16 bit (16 bit words) |
| Y410 | packed 4:4:4, 10 bit + 2 bit alpha (one DWORD/pixel) |
| Y416 | packed 4:4:4, 16 bit + alpha (two DWORDs/pixel) |
QuickTime uncompressed Y'CbCr
| Token | Layout |
|---|---|
| V210 | 4:2:2 10 bit, packed (same as v210) |
| V216 | 4:2:2 10/12/14/16 bit, packed 16 bit words |
| V308 | 4:4:4 8 bit, packed as Cr Y Cb |
| V408 | 4:4:4:4 8 bit, packed as Cb Y Cr A |
| V410 | 4:4:4 10 bit, packed into one DWORD (2 zero low bits) |
FFmpeg / libyuv planar names
yuv420p10le, yuv422p12le, yuv444p16le ...
i010, i012, i210, i212, i410, i412
Other common aliases
| Token | Layout |
|---|---|
| YUV444, YUV444P | planar 4:4:4 8 bit |
| YV16 | planar 4:2:2, Y then V then U |
| VYUY | packed 4:2:2 V Y U Y |
| AYUV | packed 4:4:4 A Y U V |
Important bit packing differences
P010/P210/P410andY210/Y216store 10/12 bit samples left justified in 16 bit words (the least significant bits are zero). The reader scales these correctly to 8 bit UYVY and 10 bit v210.- FFmpeg
yuv*p10le/yuv*p12leand libyuvi0NN/i2NN/i4NNstore the significant bits in the low bits of each 16 bit word. Y410DWORD: bits 0-9 U, bits 10-19 Y, bits 20-29 V, bits 30-31 A.V410DWORD: bits 0-1 zero, bits 2-11 Cb, bits 12-21 Y, bits 22-31 Cr.Y416: four 16 bit words per pixel — U, Y, V, A.
Drastic filename shorthand vs Microsoft tokens
In Drastic-generated filenames, p<subsampling><bits> means a planar layout (for example _p210 = planar 4:2:2 10 bit and _p412 = planar 4:4:4 12 bit). Auto-create keeps that meaning. The explicit header tokens P010/P210/P410/P012/P212/P412/P416 follow the Microsoft semi-planar definition described above. For planar high-bit files use yuv422_10le, yuv444_12le, etc.
Video Line Pitch
The descriptive / P-series reader honors % Video Line Pitch as the luma line pitch. P010/P210 keep the same byte pitch for the interleaved UV plane; P410/P416 have full-width chroma, so their UV plane pitch is twice the luma pitch.
Fields
% Number of Fields per Image = 2 is supported for descriptive and P-series formats. Field 0 supplies even output lines and field 1 supplies odd output lines.
Writer
HdrWriteFile emits P010/P012/P016, P210/P212/P216, P410/P412/P416, Y210/Y216, Y410/Y416, V216/V308/V408/V410, YUV444P, YV16, VYUY and AYUV when the matching fcc is present.
Output negotiation
- 8 bit YUV sources are presented to the application as UYVY (
fcckViewGraphics8BitYUV). - YUV sources wider than 8 bits are presented as v210 (
fcckViewGraphics10BitYUV); samples are scaled (or truncated) to 10 bits. - RGB and luma-only (4:0:0) sources are presented as 32 bit BGRA/RGB32, with >8 bit samples scaled to 8 bits. For 4:0:0 the luma value is replicated to R, G and B.
Image Size (NbRows, NbCols)
% Image Size (NbRows,NbCols)
486 720
The vertical and horizontal size of the video frame. Can be any size, but the following sizes are normal:
480x640, 480x704, 480x720, 486x720, 512x720, 576x704, 576x720, 608x720, 720x1280, 1080x1920, 1088x1920
Number of Fields per Image optional
% Number of Fields per Image (optional)
2
Number of separate images that make up a field. For most images this would be 1, indicating one full size plane with progressive or interleaved lines. If there are two separate images that need to be interleaved, this would be set to 2. This value does not affect the Image Size above — that is always the absolute number of pixels vertically and horizontally.
Signal Format Type
% Signal Format Type
interlaced
The recommended signal format output type: interlaced, progressive or segmented (psf). Default is progressive.
Number of Image
% Number of Image
1800
The number of individual frames in a file. If this value is larger than the actual number of frames available, it will be corrected — so if you are unsure, set it to a very large value (e.g. 4000000).
Frames per Second
% Frames per Second
29
The frame rate of the video frames. This may be any value, but some values have special meanings:
| Value | Meaning |
|---|---|
| 23 | Means 23.98 |
| 24 | Standard film |
| 25 | PAL / 25p / 50i |
| 29 | Means 29.97 — NTSC / 29.97p / 59.94i |
| 30 | NTSC NDF / 30p / 60i |
| 50 | 50p |
| 59 | Means 59.94p (for 720p, 1080p, etc.) |
| 60 | Means 60p (for 720p, 1080p, etc.) |
Header Offset optional
% Header Offset (optional)
0
How far into the file the series of video frames starts.
Video Alignment optional
% Video Alignment (optional)
512
Alignment of each frame within the stream. If the frames are back to back this value will be 1. It is normal to pad each frame to align it to a disk sector for higher speed reads and writes. This value is normally either 0 (which indicates 1), 512 (Windows), 4096 (SGI), or 16384 (JS).
Video Line Pitch optional
% Video Line Pitch (optional)
1440
The number of bytes in one line of video. Especially important for YCbCr 10 bit when frame size is 1280x720 or 2048x1080.
Video Offset optional
% Video Offset (optional)
0
How far into each frame, from the calculated start, the actual video starts.
Video Name optional
% Video Name (optional)
ThisFile.YUV
This is the name of the video file/stream associated with this header. Normally the video file has the same name as the hdr file, but with a .yuv extension. This allows the video name to be overridden to any file name.
Audio Name optional
% Audio Name (optional)
ThisFile.Wav
This is the name of an associated audio file. Normally QuickClip / MediaReactor look for sidebar wave or aiff files with the same name as the header file. This allows the audio file to be specified.
Audio Format
% Audio Format
Stereo
Channel layout of the associated audio file.
Audio Frequency
% Audio Frequency
48000
Audio sample rate in Hz.
Audio Block Align
% Audio Block Align
4
Bytes per block (sample frame) of audio: channels × bytes per sample.
Audio Bits Per Sample
% Audio Bits Per Sample
24
Bit depth of each individual audio sample.
Timecode optional
% Timecode (optional)
01:00:00:00
This is the time code value of the first frame. The time is assumed to run contiguously from this point.
Userbits optional
% Userbits (optional)
BAADF00D
This is the user bits returned for this stream. It is assumed it is the same for all video frames.
Start Frame optional
% Start Frame (optional)
100
This specifies the first video frame of the stream. By default this is 0, but in a circular file the last frame written may not be the last frame of the file. In the case above, if the start frame is 100, the last frame written was 99. The reader will read from 100 → end of file and then 0 → 99 automatically.
Max Segment optional
% Max Segment (optional)
1296000
This specifies how long one segment of a multi-segment record will be. Defaults to 12 hours (the value above is 12 hours in frames, NDF 30).
3 Calculations
Total Frame Pixels = <% Image Size (NbRows,)> * <% Image Size (,NbCols)>
(1) Frame Size = <size of video file> / <% Number of Image>
Frame size by color format
(2) Frame Size =
YUV420 (<totalframepixels> + (<totalframepixels> / 2))
YUV411P (<totalframepixels> + (<totalframepixels> / 2))
YUV422P (<totalframepixels> * 2)
YUV411 (<totalframepixels> + (<totalframepixels> / 2))
YUV422 (<totalframepixels> * 2)
YUV422_10 (<totalframepixels> * 16 / 6)
YUVA444 (<totalframepixels> * 4)
RGBA (<totalframepixels> * 4)
RGB (<totalframepixels> * 3)
RGB_10 (<totalframepixels> * 4)
RGB_10LE (<totalframepixels> * 4)
YUView / pyuv descriptive names
bps = 1 for 8 bit, 2 for 9..16 bit.
Planar YUV, luma plane: width * height * bps
4:4:4 chroma: width * height * bps * 2
4:4:0 chroma: width * ceil(height/2) * bps * 2
4:2:2 chroma: ceil(width/2) * height * bps * 2
4:2:0 chroma: ceil(width/2) * ceil(height/2) * bps * 2
4:1:1 chroma: ceil(width/4) * height * bps * 2
4:1:0 chroma: ceil(width/4) * ceil(height/4) * bps * 2
4:0:0 (luma only): width * height * bps
Planar alpha plane: width * height * bps
Packed 4:4:4 (3 channels): width * height * 3 * bps
Packed 4:4:4 (4 channels): width * height * 4 * bps
Packed 4:2:2 (4 values/2px): ceil(width/2) * height * 4 * bps
packed-B variants: the same number of values, rounded up to
whole bytes per pixel or pixel pair
RGB packed: width * height * channels * bps
RGB planar: the same total, split into channel planes
Semi-planar P-series (Y plane followed by interleaved UV)
P010/P012/P016: width*height*2 + ceil(width/2)*ceil(height/2)*4
P210/P212/P216: width*height*2 + ceil(width/2)*height*4
P410/P412/P416: width*height*2 + width*height*4
Packed high-bit formats
Y210/Y216: ceil(width/2) * height * 4 * 2
Y410/V410: width * height * 4
Y416: width * height * 8
Aligned frame size and seeking
(1) Aligned Frame Size = <size of video file> / <% Number of Image>
(2) Aligned Frame Size = (((<Frame Size> + <% Video Alignment> - 1) / <% Video Alignment>) * <% Video Alignment>
Seek to a frame offset = <required frame number> * <Aligned Frame Size>
4 Samples
calendar_01.hdr
-snip------------------------------------------------------------
% Color Format (YUV420, YUV422, YUV422P, YUV422_10, RGB, RGBA)
YUV422P % Planar 422
% Image Size (NbRows,NbCols) (576 720, 486 720, 720 1280, 1080 1920)
576 720 % PAL Size
% Number of Fields per Image
1 % Both fields in single frame group
% Number of Image
12 % If greater than actual, reader will correct
% Frame per second
25 % PAL rate
%% Video Alignment
%512 % no alignment
%% Video Name
% optional e:\calendar_01.yuv
% Audio Format
%Stereo % none, should be wav or aiff
% timecode
00:00:00;00 D
% userbits
FFFFFFFF
% Start Frame
0
-snip------------------------------------------------------------
table_tennis.hdr (MPEG test stream)
-snip------------------------------------------------------------
% Color Format
YUV420
% Image Size (NbRows,NbCols)
288 352
% Number of Fields per Image
1
% Number of Image
250
% Frame per second
25
-snip------------------------------------------------------------
5 Optional DNxHR Descriptors
The Color Format tokens dnrh, dnrs, dnrl, dnrq and dnrA identify DNxHR HQ, SQ, LB, HQX and 444 respectively. DNx recordings also write an optional descriptor:
% Video Frame Size
917504
This is the encoded byte count before Video Alignment padding. It defines the fixed frame stride for arbitrary DNxHR rasters without guessing from the uncompressed line pitch. Existing descriptors and legacy reads remain unchanged; readers may ignore unrecognized optional descriptors.
© 1995–2026 Drastic Technologies Ltd. All Rights Reserved.
www.drastictech.com · hdrfileformat.txt · support at drastictech.com · 416 255 5636

