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
Offset
Size
Type
Field
Notes
pos
4
u32 LE
Len Field
pos + (kind == 2 ? 12 : 4)
4
u32 LE
Block
pos + 8
2
u16 LE
1
pos + 16
2
u16 LE
2
Extents
Offset
Size
Type
Field
Notes
0x0
2
u16 LE
Extended
16 + 18
2
u16 LE
Flags
extended ? 208 : 168
4
u32 LE
Lea
extended ? 212 : 172
4
u32 LE
Lad
Get Children
Offset
Size
Type
Field
Notes
p + 18
1
u8
Characteristics
p + 19
1
u8
Lfi
p + 24
4
u32 LE
Icb Lbn
p + 28
2
u16 LE
Icb Map
p + 36
2
u16 LE
Liu
Make Entry
Offset
Size
Type
Field
Notes
0x24
4
u32 LE
Uid
0x28
4
u32 LE
Gid
0x38
8
u64 LE
Size
16 + 18
2
u16 LE
Embedded
Read All Physical
Offset
Size
Type
Field
Notes
0x0
2
u16 LE
Extended
p
4
u32 LE
Len Field
p + (kind == 2 ? 12 : 4)
4
u32 LE
Block
16 + 18
2
u16 LE
Kind
extended ? 208 : 168
4
u32 LE
Lea
extended ? 212 : 172
4
u32 LE
Lad
Read Content
Offset
Size
Type
Field
Notes
0x0
2
u16 LE
Extended
16 + 18
2
u16 LE
Kind
extended ? 208 : 168
4
u32 LE
Start
Read Icb
Offset
Size
Type
Field
Notes
36 + 4
4
u32 LE
Lbn
36 + 8
2
u16 LE
Ap
Read Space Bitmap
Offset
Size
Type
Field
Notes
56 + 8
4
u32 LE
Length
56 + 12
4
u32 LE
Block
Times
Offset
Size
Type
Field
Notes
0x0
2
u16 LE
Extended
0x48
12
bytes
–
0x50
12
bytes
–
0x54
12
bytes
–
0x5C
12
bytes
–
0x68
12
bytes
–
Timestamp
Offset
Size
Type
Field
Notes
0x0
2
u16 LE
Type Zone
0x2
2
i16 LE
Year
0x4
1
u8
Onth
0x5
1
u8
Day
0x6
1
u8
Hour
0x7
1
u8
Inute
0x8
1
u8
Second
0x9
1
u8
–
Udf File System
Offset
Size
Type
Field
Notes
0x194
4
u32 LE
Root Lbn
0x198
2
u16 LE
Root Map
Udf File System
Offset
Size
Type
Field
Notes
0xFC
4
u32 LE
Fsd Lbn
0x100
2
u16 LE
Fsd Map
Tag Ok
Offset
Size
Type
Field
Notes
0x0
2
u16 LE
–
0x4
1
u8
–
0xC
4
u32 LE
–
Udf Volume
Offset
Size
Type
Field
Notes
at
4
u32 LE
Length
at + 4
4
u32 LE
Location
Udf Volume
Offset
Size
Type
Field
Notes
0x16
2
u16 LE
Number
0xBC
4
u32 LE
–
0xC0
4
u32 LE
–
Udf Volume
Offset
Size
Type
Field
Notes
0xD4
4
u32 LE
Logical
0x10C
4
u32 LE
Ap Count
p + 1
1
u8
Len
p + 4
2
u16 LE
–
p + 38
2
u16 LE
Partition
p + 40
4
u32 LE
–
p + 44
4
u32 LE
–
Other fields read
Read in
Offset
Size
Type
Field
Notes
Extents
0x14
4
u32 LE
Nlen
Get Children
0x38
8
u64 LE
Size
Read Space Bitmap
0x10
4
u32 LE
Bits
Details
0xF0
2
u16 LE
Revision
Details
0x48
128
bytes
–
Find Sessions
0x1
5
bytes
–
Find Vat
0x0
2
u16 LE
Header
UDF 2.00: header length first
Find Vat
0x38
8
u64 LE
Size
Has Recognition Sequence
0x1
5
bytes
Id
To U Ints
(i * 4)
4
u32 LE
–
Udf Volume
0x54
128
bytes
S
Udf Volume
0x18
32
bytes
S
Constants
2048-byte sectors for the VRS regardless of block size (ECMA-167 2/8.3; 4096-byte media use one per sector)
Name
Value
Type
Notes
Block
2048
int
Map Kind
Name
Value
Physical
(next)
Virtual
(next)
Sparable
(next)
Metadata
(next)
Signatures and magic strings referenced
Text
Where checked
NSR02
Has Recognition Sequence
NSR03
Has Recognition Sequence
BEA01
Has Recognition Sequence
CD001
Has Recognition Sequence
BOOT2
Has Recognition Sequence
CDW02
Has Recognition Sequence
TEA01
Has Recognition Sequence
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.