NRG (file format)


An NRG file is a proprietary optical disc image file format originally created by Nero AG for the Nero Burning ROM utility. It is used to store disc images. Other than Nero Burning ROM, however, a variety of software titles can use these image files. For example, Alcohol 120%, or Daemon Tools can mount NRG files onto virtual drives for reading.
Contrary to popular belief, NRG files are not ISO images with a .nrg extension and a header attached. They can store audio tracks for Audio CDs, which ISO images cannot. Nero's NRG format is one of the few formats besides BIN/CUE, Alcohol 120%'s MDF/MDS and CloneCD's CCD/IMG/SUB disc image formats to support Mixed Mode CDs which contain audio CD tracks as well as data tracks.

File format

The file format specification below is unofficial and as such is lacking some data. There may also be errors.
The NRG file format uses a variation of the Interchange File Format and stores data in a chain of "chunks". All integer values are stored unsigned in big endian byte order. Version 1 NRG format stores values as 32-bit integers. Nero Burning ROM v5.5 introduced a new NRG file format, version 2, with support for 64-bit integers.

Header

The NRG format does not store its data as a header at the beginning of a file. It is instead attached at the end of the file like a footer. Image information is stored as a serialized chain of IFF chunks. To get the offset of the first chunk one must read the NRG footer from the last 8 or 12 bytes of the file.
Size TypeValue or purpose
4Chunk ID"NERO"
432-bitOffset of the first chunk data chain

Size TypeValue or purpose
4Chunk ID"NER5"
864-bitOffset of the first chunk data chain

Chunks

(CUES) Cue Sheet

Available in all versions of NRG file format.
The CUEX chunk is the concatenation of fixed-size blocks, each one representing a cue point.
The index0 points are present even when they are identical to the index1 ones. The index0 points in audio tracks are incorrect if Nero has been asked to record all the sub-channel data. No index other than 0 or 1 has been encountered, although the chunk format allows for such cue points to be recorded; thus the number of cue blocks seems to be always 2*: two indices for each track, an index0 for the lead-in and an index1 for the lead-out.
Size TypeValue / Purpose
4Chunk ID"CUES"
432-bitChunk size

Size TypeValue / Purpose
4Chunk ID"CUEX"
432bitChunk size
18bitMode
18bitTrack number
18bitIndex number
18bitPadding?
432bitLBA position in sectors

(DAOI) DAO Information

Available in all versions of NRG file format.
DAOI chunks store disc at once sessions specific information in two parts. The first part contains data that is specific for the session only. The second part repeats track specific information once for each track. Parse the SINF chunks to get the number of tracks for a specific session.
Size TypeValue / Purpose
4Chunk ID"DAOI"
432bitChunk size big endian
432bitChunk size little endian
14 UPC
432bitToc type
18bitFirst track
18bitLast track
12 ISRC
432bitSector size
432bitMode
432bitIndex0
432bitIndex1
432bitIndex2

Size TypeValue / Purpose
4Chunk ID"DAOX"
432bitChunk size big endian
432bitChunk size
13TextUPC
18-bitPadding?
216-bitToc type
18bitFirst track in the session
18bitLast track in the session
12TextISRC
216bitSector size in the image file
216bitMode of the data in the image file
216bitUnknown
864bitIndex0
864bitIndex1
864bitEnd of track + 1

(CDTX) CD-text

Available in version 2 NRG file format.
The CDTX chunk is the concatenation of raw CD-text packs of 18 bytes each.
Size TypeValue / Purpose
4Chunk ID"CDTX"
432bitChunk size
18bitPack type
18bitPack type
18bitPack number in the block
18bitBlock number etc.
12TextNULL-separated text strings
216bitCRC

(ETNF) Extended Track Information

Available in all versions of NRG file format.
ETNF chunks are used to store track information for track at once sessions. The data is repeated once for each track. Parse the SINF chunks to get the number of tracks for a specific session.
Size TypeValue / Purpose
4Chunk ID"ETNF"
432bitChunk size
432bitTrack offset in image
432bitTrack length
432bitMode
432bitStart lba on disc
4 ?

Size TypeValue / Purpose
4Chunk ID"ETN2"
432bitChunk size
864bitTrack offset in image
864bitTrack length
432bitMode
432bitStart lba on disc
432bitUnknown
432bitTrack length

(SINF) Session Information

Available in all versions of NRG file format.
Session information chunks should be used to quickly scan the image for session and track count. SINF chunks are always listed in sequential order corresponding to the sessions order. To get more details information about a specific session one must parse the corresponding DAOI or ETNF chunk.
Size TypeValue / Purpose
4Chunk ID"SINF"
432bitChunk size
432bit# tracks in session

(MTYP) Media Type?

Available in all versions of NRG file format.
This chunk and its use is unknown. A value of 1 was found in images of several CD.
Size TypeValue / Purpose
4Chunk ID"MTYP"
432bitChunk size
4 ?

(DINF) Disc Information?

Found in TAO images in version 2 of NRG file format. Found in DAO images in version of NRG file format only if Nero was asked not to close the disc.
This chunk and its use is unknown.
Size TypeValue / Purpose
4Chunk ID"DINF"
432bitChunk size
432bitUnknown

(TOCT) TOC T?

Found in TAO images in version 2 of NRG file format.
This chunk and its use is unknown.
Size TypeValue / Purpose
4Chunk ID"TOCT"
432bitChunk size
2 Unknown

(RELO)

Found in TAO images in version 2 of NRG file format.
This chunk and its use is unknown.
Size TypeValue / Purpose
4Chunk ID"RELO"
432bitChunk size
4 Unknown

(END!) End of chain

Available in all versions of NRG file format.
End of chain chunk is signals that there are no more chunks to be read.
Size TypeValue / Purpose
4Chunk ID"END!"
432bitChunk size