DVDBuilder for C++  3.4
DVD Authoring Software Development Kit
<chapter> Element

Description

Defines title chapter.

<chapters>
        <chapter time="00:00:00" pause="60"  />
        <chapter time="00:00:05" pause="60"  />
        <chapter time="00:00:10" />
</chapters>
Optional Attributes
Attribute Option Description
time

Specifies the playback time at which the chapter begins. The time is expressed in hr:min:sec string format. Each title should have at least one chapter. If there is only one chapter the value of this attribute should be set to "00:00:00".

Note: The effective chapter start time will usually differ slightly from the specified in the project file. According to the DVD-Video spec a chapter shall start on a GOP boundary (a Group of Pictures begins with an I-picture). If chapter time is not at an I-picture it is shifted to the next I-picture. Since the maximum GOP length is about 0.6 seconds, chapter start time may be delayed with up to 0.6 seconds.
For example: If chapter time is 00:00:02 and the GOP length is 0.6 seconds, DVDBuilder will create a chapter at the first GOP after 2 seconds or at 2.4 seconds.

pause 0 to 255

Specifies the number of seconds to pause after the chapter playback. The value 255 specifies infinite pause.

file

Specifies a file that contains an MPEG-2 movie.

callback true Indicates that the video object data should be read from a stream object supplied by the user. The value of the 'file' attribute will be passed to the callback object for reference.
false

Indicates that the video object data should be read from a standard file specified with the 'file' attribute.

Child Elements
Element Description
<audioStream> Specifies an audio elementary stream.
<videoStream> Specifies a video elementary stream.
<subpictureStream> Specifies a subpicture elementary stream.

Example

The following example shows a DVD with one title. Note that the version attribute in the <dvd> tag is set to 2.3, because the <chapters> tags require DVDBuilder project schema 2.2 or later.

<?xml version='1.0' encoding='utf-8'?>
<dvd version='2.3' xmlns='http://www.primosoftware.com/dvdbuilder/2.3'>
<videoManager firstPlayNavigate='Title = 1'>
</videoManager>
<titleSet>
<titles>
<title id='1'>
<videoObject file='Movies/review.mpeg' />
<chapters>
<chapter time='00:00:00' pause='10' />
<chapter time='00:00:05' pause='20' />
<chapter time='00:00:10' />
<chapter time='00:00:15' />
</chapters>
</title>
</titles>
</titleSet>
</dvd>


The following example shows a DVD with one title. There are no <videoObject> elements. The input file is specified in the <chapter> element. The 'time' attribute is not required in this case.

<?xml version='1.0' encoding='utf-8'?>
<dvd version='2.3' xmlns='http://www.primosoftware.com/dvdbuilder/2.3'>
<videoManager firstPlayNavigate='Title = 1'>
</videoManager>
<titleSet>
<titles>
<title id='1'>
<chapters>
<chapter pause='10' file='movie_part1.mpg' />
<chapter pause='10' file='movie_part2.mpg' />
<chapter pause='20' file='movie_part3.mpg' />
<chapter pause='20' file='movie_part4.mpg' />
</chapters>
</title>
</titles>
</titleSet>
</dvd>


The following example shows a DVD with one title. There are no <videoObject> elements. The input files are audio/video elementary streams and they are specified in the <chapter> element. The 'time' attribute is not required in this case.

<?xml version='1.0' encoding='utf-8'?>
<dvd version='2.3' xmlns='http://www.primosoftware.com/dvdbuilder/2.3'>
<videoManager firstPlayNavigate='Title = 1'>
</videoManager>
<titleSet>
<titles>
<title id='1'>
<chapters>
<chapter pause='10'>
<audioStream file='movie_part1.mp2' format='MPA'/>
<videoStream file='movie_part1.m2v' />
</chapter>
<chapter pause='20'>
<audioStream file='movie_part2.mp2' format='MPA'/>
<videoStream file='movie_part2.m2v' />
</chapter>
<chapter pause='30'>
<audioStream file='movie_part3.mp2' format='MPA'/>
<videoStream file='movie_part3.m2v' />
</chapter>
</chapters>
</title>
</titles>
</titleSet>
</dvd>