Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
XORRECORD(1) | General Commands Manual | XORRECORD(1) |
NAME
xorrecord - Emulation of CD/DVD/BD program cdrecord by program xorrisoSYNOPSIS
xorrecord [ options ] dev=device [track_source]DESCRIPTION
xorrecord writes preformatted data to CD, DVD, and BD media.MMC, Session, Track, Media types:
MMC is a standard out of the SCSI family which defines the interaction between computers and optical drives. Since more than a decade all CD, DVD, or BD recorders obey this standard regardless by what bus cabling they are attached to the computer. libburn relies on this standard compliance and on the capability of the operating system to perform SCSI transactions over the particular bus cabling.Drive preparation and addressing:
The drives, CD, DVD, or BD burners, are accessed via file addresses which are specific to libburn and the operating system. Those addresses get listed by a run of xorrecord --devices or xorriso -device_links.Relation to program xorriso:
xorrecord is actually a command mode of program xorriso, which gets entered either by xorriso command "-as cdrecord" or by starting the program by one of the names "xorrecord", "cdrecord", "wodim", or "cdrskin".OPTIONS
- Addressing the drive:
- --devices
-
Print the list of accessible CD, DVD, or BD drives to standard output. Drives might be inaccessible if the user lacks of permissions to use them or if the drive is in use by another program.
0 -dev '/dev/sr0' rwrw-- : 'TSSTcorp' 'CDDVDW SH-S203B'
- dev=drive_address
-
Set the libburn address of the drive to be used.
- Inquiring drive and media:
- -inq
- Print to standard output: vendor, model name, and firmware revision of the drive.
- -checkdrive
- Print unconditionally that the drive supports burnfree, SAO, and TAO. Also print the output of option -inq.
- -atip
-
Print the output of -checkdrive, the most capable profile of the medium in the drive, the list of profiles which are supported by the drive, whether it is erasable (i.e. can be blanked), the media manufacturer, and the medium product name.
- -toc
-
Print a table of content of the medium in the drive. The output is not compatible to cdrecord option -toc, but rather the one of xorriso command -toc. It lists the address, vendor, model name, and firmware revision of the drive.
- -msinfo
-
Print the argument text for option -C of programs mkisofs, genisoimage, or xorrisofs. It consists of two numbers separated by a comma.
- Settings for the burn run:
- blank=mode
-
Blank a CD-RW or DVD-RW to make it re-usable from scratch. Format a DVD-RW, DVD+RW, DVD-RAM, BD-R, or BD-RE if not yet formatted.
- -multi
-
This option keeps CD, unformatted DVD-R[W], DVD+R, or BD-R appendable after the current session has been written. Without it the disc gets closed and may not be written any more - unless it is a -RW and gets blanked, which causes loss of its content.
- -dummy
- Try to perform the drive operations without actually affecting the inserted media. There is no warranty that this will work with a particular combination of drive and media. Blanking is prevented reliably, though. To avoid inadverted real burning, -dummy refuses burn runs on anything but CD-R[W], DVD-R[W], or emulated stdio-drives.
- -waiti
-
Wait until input data is available at stdin or EOF occurs at stdin. Only then begin to access any drives.
- tsize=size
-
Announce the exact size of the track source. This is necessary with DVD-R DL media and with quickest blanked DVD-RW, if the size cannot be determined in advance from the track source. E.g. if it is standard input or a named pipe.
- -isosize
-
Try to obtain the track size from the content of the track source. This works only if the track source bears an ISO 9660 filesystem. Any other track source content will cause the burn run to abort.
- padsize=size
- Add the given amount of trailing zeros to the upcoming track. This feature can be disabled by size 0. Default is 300 kB in order to work around a problem with GNU/Linux which often fails to read the last few blocks of a CD track which was written in write mode TAO. TAO is used by xorrecord if the track size cannot be predicted or if the CD medium is not blank but appendable.
- -nopad
- The same as padsize=0.
- -pad
- The same as padsize=15s. This was once sufficient with older GNU/Linux kernels. Meanwhile one should at least use padsize=128k, if not padsize=300k.
- -data
- Explicitly announce that the track source shall be recorded as data track, and not as audio track. This option has no effect with xorrecord, because there is no support for other track formats anyway.
- -tao
- Explicitly demand that write type TAO shall be used for CD, or Incremental for DVD-R. Normally the program will choose the write type according to the given medium state, option -multi, and track source. Demanding it explicitly prevents the start of a write run, if it is not appropriate to the situation.
- -sao
- Explicitly demand that write type SAO shall be used for CD, or DAO for DVD-R. This might prevent the write run, if it is not appropriate to the situation.
- -dao
- Alias of -sao.
- fs=size
-
Set the size of the program fifo buffer to the given value rather than the default of 4m.
- speed=value
-
Set the write speed. Default is 0 = maximum speed. Speed can be given in media type dependent x-speed numbers or as a desired throughput per second in MMC compliant kB (= 1000) or MB (= 1000 kB). Media x-speed factor can be set explicitly by appending "c" for CD, "d" for DVD, "b" for BD. "x" is optional.
706k = 706kB/s = 4c = 4xCD
5540k = 5540kB/s = 4d = 4xDVD
- minbuf=percentage
-
Equivalent to:
modesty_on_drive=<percentage>
- -immed
-
Equivalent to:
modesty_on_drive=75
- -eject
- Eject the drive tray after alll other work is done.
- Program version and verbosity:
- -version
-
Print to standard output a line beginning by
- -v
- Increase program verbosity by one level. There are four verbosity levels from nearly silent to debugging verbosity. The both highest levels can be enabled by repeated -v or by -vv or by -vvv.
- -V
-
Log SCSI commands and drive replies to standard error. This might be of interest if xorrecord and a particular drive or medium do not cooperate as expected, or if you just want to know how libburn interacts with the drive. To understand this extremely verbose log, one needs to read SCSI specs SPC, SBC, and MMC.
- -help
-
Print a sparse list of program options to standard error and declare not to be cdrecord.
- Options not compatible to cdrecord:
- --no_rc
- Only if used as first command line argument this option prevents reading and interpretation of startup files. See section FILES below.
- --drive_not_exclusive
-
This option disables the use of device file locking mechanisms when acquiring the drive. On GNU/Linux the locking is done by open(O_EXCL), on FreeBSD by flock(LOCK_EX).
- drive_scsi_dev_family=sr|scd|sg|default
-
GNU/Linux specific:
- --grow_overwriteable_iso
-
Enable emulation of multi-session writing on overwritable media which contain an ISO 9660 filesystem. This emulation is learned from growisofs -M but adapted to the usage model of
- --multi_if_possible
-
Apply option -multi if the medium is suitable. Not suitable are DVD-R DL and DVD-RW, which were blanked with mode "deformat_quickest".
- stream_recording="on"|"off"|number
-
Mode "on" requests that compliance to the desired speed setting is preferred over management of write errors. With DVD-RAM and BD this can bring effective write speed near to the nominal write speed of the media. But it will also disable the automatic use of replacement blocks if write errors occur. It might as well be disliked or ignored by the drive.
- dvd_obs="default"|"32k"|"64k"
- Set the number of bytes to be transmitted with each write operation to DVD or BD media. With most write types, tracks get padded up to the next multiple of this write size (see option --obs_pad). A number of 64 KB may improve throughput with bus systems which show latency problems. The default depends on media type, option stream_recording=, and on compile time options.
- --obs_pad
-
Pad the data of the last write operation of a DVD-R[W] DAO session, or BD-R session, or stdio: pseudo-drive session up to the full size of an output chunk. This padding has to be applied automatically to the other DVD and BD media types, where it causes e.g. ISO images to have trailing unclaimed blocks. Whether it is applied automatically to BD-R depends on option --bdr_obs_exempt.
- --bdr_obs_exempt
-
Exempt BD-R media from automatic unconditional transaction end padding, provided that this padding is not requested by --obs_pad and that no stream_recording is requested.
- modesty_on_drive=parameter[:parameters]
-
Control whether the drive buffer shall be kept from getting completely filled. Parameter "on" (or "1") keeps the program from trying to write to the burner drive while its buffer is in danger to be filled over a given limit. If this filling is exceeded then the program will wait until the filling reaches a given low percentage value.
modesty_on_drive=off:min_percent=90:max_percent=95:
timeout_sec=120:min_usec=5000:max_usec=25000
- use_immed_bit="on"|"off"|"default"
-
Control whether several long lasting SCSI commands shall be executed with the Immed bit, which makes the commands end early while the drive operation is still going on. xorriso then inquires progress indication until the drive reports to be ready again. If this feature is turned off, then blanking and formatting will show no progress indication.
- write_start_address=value
-
Set the block address on overwritable media where to start writing the track. With DVD+RW, DVD-RAM or BD-RE, byte_offset must be aligned to 2 kiB blocks, but better is 32 kiB on DVD and 64 kiB on BD. With formatted DVD-RW 32 kiB alignment is mandatory.
- stdio_sync="on"|"off"|number
- Set the number of bytes after which to force output to emulated stdio: drives. This forcing keeps the memory from being clogged with lots of pending data for slow devices. Default "on" is the same as "16m". Forced output can be disabled by "off".
EXAMPLES
Overview of examples:
Get an overview of drives and their addressesGet an overview of drives and their addresses:
$ xorrecord --devices
Get info about a particular drive and loaded media:
$ xorrecord dev=/dev/sr0 -atip -toc --grow_overwriteable_iso
Prepare CD-RW or DVD-RW for re-use:
$ xorrecord -v dev=/dev/sr0 blank=as_needed -eject
Format DVD-RW to avoid need for blanking before re-use:
$ xorrecord -v dev=/dev/sr0 blank=format_overwrite -eject
De-format DVD-RW to make it capable of multi-session again:
$ xorrecord -v dev=/dev/sr0 blank=deformat
Write a single ISO 9660 filesystem image:
$ xorrecord -v dev=/dev/sr0 speed=12 fs=8m \
blank=as_needed -eject padsize=300k my_image.iso
Write multiple ISO 9660 sessions:
This is possible with all media except minimally blanked DVD-RW and DVD-R DL, which cannot do multi-session.$ xorrisofs -o image_1.iso -J -graft-points /dir1=./tree1
$ xorrecord -v dev=/dev/sr0 speed=12 fs=8m \
-multi --grow_overwriteable_iso \
blank=as_needed -eject padsize=300k image_1.iso
$ m=$(xorrecord dev=/dev/sr0 -msinfo)
$ dd if=/dev/sr0 count=1 >/dev/null 2>&1
$ xorrisofs -M /dev/sr0 -C $m -o image_2.iso \
-J -graft-points /dir2=./tree2
$ xorrecord -v dev=/dev/sr0 speed=12 fs=8m \
-multi --grow_overwriteable_iso \
-eject padsize=300k image_2.iso
Write ISO 9660 session on-the-fly:
It is possible to combine the run of xorrisofs and xorrecord in a pipeline without storing the ISO 9660 image as file on hard disk.$ m=$(xorrecord dev=/dev/sr0 -msinfo)
$ dd if=/dev/sr0 count=1 >/dev/null 2>&1
$ xorrisofs -M /dev/sr0 -C $m \
-J -graft-points /dir2=./tree2 \
| xorrecord -v dev=/dev/sr0 speed=12 fs=8m \
-waiti -multi --grow_overwriteable_iso \
-eject padsize=300k -
$ xorriso -dev /dev/sr0 -joliet on -speed 12 -fs 8m \
-map ./tree2 /dir2 -commit_eject all
Write compressed afio archive on-the-fly:
This is possible with all media except minimally blanked DVD-RW and DVD-R DL. Since the compressed output stream is of very variable speed, a larger fifo is advised. Nevertheless, this example is not suitable for very old CD drives which have no underrun protection and thus would abort the burn run on temporary data shortage.$ find . | afio -oZ - | \
xorrecord -v dev=/dev/sr0 speed=12 fs=64m \
-multi padsize=300k -
$ dd if=/dev/sr0 bs=2048 skip=64046 | afio -tvZ -
FILES
Startup files:
If not --no_rc is given as the first argument then xorrecord attempts on startup to read and execute lines from the following files:/etc/default/xorriso
/etc/opt/xorriso/rc
/etc/xorriso/xorriso.conf
$HOME/.xorrisorc
SEE ALSO
- For generic xorriso command mode
- xorriso(1)
- Formatting track sources for xorrecord:
- xorrisofs(1), mkisofs(8), genisoimage(8), afio(1), star(1)
- Other programs which burn sessions to optical media
- growisofs(1), cdrecord(1), wodim(1), cdrskin(1)
BUGS
To report bugs, request help, or suggest enhancements for xorriso, please send electronic mail to the public list <bug-xorriso@gnu.org>. If more privacy is desired, mail to <scdbackup@gmx.net>.AUTHOR
Thomas Schmitt <scdbackup@gmx.net>COPYRIGHT
Copyright (c) 2011 - 2023 Thomas SchmittCREDITS
xorriso is in part based on work by Vreixo Formoso who provides libisofs together with Mario Danic who also leads the libburnia team. Thanks to Andy Polyakov who invented emulated growing, to Derek Foreman and Ben Jansens who once founded libburn.Version 1.5.6, Jun 07, 2023 |