UDF (Universal Disk Format)

UDF is the OSTA file system for DVD, Blu-ray and rewritable optical discs, and it is also used by some camera and USB media. Windows, macOS and Linux all read it. Revisions run from 1.02 to 2.60 and it is current but not changing.

Overview

UDF implements ECMA-167 (ISO/IEC 13346). Anchor volume descriptor pointers at fixed locations (sector 256, the last sector and N-256) lead to a volume descriptor sequence describing partitions. Files are described by file entries whose allocation descriptors point at extents. A file set descriptor locates the root directory.

Rewritable and write-once media use extra structures: a virtual allocation table for sequential media, sparing tables for defect management and, from revision 2.50, a metadata partition. File names are Unicode.

History

  • Defined by the Optical Storage Technology Association (OSTA); revision 1.02 was used for DVD-ROM.
  • Revisions 1.50, 2.00, 2.01, 2.50 and 2.60 added rewritable media, virtual allocation tables and the metadata partition.

Structures

Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.

Extents

OffsetSizeTypeFieldNotes
pos4u32 LELen Field
pos + (kind == 2 ? 12 : 4)4u32 LEBlock
pos + 82u16 LE1
pos + 162u16 LE2

Extents

OffsetSizeTypeFieldNotes
0x02u16 LEExtended
16 + 182u16 LEFlags
extended ? 208 : 1684u32 LELea
extended ? 212 : 1724u32 LELad

Get Children

OffsetSizeTypeFieldNotes
p + 181u8Characteristics
p + 191u8Lfi
p + 244u32 LEIcb Lbn
p + 282u16 LEIcb Map
p + 362u16 LELiu

Make Entry

OffsetSizeTypeFieldNotes
0x244u32 LEUid
0x284u32 LEGid
0x388u64 LESize
16 + 182u16 LEEmbedded

Read All Physical

OffsetSizeTypeFieldNotes
0x02u16 LEExtended
p4u32 LELen Field
p + (kind == 2 ? 12 : 4)4u32 LEBlock
16 + 182u16 LEKind
extended ? 208 : 1684u32 LELea
extended ? 212 : 1724u32 LELad

Read Content

OffsetSizeTypeFieldNotes
0x02u16 LEExtended
16 + 182u16 LEKind
extended ? 208 : 1684u32 LEStart

Read Icb

OffsetSizeTypeFieldNotes
36 + 44u32 LELbn
36 + 82u16 LEAp

Read Space Bitmap

OffsetSizeTypeFieldNotes
56 + 84u32 LELength
56 + 124u32 LEBlock

Times

OffsetSizeTypeFieldNotes
0x02u16 LEExtended
0x4812bytes–
0x5012bytes–
0x5412bytes–
0x5C12bytes–
0x6812bytes–

Timestamp

OffsetSizeTypeFieldNotes
0x02u16 LEType Zone
0x22i16 LEYear
0x41u8Onth
0x51u8Day
0x61u8Hour
0x71u8Inute
0x81u8Second
0x91u8–

Udf File System

OffsetSizeTypeFieldNotes
0x1944u32 LERoot Lbn
0x1982u16 LERoot Map

Udf File System

OffsetSizeTypeFieldNotes
0xFC4u32 LEFsd Lbn
0x1002u16 LEFsd Map

Tag Ok

OffsetSizeTypeFieldNotes
0x02u16 LE–
0x41u8–
0xC4u32 LE–

Udf Volume

OffsetSizeTypeFieldNotes
at4u32 LELength
at + 44u32 LELocation

Udf Volume

OffsetSizeTypeFieldNotes
0x162u16 LENumber
0xBC4u32 LE–
0xC04u32 LE–

Udf Volume

OffsetSizeTypeFieldNotes
0xD44u32 LELogical
0x10C4u32 LEAp Count
p + 11u8Len
p + 42u16 LE–
p + 382u16 LEPartition
p + 404u32 LE–
p + 444u32 LE–

Other fields read

Read inOffsetSizeTypeFieldNotes
Extents0x144u32 LENlen
Get Children0x388u64 LESize
Read Space Bitmap0x104u32 LEBits
Details0xF02u16 LERevision
Details0x48128bytes–
Find Sessions0x15bytes–
Find Vat0x02u16 LEHeaderUDF 2.00: header length first
Find Vat0x388u64 LESize
Has Recognition Sequence0x15bytesId
To U Ints(i * 4)4u32 LE–
Udf Volume0x54128bytesS
Udf Volume0x1832bytesS

Constants

2048-byte sectors for the VRS regardless of block size (ECMA-167 2/8.3; 4096-byte media use one per sector)

NameValueTypeNotes
Block2048int

Map Kind

NameValue
Physical(next)
Virtual(next)
Sparable(next)
Metadata(next)

Signatures and magic strings referenced

TextWhere checked
NSR02Has Recognition Sequence
NSR03Has Recognition Sequence
BEA01Has Recognition Sequence
CD001Has Recognition Sequence
BOOT2Has Recognition Sequence
CDW02Has Recognition Sequence
TEA01Has Recognition Sequence
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.