Remove comment about bad track numbering
This was actually an error: the tracks are BCD-encoded, so track "16" was actually track 10.
parent
8baabbe392
commit
949215d211
122
Home.md
122
Home.md
|
@ -1,62 +1,60 @@
|
||||||
# About the NRG image format
|
# About the NRG image format
|
||||||
|
|
||||||
A good reference about the metadata format is the corresponding Wikipedia
|
A good reference about the metadata format is the corresponding Wikipedia
|
||||||
article: <https://en.wikipedia.org/wiki/NRG_(file_format)>.
|
article: <https://en.wikipedia.org/wiki/NRG_(file_format)>.
|
||||||
|
|
||||||
The source code and comments of NRGrip also provide some information, of
|
The source code and comments of NRGrip also provide some information, of
|
||||||
course.
|
course.
|
||||||
|
|
||||||
|
|
||||||
# Manual audio data extraction howto
|
# Manual audio data extraction howto
|
||||||
|
|
||||||
Just for fun, it is possible to extract manually the audio data from an NRG
|
Just for fun, it is possible to extract manually the audio data from an NRG
|
||||||
image, after displaying its metadata with NRGrip. You will need to know:
|
image, after displaying its metadata with NRGrip. You will need to know:
|
||||||
|
|
||||||
- The first audio byte (`dd skip`):
|
- The first audio byte (`dd skip`):
|
||||||
`daox.first_track.index1` (or `index0` if you wish to include the pre-gap)
|
`daox.first_track.index1` (or `index0` if you wish to include the pre-gap)
|
||||||
|
|
||||||
- The last audio byte:
|
- The last audio byte:
|
||||||
`daox.last_track.end_of_track`
|
`daox.last_track.end_of_track`
|
||||||
|
|
||||||
- The number of audio bytes (`dd count`):
|
- The number of audio bytes (`dd count`):
|
||||||
`Last audio byte - First audio byte`
|
`Last audio byte - First audio byte`
|
||||||
|
|
||||||
To extract the raw audio data (substitute `${FIRST_AUDIO_BYTE}` and
|
To extract the raw audio data (substitute `${FIRST_AUDIO_BYTE}` and
|
||||||
`${NB_AUDIO_BYTES}` with the numbers found above:
|
`${NB_AUDIO_BYTES}` with the numbers found above:
|
||||||
|
|
||||||
dd iflag=count_bytes,skip_bytes if=image.nrg of=image.raw \
|
dd iflag=count_bytes,skip_bytes if=image.nrg of=image.raw \
|
||||||
bs=4M skip=${FIRST_AUDIO_BYTE} count=${NB_AUDIO_BYTES}
|
bs=4M skip=${FIRST_AUDIO_BYTE} count=${NB_AUDIO_BYTES}
|
||||||
|
|
||||||
|
|
||||||
# Notes on cue sheet extraction
|
# Notes on cue sheet extraction
|
||||||
|
|
||||||
From Wikipedia:
|
From Wikipedia:
|
||||||
|
|
||||||
- A CD can contain up to 99 tracks.
|
- A CD can contain up to 99 tracks.
|
||||||
- Each track can in turn have up to 100 indexes.
|
- Each track can in turn have up to 100 indexes (0 to 99).
|
||||||
- The vast majority of songs are recorded under index 1, with the pre-gap being
|
- The vast majority of songs are recorded under index 1, with the pre-gap being
|
||||||
index 0.
|
index 0.
|
||||||
- Sometimes hidden tracks are placed at the end of the last track of the disc,
|
- Sometimes hidden tracks are placed at the end of the last track of the disc,
|
||||||
often using index 2 or 3.
|
often using index 2 or 3.
|
||||||
- In an NRG cue sheet, the _index0_ points are present even when they are
|
- In an NRG cue sheet, the _index0_ points are present even when they are
|
||||||
identical to the _index1_ ones.
|
identical to the _index1_ ones.
|
||||||
- The _index0_ points in audio tracks are incorrect if Nero has been asked to
|
- The _index0_ points in audio tracks are incorrect if Nero has been asked to
|
||||||
record all the sub-channel data (in that case the sector size is 2448 bytes).
|
record all the sub-channel data (in that case the sector size is 2448 bytes).
|
||||||
- No index other than 0 or 1 has been encountered, although the chunk format
|
- 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
|
allows for such cue points to be recorded; thus the number of cue blocks seems
|
||||||
to always be `2 * (number of tracks + 1)`: two indices for each track, an
|
to always be `2 * (number of tracks + 1)`: two indices for each track, an
|
||||||
_index0_ for the lead-in and an _index1_ for the lead-out.
|
_index0_ for the lead-in and an _index1_ for the lead-out.
|
||||||
|
|
||||||
From this information and other observations:
|
From this information and other observations:
|
||||||
|
|
||||||
- The cue sheet should include all the indices for each track, but _index0_
|
- The cue sheet should include all the indices for each track, but _index0_
|
||||||
should be ignored if:
|
should be ignored if:
|
||||||
- _index0_ = _index1_, or
|
- _index0_ = _index1_, or
|
||||||
- _index0_'s position is negative.
|
- _index0_'s position is negative.
|
||||||
- It is possible to have incoherent track numbering (observed: track 10 is
|
- The lead-in area (track 0) and the lead-out area (track 0xAA) should not
|
||||||
numbered 16 in CUEX).
|
appear in the cue sheet.
|
||||||
- The lead-in area (track 0) and the lead-out area (track 0xAA) should not
|
|
||||||
appear in the cue sheet.
|
How will multi-session CDs be handled? Is it worth implementing, since
|
||||||
|
multi-session audio CDs must be very rare?
|
||||||
How will multi-session CDs be handled? Is it worth implementing, since
|
|
||||||
multi-session audio CDs must be very rare?
|
|
||||||
|
|
Loading…
Reference in New Issue