The “LAE CD-Extra” item of the LAES payload is a carrier
for it that has nothing to do with FLAC files: a two-session audio CD whose data session holds one
.LAX extension file per track, so that a normal CD player plays the audio and a
reader that rips the disc can add the extension. It is defined by the LAE CD-Extra
Encapsulation Specification (CDX), which is written for the lossy tier, LAE Lossy (LAEY), and
reaches LAES through the trailer record’s extension block type 2. The same .lax file
is also used beside a FLAC or WAV file (the two-file form below), which is how it meets FLAC.
No viewer here opens .lax files: the page describes the layout, and the FLAC viewer reads the FLAC form
only (a .lax dropped on the explorer is shown as bytes).
Source. LAE CD-Extra
Encapsulation Specification (CDX), spec/cdx/SPEC.md, repository tag
v5-2026-10-30 (the tag the LAES page follows), read in November 2026. It is
marked “draft, version 0”, dated 2026-10-24, licence CC BY 4.0, author mtq0605. The text says that
it will be revised after real burns and rips have been measured. The tag v5-2026-11-19
was also read: its section 3 (the extension file and trailer record) is the same apart from
wording, but it changes the rules for a leading silence in track 1 ([L6], [L5], [L9]) that this
page summarises, so check the current text before relying on those. Clause numbers in square
brackets are the specification’s own.
The CD layout
[L1] The disc is a two-session CD-Extra: session 1 is audio and session 2 is a single data track. Only 44,100 Hz is used on CD, so the CD layer of every track is 44,100 Hz. [L2] At most 98 audio tracks (the data track takes a number as well, so n + 1 ≤ 99).
Session 1 (audio)
- [L3] Written in one pass (DAO/SAO), with nothing in it except what follows.
- [L4] INDEX 01 of track 1 is at LBA 0 and its pregap (INDEX 00) is 150 sectors = 88,200 samples of digital silence. Hidden tracks are not supported.
- [L5] At least 5,880 samples (10 sectors) of digital silence precede track 1’s audio; the pregap provides them.
- [L6] Each track’s CD layer begins at its INDEX 01. (An exception for independent-CD mode, in which a master starts slightly before the publisher’s first sample, is worded differently in the two tags read.)
- [L7] Each CD layer lies inside its own track, followed by padding z of digital silence, 0 ≤ z < 588 samples, so the track is a whole number of sectors. [L8] Nothing else lies between the last track and the lead-out.
- [L10] Every audio track is a whole number of sectors and at least 300 sectors (4 s). [L11] The pre-emphasis flag is not set. [L12] No data or markers are embedded in the audio.
- [L13] Derived mode (the CD layer is derived from the master): from track 2 onward no INDEX 00 and no pregap, and for a continuous master z = 0 for every track but the last. [L14] Independent-CD mode (the publisher’s existing CD is the CD layer): the publisher’s INDEX marks, ISRC and flags are kept at the same positions, each CD layer runs from its INDEX 01 to the next, and z = 0.
Session 2 (data)
- [D1] Exactly one data track, CD-ROM XA Mode 2 Form 1 with 2,048 bytes of user data per sector; no Mode 1 sector anywhere on the disc (the specification cites the Joliet specification of 1995-05-22 as the source).
- [D2] ISO 9660 Level 1 with Joliet: the primary volume descriptor at +16 sectors from INDEX 01 of the data track, the Joliet supplementary descriptor at +17, the terminator at +18; all addresses are absolute LBAs. No Rock Ridge, UDF or El Torito.
- [D3] The LBA of the data track’s INDEX 01 equals the next writable address the drive reports at write time. For one pass it is precomputed as A2 + 11,400 sectors (lead-out of session 1, lead-in of session 2 and 150 sectors of pregap: 6,750 + 4,500 + 150), a figure the specification marks to be measured. A2 is the LBA of the start of session 1’s lead-out.
- [D4]
/README.TXTis present, and the directory/LAE/holds only the filesTRACKnn.LAX, one per audio track that has an extension, where nn is the track’s two-digit TOC number, 01 to 98. No CUE files, TOC copies, reports, programs or autorun.inf. [D5] README.TXT should be in Chinese and English, UTF-8, and must not carry hashes, positions or offsets. - [D6] The data track’s end should be padded with zero sectors (150 initially, an estimate to be measured) and the data track must be at least 300 sectors. [D7] A track may have no extension file and then plays as CD.
- [M1] ISRC, MCN and CD-Text may be written but must carry no hashes or positions.
The .LAX extension file
[X1] A .LAX file (.lax outside a CD; readers ignore case) has no file header and is
exactly two parts:
| Bytes | Content |
|---|---|
0 … n−1 | The extension block: the whole n-byte body of the LAE chunk of the track’s v5 WAV file, including the CRC-32 at its end, byte for byte. It excludes the chunk identifier, the chunk length and any RIFF pad byte. n = file length − 80, n ≥ 8. |
n … n+79 | The 80-byte trailer record. |
The extension block of an LAES file begins LAE2 (LAEY’s begins LAE1); the
LAES payload is described on its page. All multi-byte
integers are little-endian. CRC-32 is the one of the LAES page: reflected polynomial
0xEDB88320, initial value and final XOR 0xFFFFFFFF, check value
CRC-32(“123456789”) = 0xCBF43926.
The trailer record [X2]
| Offset | Bytes | Type | Field | Meaning |
|---|---|---|---|---|
| 0 | 4 | bytes | identifier | ASCII LTVT (4C 54 56 54) |
| 4 | 2 | uint16 | version | 1 |
| 6 | 2 | uint16 | length | 80, the size of the whole record |
| 8 | 2 | uint16 | extension block type | 1 = body of the LAE chunk of LAEY container v5 (begins LAE1); 2 = an LAES extension block (begins LAE2); other values reserved |
| 10 | 2 | uint16 | track number | On CD: the TOC audio track number, 1 to 98. Off CD: the track’s number in the CD TOC if it is also on CD, otherwise its number in the album (at least 1); 1 for a single |
| 12 | 4 | uint32 | sample rate | Of the CD layer. 44100 on CD, 44100 or 48000 off CD. For type 1 it must equal base in the extension block |
| 16 | 4 | uint32 | ncd | The number of samples of the CD layer, 1 ≤ ncd < 228. For type 1 it must equal nb − 2·pb of the extension block |
| 20 | 16 | bytes | MD5 | Whole-track MD5, in the byte order of the MD5 output |
| 36 | 8 | uint64 | S1 | 0 ≤ S1 < M (M = 261 − 1) |
| 44 | 8 | uint64 | S2 | 0 ≤ S2 < M |
| 52 | 4 | uint32 | lead0 | Consecutive digital-silence samples (L and R both 0) at the start of the CD layer, 0 ≤ lead0 ≤ ncd |
| 56 | 4 | uint32 | tail0 | The same at the end, 0 ≤ tail0 ≤ ncd. If the layer is all silence, lead0 = tail0 = ncd; otherwise lead0 + tail0 < ncd |
| 60 | 16 | bytes | reserved | Written as 0, ignored when read |
| 76 | 4 | uint32 | CRC-32 | Of bytes 0 to 75 of the record |
The limit ncd < 228 is about 101 minutes at 44.1 kHz and 93 minutes at 48 kHz, and makes every sum below fit in 64-bit unsigned arithmetic. lead0 and tail0 count silence inside the CD layer; they are not positions, and the silent samples are always played and included in the MD5 (no program may drop them). They serve only to find a track roughly; a wrong value can make that search miss but cannot make wrong audio pass, because acceptance rests on the MD5.
Whole-track MD5 [X3]
MD5 (RFC 1321) over ncd × 4 bytes: for each sample, the low byte of L, the high byte of L, the low byte of R, the high byte of R (interleaved little-endian int16). It is the same as the audio MD5 of a FLAC STREAMINFO for 16-bit stereo.
S1 and S2 [X4]
With the frame word wi = b0 + 28b1 + 216b2 + 224b3 (the four bytes of sample i as above, so w = (L mod 216) + 216·(R mod 216)), assembled byte by byte whatever the machine’s byte order:
- S1 = (Σ wi) mod M, for i = 0 … ncd − 1
- S2 = (Σ (i + 1)·wi) mod M
They are checksums that can be updated as a window of ncd samples slides along a disc stream x
(the window starts at t, n = ncd): B(t+1) = (B(t) − A(t) + n·xt+n) mod M, then
A(t+1) = (A(t) − xt + xt+n) mod M (B is updated first, from the old A) [X5]. A reader screens
every position near a coarse location with S1 and S2, then confirms with the MD5. Known answers
computed for the draft: the three samples (1, −1), (−32768, 32767), (0, 0) give the bytes
01 00 FF FF 00 80 FF 7F 00 00 00 00, S1 = 6442352641, S2 = 8589803521, MD5
08b7bb4b0c7432f1c9e94e3c493f236e, lead0 = 0, tail0 = 1; the samples (1, −1),
(−32768, 32767), (32767, −32768) give S1 = 8589869056, S2 = 15032352766, MD5
e5e4df0d69a7afa36b20e70c5c09fc82; three zero samples give S1 = S2 = 0 and lead0 = tail0 = 3.
What the file never holds [X6]
No value computed from the extension layer (the extension block is protected only by its own CRC-32), no value covering both layers, no position, LBA, offset, delay or gain, no per-sector or per-frame data, no seek or cue table, no other header.
Order of checks when reading [X7]
- The file is at least 88 bytes and its last 80 bytes begin with
LTVT(otherwise “no trailer record”). - The record’s CRC-32 matches (“record corrupted”).
- The version is 1 and the length is 80 (“unknown record version”).
- The extension block type matches the block’s first four bytes: type 1 with
LAE1. A type 2 withLAE2is, for a reader of LAEY only, “LAES extension block, not supported by this reader”; any other mismatch is “extension block does not match its trailer type”. (The LAES specification, section 9, says an LAES reader must checkLAE2for type 2 and otherwise reject the extension and play the CD track alone.) - Track number, sample rate, ncd, S1, S2, lead0 and tail0 are within the ranges of the table (“invalid record field”).
The extension block’s own CRC and checks are left to the decoder.
Outside CD: the two-file form and LAE streams
For files and streams the CD layout does not apply, and the base layer may be 44,100 or 48,000 Hz ([P1]).
- Single-file v5 WAV [F1], the form of LAEY:
RIFF, size 36 + D + 8 + n + (n mod 2) with D = ncd × 4,WAVE,fmt(16 bytes: format 1, 2 channels, the sample rate, byte rate 4 × rate, block align 4, 16 bits),data(D bytes), thenLAEwith the n-byte extension block and a zero pad byte if n is odd. No trailer record is appended inside the WAV. - Base-layer file plus extension file [F2]: a FLAC (RFC 9639) or WAV file holds exactly the CD layer (ncd samples, 16-bit, 2 channels), and a file of the same name with the extension
.laxholds the extension file above. If the track is also on CD, the.laxis byte for byte the disc’sTRACKnn.LAX. The extension and the trailer must not be put inside the FLAC file, and no FLAC metadata block carries them; the audio MD5 should be written into the STREAMINFO. (This two-file form is distinct from the single-file FLAC form withLAE2APPLICATION blocks of the LAES page.) - Pairing [F3]: the reader looks for a
.laxof the same name (case-insensitive) and may try others in the folder. They pair when the decoded sample count equals ncd and the whole-track MD5 of the decoded audio equals the record’s MD5. A non-zero STREAMINFO MD5 may select candidates, but acceptance rests on the decoded audio (the reader’s own MD5, or a FLAC decoder’s verified STREAMINFO MD5 equal to the record’s); with a zero STREAMINFO MD5 the reader computes its own. If several.laxfiles pair but their extension blocks differ, the track is rejected and the reason reported. A ripped file usually fails to pair [F4], and is then located by content as in the specification’s section 6, or only the base layer is played. - LAE stream [F6]: per track, the CD layer unchanged (FLAC, WAV, or raw little-endian 16-bit stereo PCM) and the extension file unchanged, with no further header, index or offset. [F7] A base layer re-encoded lossily is not a stream and the extension is not applied.
Versions
The specification is draft version 0. The trailer record version is 1: lead0 and tail0 were put into formerly reserved bytes before any publication, so the record stayed version 1, and any later change to it needs a new version; readers reject unknown versions. Extension block types: 1 is LAEY container v5, 2 is LAES (the reader passes the block unchanged to its decoder); later container versions would take new codes.
Not covered here
The specification’s production rules for an encapsulation tool (section 5), its reader requirements in full (section 6: the TOC sources, disc stream, fine location, failure reporting and plug-in behaviour), its conformance test cases (section 7) and the measurements still to be made (appendix A) are not reproduced; they govern programs, not bytes. The LAES specification states that the CD-Extra extension block type 2 is specified; the CDX text itself lists “the definition of the LAES extension block, and which subset of LAES is placed on a CD-Extra” as still to be specified later.
Sources
- LAE CD-Extra Encapsulation Specification (CDX) –
spec/cdx/SPEC.md, tagv5-2026-10-30 - LAE Lossless specification, section 9 (CD-Extra)