This is vcdimager.info, produced by makeinfo version 4.8 from vcdimager.texi. This file documents GNU VCDImager, The GNU Video CD Authoring Tools. Copyright (C) Herbert Valerio Riedel <> Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, one Front-Cover Text: "GNU VCDImager by Herbert Valerio Riedel et al." and one Back-Cover Text: "GNU VCDImager can be obtained at `http://www.gnu.org/software/vcdimager/'. The author is reachable at ". A copy of the license is included in the section entitled "GNU Free Documentation License". INFO-DIR-SECTION Video CD Tools START-INFO-DIR-ENTRY * VCDImager: (vcdimager). GNU Video CD imaging utilities * vcdimager: (vcdimager)vcdimager. Video CD simple formatter * vcd-info: (vcdimager)vcd-info. Video CD diagnostic tool * cdxa2mpeg: (vcdimager)cdxa2mpeg. Strip RIFF/CD-XA container * vcdxminfo: (vcdimager)vcdxminfo. Display MPEG stream properties * vcdxgen: (vcdimager)vcdxgen. Video CD XML template generator * vcdxbuild: (vcdimager)vcdxbuild. Video CD XML formatter END-INFO-DIR-ENTRY  File: vcdimager.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) * Menu: * Introduction:: * Video CD Concepts:: * Reference:: * Video CD XML Description:: * Examples:: * Tips and Hints:: * ISO 9660 Character Sets:: * Glossary:: * GNU General Public License:: * GNU Free Documentation License:: * XML Tag Index:: * Concept Index::  File: vcdimager.info, Node: Introduction, Next: Video CD Concepts, Prev: Top, Up: Top Introduction ************ This manual describes the "GNU VCDImager"(1) package, a tool-set for authoring, disassembling and analyzing Video CD's and Super Video CD's. * Menu: * Supplied Tools:: * Features:: ---------- Footnotes ---------- (1) see `http://www.gnu.org/software/vcdimager/'  File: vcdimager.info, Node: Supplied Tools, Next: Features, Prev: Introduction, Up: Introduction Supplied Tools ============== The following command-line tools are provided with this package: `vcdimager' Simple front-end, allowing for easy command-line controlled generation of basic VCD and SVCD disc images without an intermediate XML description. `vcd-info' Selectively shows detailed information about the structure a Video CD. See *Note Introduction: (vcd-info)Top. `vcdxgen' XML VCD-description generator, with a command-line interface similar to the classic `vcdimager' front-end. See *Note vcdxgen::. `vcdxbuild' Builds a VCD/SVCD according to a supplied XML description and files containing the MPEG program streams referred to in the XML description. See *Note vcdxbuild::. `vcdxrip' Disassembles a given VCD or SVCD disc into a XML description and the contained MPEG program streams. See *Note vcdxrip::. `vcdxminfo' This is a debugging tool for displaying some MPEG properties, as conceived by internal library `libvcd' and `libvcdinfo'. See *Note vcdxminfo::. `cdxa2mpeg' A program to strip the RIFF header on CD-XA-format tracks. See *Note cdxa2mpeg::. The generated CD images created are suitable for being burnt on to CD-R, by the use of a CD-recording program which recognizes the BIN/CUE-format, such as cdrdao(1), for instance. ---------- Footnotes ---------- (1) see `http://cdrdao.sourceforge.net'  File: vcdimager.info, Node: Features, Prev: Supplied Tools, Up: Introduction Features ======== Features of the back-end library(1), on which all front-ends rely, include: * Support for Video CD 1.1 and 2.0 disc format. * Support for Super Video CD 1.0 and HQ Video CD 1.0(2) disc format. * Full PBC support, including fully customizable play lists, (multi default) selection lists and end lists. * Support for segment (play) items (SPI). * Support for up to 98 sequence items (MPEG tracks) per (Super) Video CD. * Support for additional entry points into sequence items. * Support for defining auto pause points in sequence items and segment items. * General facility for adding files as mode 2 form 1 and mixed form XA sectors to the ISO-9660 file-system and setting some labels in the ISO-9660 PVD * Supports 99 minute CD-R media(3). * Image input support for GNU/Linux `ioctl()'-based cdrom devices, BIN/CUE images and NRG images. ---------- Footnotes ---------- (1) the core of the GNU VCDImager package consists of a private library named `libvcd' and public library named `libvcdinfo', the front-ends are just user interfaces to the exported C-API (2) based on the IEC-62107 specification with some extensions defined in the super-set SVCD System Specification 1.0. Some support for the _deprecated_ Chinese SVCD format is available through option switches. (3) ...though most devices will have problems with such an out-of-specification media. You may want use the `--sector-2336' option for images longer than 80 minutes  File: vcdimager.info, Node: Video CD Concepts, Next: Reference, Prev: Introduction, Up: Top 1 Video CD Concepts ******************* This chapter gives some background information regarding the underlying Video CD technology. *Warning:* All information in this chapter is presented without any warranty of accuracy or correctness. You are encouraged to send corrections and improvements for this manual to . * Menu: * Overview:: * Anatomy of Video CDs:: * Known Video CD Flavors:: * The ISO-9660 Track:: * Constraints on MPEG streams:: * Play Items:: * Playback Control::  File: vcdimager.info, Node: Overview, Next: Anatomy of Video CDs, Prev: Video CD Concepts, Up: Video CD Concepts 1.1 Overview ============ The Video Compact Disc ("Video CD" or "VCD") is a standardized digital video storage format. It is based on the commonly available Compact Disc technology, which allows for low cost video authoring. Video CD's can be played in most DVD standalone player, dedicated VCD players and finally, modern Personal Computers with multimedia support.  File: vcdimager.info, Node: Anatomy of Video CDs, Next: Known Video CD Flavors, Prev: Overview, Up: Video CD Concepts 1.2 Anatomy of Video CD's ========================= Basically a Video CD is made up of CD-ROM XA sectors, i.e. CD-ROM mode 2 form 1 & 2 sectors. Non-MPEG data is stored in mode 2 form 1 sectors with a user data area of 2048 byte, which have a similiar L2 error correction and detection (ECC/EDC) to CD-ROM mode 1 sectors. While realtime MPEG streams is stored in CD-ROM mode 2 form 2 sectors, which by have no L2 ECC, yield a ~14% greater user data area consisting of 2324 bytes(1) *Warning:* Realtime MPEG streams on Video CD's are only protected by L2 error detection (but no correction!), EDC, and CIRC encoding. Thus Video CD's are more easily affected by scratches and alike on the CD-ROM media surface. In general, a Video CD is made up of several mode 2 (and optionally CD-DA) tracks. The layout of a Video CD is as follows: * lead-in area containing the TOC. * Mandatory pre-gap consisting of 150 sectors (`00:00:00' - `00:01:74'). * ISO-9660 data track. The beginning of this track is defined to have the LSN `0'. *Note The ISO-9660 Track::. * ISO-9660 structure at `00:02:00' consisting of 16 empty sectors, primary volume descriptor ("PVD") and directory records with file pointers to information area structures (described below) and external pointers to MPEG/CD-DA tracks following the ISO-9660 data track. * Optional karaoke area at `00:03:00'. (not supported yet by vcdimager) * Video CD information area at `00:04:00'. * Optional segment play item area with MPEG items aligned in 150 sector segments. There can be up to 1980 segments on a disc. * Optional program and data file area, for additional files added to the ISO-9660 track. * Up to 98 MPEG mode 2 form 2 tracks wrapped in front and rear margin(2) empty sectors and preceded by (at least) 150 empty sector pre-gaps. * 150 sector post-gap after the last mpeg track, as required by the ECMA-130 standard. * Up to 97(3) CD-DA tracks. (not supported yet by vcdimager) * Lead-out area. ---------- Footnotes ---------- (1) actually raw mode 2 sectors have a 2336 byte user data area, but parts of it are used for error codes and headers when using the mode 2 form 1 or form 2 configurations. (2) Margins seem to be used, in order to compensate for inaccurate sector addressing issues on CD-ROM media. Interestingly, they have been abandoned for the Super Video CD. (3) the maximum number of tracks on a Video CD must not exceed 99 tracks  File: vcdimager.info, Node: Known Video CD Flavors, Next: The ISO-9660 Track, Prev: Anatomy of Video CDs, Up: Video CD Concepts 1.3 Known Video CD Flavors ========================== There are different Video CD flavors commonly used. The following sections tries to explain the differences amongst them. See also `http://www.dvdrhelp.com/vcd' and `http://www.dvdrhelp.com/svcd'. * Menu: * Video CD 1.1:: * Video CD 2.0:: * Extended Video CD:: * Super Video CD 1.0:: * HQ Video CD 1.0:: * Extended Super Video CD::  File: vcdimager.info, Node: Video CD 1.1, Next: Video CD 2.0, Prev: Known Video CD Flavors, Up: Known Video CD Flavors 1.3.1 Video CD 1.1 ------------------ This is the most basic Video CD specification dating back to 1993(1), which has the following characteristics: * One mode 2 mixed form ISO-9660 track containing file pointers to the information areas. * Up to 98 multiplex-ed MPEG-1 audio/video streams or CD-DA audio tracks. * Up to 500 MPEG sequence entry points used as chapter divisions. The Video CD specification requires the multiplex-ed MPEG-1 stream to have a CBR of less than 174300 bytes (1394400 bits) per second(2) in order to accommodate single speed CD-ROM drives. The specification allows for the following two resolutions(3): * 352 x 240 @ 29.97 fps (NTSC SIF). * 352 x 240 @ 23.976 fps (FILM SIF). The CBR MPEG-1, layer II audio stream is fixed at 224 kbps with 1 stereo or 2 mono channels. It is recommended to keep the video bit-rate under 1151929.1 bps(4). ---------- Footnotes ---------- (1) actually this flavor was based on the Karaoke-CD, which was the first MPEG based CD-ROM format. (2) 2324 bytes of payload per sector * 75 sectors per second = 174300 bytes per second (3) Actually even PAL resolution works depending on the playing device (4) It should be noted, that in addition to the audio stream and the video stream, there are also bits consumed by the program stream encapsulation which have to be taken into account for bit-rate calculations  File: vcdimager.info, Node: Video CD 2.0, Next: Extended Video CD, Prev: Video CD 1.1, Up: Known Video CD Flavors 1.3.2 Video CD 2.0 ------------------ About two years after the Video CD 1.1 specification came out, an improved Video CD 2.0 standard was published in 1995. This one added the following items to the features already available in the Video CD 1.1 specification: * Support for MPEG segment play items ("SPI"), consisting of still pictures, motion pictures and/or audio (only) streams was added. *Note Segment Items::. * Support for interactive playback control ("PBC") was added. * Support for playing related access by providing a scan point index file was added. (`/EXT/SCANDATA.DAT') * Support for closed captions. * Support for mixing NTSC and PAL content. By adding PAL support to the Video CD 1.1 specification, the following resolutions became available: * 352 x 240 @ 29.97 fps (NTSC SIF). * 352 x 240 @ 23.976 fps (FILM SIF). * 352 x 288 @ 25 fps (PAL SIF). For segment play items the following audio encodings became available: * Joint stereo, stereo or dual channel audio streams at 128, 192, 224 or 384 kbit/sec bit-rate. * Mono audio streams at 64, 96 or 192 kbit/sec bit-rate. Also the possibility to have audio only streams and still pictures(1) was provided. The bit-rate of multiplex-ed streams should be kept under(2) 174300 bytes/sec (except for single still picture items) in order to accommodate single speed drives. ---------- Footnotes ---------- (1) in addition to the resolutions already defined for motion video, also high resolutions are available for still pictures, which are 704 x 480 (NTSC Full D1) and 704 x 576 (PAL Full D1) (2) Alas it seems, that for _strict_ Video CD 2.0 compliance, it's required to pad the stream exactly to 1x muxrate. The Super Video CD format does not have this flaw.  File: vcdimager.info, Node: Extended Video CD, Next: Super Video CD 1.0, Prev: Video CD 2.0, Up: Known Video CD Flavors 1.3.3 Extended Video CD ----------------------- Also known as "XVCD", this is not an official standard. It's actually just a name for VCD's which do not conform with the official standards in order to use the additional performance of the DVD decoders and thus achieve better image quality. Such an XVCD may be unsupported by many available stand-alone playing devices. See also `http://www.dvdrhelp.com/xvcd.htm'  File: vcdimager.info, Node: Super Video CD 1.0, Next: HQ Video CD 1.0, Prev: Extended Video CD, Up: Known Video CD Flavors 1.3.4 Super Video CD 1.0 ------------------------ With the upcoming of the DVD-V media, a new VCD standard had to be published in order to be able to keep up with technology, so the Super Video CD specification was called into life 1999. In the midst of 2000 a full subset(1) of this Super Video CD specification was published as IEC-62107. As the most notable change over Video CD 2.0 a switch from MPEG-1 CBR to MPEG-2 VBR encoding for the video stream was performed. The following new features--based on the Video CD 2.0 specification--are: * Use of MPEG-2 encoding instead of MPEG-1 for the video stream. * Allowed VBR encoding of MPEG-1 audio stream. * Higher resolutions (see below) for video stream resolution. * Up to 4 overlay graphics and text ("OGT") sub-channels for user switchable subtitle displaying(2) in addition to the already existing closed caption facility. * Command lists for controlling the SVCD virtual machine. For the Super Video CD, only the following two resolutions are supported for motion video and (low resolution) still pictures(3): * 480 x 480 @ 29.97 fps (NTSC 2/3 D1). * 480 x 576 @ 25 fps (PAL 2/3 D1). See also `http://www.dvdrhelp.com/svcd' for another description of SVCD and `http://www.dvdrhelp.com/glossary' for a description of the acronyms used above. ---------- Footnotes ---------- (1) The features left out in this subset are: subtitles, command lists, extended pbc (hotspots and disc changer support). (2) There is also a non-compliant subtitle format widely used, having its origins in the forgotten "China Video Disc" or "Chaoji VCD" ("CVD") specification, which is said to have been a competitor for the Video CD 2.0 successor. See `http://www.dvdrhelp.com/forum/userguides/98177.php'. Vcdimager recognizes both formats. (3) the same high resolutions as defined for Video CD 2.0 apply for Super Video CD's  File: vcdimager.info, Node: HQ Video CD 1.0, Next: Extended Super Video CD, Prev: Super Video CD 1.0, Up: Known Video CD Flavors 1.3.5 HQ Video CD 1.0 --------------------- This is actually just a minor variation defined in IEC-62107 on the Super Video CD 1.0 format for _compatibility with current products in the market_. It differs from the Super Video CD 1.0 format in the following items: * The system profile tag field in `/SVCD/INFO.SVD' is set to `1' instead of `0'. * The system identification field value in `/SVCD/INFO.SVD' is set to `HQ-VCD' instead of `SUPERVCD'. * `/EXT/SCANDATA.DAT' is mandatory instead of being optional. * `/SVCD/SEARCH.DAT' is optional instead of being mandatory.  File: vcdimager.info, Node: Extended Super Video CD, Prev: HQ Video CD 1.0, Up: Known Video CD Flavors 1.3.6 Extended Super Video CD ----------------------------- Just like the XVCD, and thus also known as "XSVCD", this is not an official standard and may not work with all playing devices supporting SVCD's.  File: vcdimager.info, Node: The ISO-9660 Track, Next: Constraints on MPEG streams, Prev: Known Video CD Flavors, Up: Video CD Concepts 1.4 The ISO-9660 Track ====================== * Menu: * Primary Volume Descriptor:: * Directory Structure::  File: vcdimager.info, Node: Primary Volume Descriptor, Next: Directory Structure, Prev: The ISO-9660 Track, Up: The ISO-9660 Track 1.4.1 Primary Volume Descriptor ------------------------------- This ISO-9660 sector located at sector LSN 16 contains general information about the ISO-9660 file-system, such as volume label, the application used to create the CD, the preparer, the publisher, file-system size, pointer to the root directory and so on...  File: vcdimager.info, Node: Directory Structure, Prev: Primary Volume Descriptor, Up: The ISO-9660 Track 1.4.2 Directory Structure ------------------------- * Menu: * /VCD & /SVCD Directory:: * /MPEGAV & /MPEG2 Directory:: * /CDDA Directory:: * /SEGMENT Directory:: * /EXT Directory:: * /CDI Directory::  File: vcdimager.info, Node: /VCD & /SVCD Directory, Next: /MPEGAV & /MPEG2 Directory, Prev: Directory Structure, Up: Directory Structure 1.4.2.1 `/VCD' & `/SVCD' Directory .................................. This directories (`/SVCD' is used on Super Video CD's) contain file entries to structures contained in the information area of a (Super) Video CD. `/VCD/INFO.VCD' General video disc information (e.g. album id, size of volume set and number of MPEG items) `/VCD/ENTRIES.VCD' Entry point table. `/VCD/LOT.VCD' List ID Offset Table into `PSD.VCD' (only allowed for Video CD 2.0 discs with PBC) `/VCD/PSD.VCD' Play sequence descriptor file (only allowed for Video CD 2.0 discs with PBC). This file may contain so-called lists (selection lists, play lists and end lists) which represent the PBC. `/SVCD/INFO.SVD' `/SVCD/ENTRIES.SVD' `/SVCD/LOT.SVD' `/SVCD/PSD.SVD' These are the corresponding file names on Super Video CD's, and fulfill the same purpose as those defined for the Video CD 2.0 format. `/SVCD/SEARCH.DAT' This file, mandatory for Super Video CD's, contains access point sector addresses. *Note Access Point Sectors::. `/SVCD/TRACKS.SVD' In this file additional information (e.g. playing time and stream characteristics) about each sequence track is recorded.  File: vcdimager.info, Node: /MPEGAV & /MPEG2 Directory, Next: /CDDA Directory, Prev: /VCD & /SVCD Directory, Up: Directory Structure 1.4.2.2 `/MPEGAV' & `/MPEG2' Directory ...................................... This file contains file entries pointing to the sequence items contained in the tracks after the ISO-9660 track.  File: vcdimager.info, Node: /CDDA Directory, Next: /SEGMENT Directory, Prev: /MPEGAV & /MPEG2 Directory, Up: Directory Structure 1.4.2.3 `/CDDA' Directory ......................... This file contains file entries pointing to optional CDDA tracks after the ISO-9660 track. This feature is not available for Super Video CD's.  File: vcdimager.info, Node: /SEGMENT Directory, Next: /EXT Directory, Prev: /CDDA Directory, Up: Directory Structure 1.4.2.4 `/SEGMENT' Directory ............................ This directory contains file entries to segment play items. *Note Segment Items::.  File: vcdimager.info, Node: /EXT Directory, Next: /CDI Directory, Prev: /SEGMENT Directory, Up: Directory Structure 1.4.2.5 `/EXT' Directory ........................ `/EXT/LOT_X.VCD' `/EXT/PSD_X.VCD' These are only defined for Video CD 2.0, and contain the extended PBC, which adds area definitions for pointer based selection and/or highlighting of selection areas. (On Super Video CD's the extended PBC has been merged into the main `/SVCD/PSD.SVD' file) `/EXT/SCANDATA.DAT' This file is optional, and defined (but with a different format) for Video CD 2.0 and Super Video CD 1.0 formats. It contains playing time related access information very similar to the `/SVCD/SEARCH.DAT' file. `/EXT/CAPTnn.DAT' Closed caption data file entries.  File: vcdimager.info, Node: /CDI Directory, Prev: /EXT Directory, Up: Directory Structure 1.4.2.6 `/CDI' Directory ........................ This directory is provided for CD-i player applications. (Only useful for Video CD's)  File: vcdimager.info, Node: Constraints on MPEG streams, Next: Play Items, Prev: The ISO-9660 Track, Up: Video CD Concepts 1.5 Constraints on MPEG streams =============================== GNU VCDImager expects MPEG streams in a format suitable for (Super) Video CD production. Only a few cases where the MPEG streams fail to adhere to this requirement are detected, thus it's up to the user to ensure that the constraints are fulfilled. All MPEG streams are expected to be packetized program streams. * Menu: * Video CD:: * Super Video CD:: * Common Constraints::  File: vcdimager.info, Node: Video CD, Next: Super Video CD, Prev: Constraints on MPEG streams, Up: Constraints on MPEG streams 1.5.1 Video CD -------------- The Video CD specification requires the multiplex-ed MPEG-1 stream to have a bit rate of about 174300 bytes per second. The video stream is required to have one of the following resolutions: * 352 x 240 @ 29.97 fps (NTSC). * 352 x 240 @ 23.976 fps (FILM). * 352 x 288 @ 25 fps (PAL) (not supported on VCD 1.x!). See also `http://www.dvdrhelp.com/forum/userguides/94382.php' and `http://www.dvdrhelp.com/glossary' for a description of the acronyms used above. The audio stream must be MPEG-1 layer II, fixed to a 224 kbits/sec CBR with 1 joint stereo, stereo or dual channel audio stream, and a sampling rate of 44.1 kHz at 16 bit resolution.  File: vcdimager.info, Node: Super Video CD, Next: Common Constraints, Prev: Video CD, Up: Constraints on MPEG streams 1.5.2 Super Video CD -------------------- When creating Super Video CD images MPEG-2 VBR streams are expected with a maximum allowed bit-rate of approximately 2.6 mbits/sec. The following video resolutions are (officially) supported(1): * 480 x 480 @ 29.97 fps (NTSC). * 480 x 576 @ 25 fps (PAL). The audio stream must be MPEG-1 layer II, with a bit-rate ranging from 32 to 384 kbits/sec bit-rate (i.e. the audio stream _is_ allowed to be VBR!) with up to 2 stereo or 4 mono channels, or 1 extended MPEG-1/2 multichannel (5+1) surround sound stream. * Menu: * Scan Information Data:: * SVCD Subtitles:: ---------- Footnotes ---------- (1) actually you can try other resolutions as well, but then you are leaving the SVCD specification behind you...  File: vcdimager.info, Node: Scan Information Data, Next: SVCD Subtitles, Prev: Super Video CD, Up: Super Video CD 1.5.2.1 Scan Information Data ............................. According to the specification, it is mandatory for Super Video CD's(1) to encode scan information data into user data blocks in the picture layer of all intra coded picture. It can be used by playing devices for implementing fast forward & fast reverse scanning. The already existing scan information data can be updated by enabling the `update scan offsets' option. *Note