CD and DVD notes

From Helpful
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
📃 These are primarily notes, intended to be a collection of useful fragments, that will probably never be complete in any sense.

CD

Sizes:

  • Regular CDs are 120mm (~4.7 inches)
  • Mini CDs are often either 80mm or 60mm

There are also shaped CDs, such as the business card CD, roughly business card dimensions and shape, often a CD-usable size near 60mm


Standards: The Rainbow Books refer a group of standards detailing basic media formatting, and also audio/visual disc formats.

They include:

  • Yellow Book: data CDs
  • Orange Book: recordable CDs: CD-R, CD-RW, some less-used others like CD-WO, CD-MO, (verify)
  • Blue Book: CD Extra (a.k.a. CD Plus, E-CD, Enhanced Music CD), which is a standardized two-session audio + data CD.
  • White Book: VideoCD (VCD) (Note that SVCD is close to this)
  • Green Book: CD-i (CD-interactive)
  • Scarlet Book: SACD (Super Audio)
  • and more like White book, Purple Book


Logos are required for certain disc types, so you can generally recognize CD-DA ("Compact Disc Digital Audio"), CD+G ("CD Graphics"), VideoCD ("Compact Disc Digital Video"), and such.


Sectors, subcode channels, raw access

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

(THIS NEEDS CLEANUP AND CHECKING)


Physical level

People rarely have to deal with the lowest level.

For example, there are multiple distinct layers of error checking and possibly correction. They vary between disc types, but are basically settled within each type, so as users we don't care.



Reading chunks of CD - on sectors and frames

CDs use 3234-byte physical sectors, made of 98 frames, each 33 bytes large.


Each of the each of the physical frames contains:

  • 24 bytes of user data, which is the part you can use directly
  • 8 bytes of error detection/correction
    • Writing this is done by the drive; you get no control(verify)
    • Reading this is also done by the drive, it is not data communicated out(verify) (presumably there are some 'expect an error' copy protection schemes(verify))
    • The scheme is CIRC: Cross-Interleaved Reed-Solomon coding) (Note: not the same as the underlying, physical-level 8-to-14 (EFM) error correction)
  • 1 byte of subcode bits, which are 8 bits labeled P,Q,R,S,T,U,V,W (sometimes P-W)
    • Usually seen as eight separate bitstreams, where each frame contributes a single bit to each of the eight streams
    • While per sector there physically are 98 bytes worth of subcode bits on disc, 2 are used by the sector sync method, so there are only 96 useful subcode bytes.(verify)


When sectors are mentioned as 2352-byte things, this refers to just the user data (98*24=2352) and not the whole sector (98*33=3234).


Note of the CD types that we ended op using (e.g. data CDs, audio CDs) mostly just used that user data.

So control of subcode data is not necessary for us burning them either, except to create some specific variations of disc (CD-G, CD-TEXT), and to write accurate backups of certain types of discs, including those that use copy protection, including SecuROM, LibCrypt (used on PlayStation discs), LaserLock, and various others.


The user data is also the lowest common denominator of what CD burners let you write.

Many drives give control over more of the bits, and relatively few drives let you control all.

In real-world drives, there are different ways/modes in which sectors can be written.

I've seen these referred to as drive mode with number (e.g. DAO16 and DAO96, refer to partial and full access to the subcode bits), and/or as how many bytes you need to hand in per sector:

  • 2352 bytes: 98 frames of 24 bytes of user data, no subcode data.
    • Enough for writing your own data discs, and most of the fancier formats
  • 2368 bytes: 2352, plus 16 bytes to go into channel Q
    • Lets you use some basic CD audio features (Red Book defines uses for the P and Q channel, but in practice most players only use Q. P and Q channel can store timing information (see also pregap), and can store metadata, copy protection or pre-emphasis flags and others, and to mark tracks as data (e.g. 'not to be played' in CD-Extra)
    • Red Book (audio) does not use the other six (R through W), though some extensions do, for example CD+G (Karaoke), CD-Text, ITTS.
  • 2448 bytes: 2352, plus 96 bytes for all the subcode channels
    • Lets you write formats that actually use and require data in subcode channels


Audio discs (red book)

Red Book CD audio stores a second of audio in 75 sectors.

The user data portion of 75 sectors gives (75*98*24=)176400 bytes, which stores PCM data - specifically stereo, 16-bit, 44100Hz (44100*2*2=176400) audio.

This also set the speed of CD drives; single-speed CD drives read 75 sectors per second, 172KB/s of user data. For example, a 52-speed drive would spin 52 times as fast, which is ~8.7MByte/s.


Red Book also defines uses for the P and Q channels, although in practice, most players rely primarily or only on Q. (P and Q channel can store timing information (see also pregap), and can store metadata, copy protection or pre-emphasis flags and others, and to mark tracks as data (e.g. 'not to be played' in CD-Extra))

Red Book does not use R through W, though some extensions do, for example CD+G (Karaoke), CD-Text, ITTS.



Data discs (yellow book)

TODO: VERIFY MUCH OF THE BELOW

The initial type of yellow book data discs use each 2352-user-byte sector to store 2048 bytes of filesystem data (referred to as 'cooked'), leaving 304 bytes for other purposes.

In both Mode 1 and Mode 2:

  • a sector starts with a 16-byte header:
    • 12-byte sync field (00 ff ff ff ff ff ff ff ff ff ff 00)
    • 3 byte address (minute, second, fraction (1/75th) of a second)
    • 1 byte mode

That last mode controls how the further 2336 bytes of data are used. The two practical modes:

  • Mode 1:
    • 2048 bytes of user data
    • 4 bytes of EDC (Error Detection Code, a 32-bit CRC)
    • 8 bytes of reserved space, set to zeros
    • 172 bytes of "P" parity (note: unrelated to the subcode streams)
    • 104 bytes of "Q" parity (note: unrelated to the subcode streams)
  • Mode 2:
    • 2336 bytes of user data
    • used to write CD-ROM/XA discs, Video CDs, to write Mode 1 style data with its parity data edited (verify), and more




More on error correction

Burning modes: Disk/Session/Track-At-Once (DAO, SAO, TAO)

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


See also:

DVD

Sizes, layers, and sides

What you probably think of as DVDs is the 12cm variant of DVDs - there are also smaller 8cm discs.


There are various capacities for the the 12cm discs.

(Sizes are shown in both 1000 and 1024-based gigabytes; see Kilobytes and kibibytes)


DVD-5 and to a lesser degree DVD-9 are probably the most common, used for movies.

  • DVD 5: single-side, single layer, 4.3GiB (4.7 in decimal SI-type giga).
  • DVD 9: single side, dual layer, 7.9 GiB (8.5 decimal GBs).


Single-side:

  • Regular size (12cm diameter):
    • DVD-5: 1-layer; 4.7 GB, 4.3 GiB (the most common)
    • DVD-9: 2-layer; 8.5 GB, 7.9 GiB
  • Physically smaller (8cm diameter)
    • DVD-1: 1-layer; 1.4 GB, 1.3 GiB
    • DVD-2: 2-layer; 2.6 GB, 2.4 GiB


Double-side: no label, and you have to physically flip these over (rare in consumer use but compact archiving might be interested?) (verify)

  • Regular size (12cm diameter):
    • DVD-10: 2-layer; 9.4GB, 8.7 GiB
    • DVD-14: 3-layer; 13.2GB, 12.3 GiB
    • DVD-18: 4-layer; 17.1GB, 15.9 GiB
  • Physically smaller (8cm diameter)
    • DVD-3: 2-layer; 2.9GB, 2.7 GiB
    • DVD-4: 4-layer; 5.3GB, 4.9 GiB


See also http://en.wikipedia.org/wiki/DVD#DVD_capacity

Low level types

DVD-R was the first DVD-recordable.

DVD+R is a later, independently developed standard (though it was first with some later disc types).

Take-home:

  • There was a difference in early drives, but fairly soon all drives could read and write both
so the difference now matters almost only for playability in very old hardware
some older drives might read both but only write one
  • The first drives (probably including some ancient DVD-Video players) would only read DVD-R

The standards involve both the writers the discs, and also the eventual readers, and since neither + or - is the one true DVD-recordable standard, you probably want a writer that can write both. This now describes everything (it didn't initially), so you can buy most any cheap writer, and buy DVD+R or DVD-R discs at will, and don't worry about it.

The plus variant (DVD+R) is technically slightly more robust, but the difference is pretty small. The plus and minus variants have nearly identical capacity.


Dual layer refers to a group of variants, but in practive often DVD-9 (single-side, double-layer), and the writable DVD+R9 (a.k.a. DVD+R DL, Double Layer) can hold 8GiB (8.5GB).

It hasn't caught on in a big way, possibly because initially was bother figuring out which drives would write and read dual layer, and dual-layer discs were initially more expensive than two single-layer discs.

A dual-layer DVD-R9 has also been introduced - in 2005, which is why drives from before then do not support it.


Other formats include:

  • larger sizes (see below)
  • DVD rewritables, again with two variations, DVD-RW and DVD+RW, (DVD-5 sized) both of which can be rewritten about 1000 times.
  • DVD+RW DL exists, and DVD-RW DL is in the works
  • DVD-RAM, used e.g. in camcorders. It is more efficient and longer lasting than DVD±RW but more expensive, because of its niche use.


Interesting: https://www.youtube.com/watch?v=e1mJv9pxm7M


Blu-ray

Rotational speed

The rotational speed is limited primarily by the amount of wobble your reader can deal with and the disc can physically stand, which relates to disc, data density, but probably primarily by how hard it is to engineer both the disc and the drive.

The practical maximum speed lies around

~54 MB/s for Blu-ray, at ~5000 RPM ("12x")
~33 MB/s for DVD, at ~10000 RPM ("24x")
~8 MB/s for CD at ~10000 RPM ("52x")


This is still somewhat cautious. Discs will generally only be at risk of shattering at multiples of that (there's this slo mo guys video you might like) - but it's a good idea to have ample safety margin.


Image and descriptor files

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

ISO (and relatively direct relations), UDF

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

ISO images refer to a CD, or image file, containing a ISO-9660[1] filesystem.

ISO is supported by pretty much everything related to CD images.


Linux:

  • Reading straight from a CDROM device (e.g. with dd) creates an ISO image
  • mkisofs can create ISO images from a directory


See also:

  • ISO-9660 (simple filesystem for CDs) (evolved from High Sierra format)
  • Joliet (long and unicode filenames)


See also UDF, which is regularly seen as a successor to ISO



UDF (Universal Disk Format), seen as a successor to ISO, used internally by some DVD formats (e.g. DVD Video).

UDF is more like a general-purpose filesystem in that it allows filesystem changes, and in the case of rewritable media, can reclaim space.

UDF is more complex than ISO, though, which is one reason that full support (particularly native and widely compatible support in OSes) is incomplete in most cases.


Mount Rainier is a drive-backed (has to be supported) packet writing alternative to/extension of UDF that can be used on CD-R, CD-RW, DVD+/-R and DVD+/-RW,and such.

CUE, BIN/CUE

Cue sheets (.cue files) are is a basic track-level metadata in simple text files, usually specifying how (usually CD image) data should be split into tracks (data and/or audio).


For CD images, this usually contains references to .bin (data) and/or .wav (audio) files. It is also occasionally used to describe where a single (often CD-ripped) audio file (WAV, FLAC, MP3, APE, etc.) is split into tracks (when it comes from an audio CD, and you don't want gaps on playback but you don't want to throw away the track information either). Note that whether a specific CUE-processing program understands audio formats beyond WAV is up to it; that part is fairly ad-hoc.

There are various programs that can burn CUE files (data / audio / mixed CDs), and those that can split a single audio file into tracks (e.g. CUE splitter), which makes CUE interesting for exact backup of audio CDs, which can also be easily used for per-track extraction.


BIN/CUE refers to a binary CD image with a CUE file that specifies how it was read and should be written. Used by things like CDRWin.

Can be mounted by Alcohol, Daemon tools, probably more(verify), and also used by CUE splitters


See also:

.bin, .img, .ima

Usually a sector-level copy of disk - of hard drive, floppy, CD, or whatnot.

As such, it may be equivalent or nearly equivalent to other formats. For example, for CDs it is an ISO (in linux, dd-ing a cdrom device into a file creates an ISO).

Nero started calling disk images (used for booting) .ima instead of .img.

http://en.wikipedia.org/wiki/IMG_%28file_format%29

MDF/MDS

'Media Descriptor File'

Proprietary disk format used by Alcohol 120% (related to the earlier Fantom CD).

  • MDF: image file
  • MDS: metadata (binary)


Can be used in Daemon tools, Alcohol, CDemu,

CCD, IMG, SUB

Used by CloneCD

  • CCD is a plain text descriptor.
  • IMG is the main data file
  • SUB: (optional) subchannel data


See also:

BlindWrite (bwt, bwi, bws, bwa, b5t, b5i, b6t, b6i)

Used by BlindRead / BlindWrite.

One of the earlier programs/formats to support subchannel data.

  • Up to version 4:
    • BWT
    • BWI: main image
    • BWS: subchannel data
    • BWA
  • version 5:
    • .B5T
    • .B5I
    • Can be mounted by Alcohol,
  • Version 6:
  • .B6T
  • .B6I
    • Can be mounted by Alcohol, Daemon Tools, CDemu

See also:

NRG

Proprietary format used by Nero. IFF-like

Can be created in and used in Nero, opened in PowerISO, and mounted in Daemon tools, Alcohol, CDemu, Roxio, CloneDrive.


See also:

UIF

CD/DVD image format used by MagicISO.

Proprietary format, so not widely supported.


Arguably useful for backup, as it supports compression, encryption and passwords, checksumming, and some other details.

See also:


Only readable by MagicISO(verify)

DAA

Image format used by PowerISO.

Proprietary, so not widely supported. Similar in features to UIF.


See also:


C2D

Format used by Roxio, WinOnCD

Can be used by CDemu,


CDI

Used by DiscJuggler.

Quite specific, not very commonly seen.

Mountable by Alcohol,


CIF

Used by Easy CD Creator


Easy CD Creator (Adaptec)

.toc

Used by cdrdao


VDI

Used by Virtuo CD Manager

Quite specific, not very commonly seen.

PDI

Used by Instant CD/DVD Copy

'Portable Disk Image'

Mountable by Daemon Tools, Alcohol,

ISZ

Used by UltraISO

Compresssed ISO, with some other additions


See also:

Others, notes

For the DMG format, see Apple file formats.


CD/DVD burning programs

Burning in windows

Free:

  • CDBurnerXP Pro (primarily for file backup and making copies and image files)
  • ImgBurn (primarily for making copies and image files)
  • Windows itself (primarily for basic file backups), see e.g. [2]
  • AVS (apparently primarily for DVD video, disc copying)


Basic version free, full version paid (sometimes after short full-featured trial):

  • Nero Burning Rom (when bundled with a CD/DVD writer)


Free in trial period, paid after that:

  • Clone CD (primarily for making copies and image files)


Paid for (in some cases with a free trial, or very restricted free version):


Unsorted:

  • ExpressBurn
  • Alcohol 52%, Alcohol 120% [3]
  • isobuster
  • dvdshrink
  • dvdfab

http://benpryor.com/blog/2006/05/09/free-cd-dvd-image-tools-for-windows/

Burning in linux

Fairly general-purpose:


Specialized:


Non-free:



Unsorted:

...and various (supporting) utilities

Burning on Mac

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

(Roxio) Toast

Burn

Disco

Unsorted

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

http://en.wikipedia.org/wiki/Optical_disc_authoring_software

Virtual drive software

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


Windows

Daemon tools

  • supports: iso, ccd, cue/bin, mds, nrg, bwt, b5t, b6t, cdi, pdi
  • Does not support: daa
  • The adware is sort of annoying

Alcohol (the free 52%, or paid 120% edition)

Virtual CloneDrive

Nero ImageDrive

MagicISO Virtual CD/DVD-ROM

UltraISO

  • Supports: iso

PowerISO


Mac

DiskImageMounter


Linux

Kernel-level support

  • ISO
  • ISZ, since 2.4 kernels (verify)


CDemu

See also


DVDs

  • UDF (meant as a replacement for ISO9660, commonly used on data DVDs)

Recordables: