1. Inside the DVD
To truly understand myDVDEdit, you must understand what a DVD is...
Let's begin by putting a DVD into the Apple DVD player, go to the Window menu, and choose the Show Infos menu.
As soon as the DVD is inserted, normally a number of images come up, copyrights, it may ask you to choose in which language you want it read, or show film trailers. Usually, this finishes by showing a beautiful menu page, still or animated, with different options (buttons) which you can select using the remote control. Then the film begins.
If you watch the info window during all these on-screen changes, you will see the title and chapter numbers change and sometimes disappear. What you need to understand is that when the number appears, you are seeing a title; when it doesn't appear, you are seeing a menu. This may seem obvious, but it isn't. You could easily watch a sequence that is a few minutes long without it being a title. Make a note of this as it will be important later.
2. From MPEG to PGC
As you probably know, video sequences on a DVD are encoded as an MPEG 2 (occasionally as an MPEG 1).
The MPEG 2 compression consists in cutting the sequence into more or less compressed blocks of images. There are three types of images. The I images (Intra) are independent and are created using a single JPEG compression. The P images (Predictive) allow a compensation of movement forward from the P or I images. The B images (Bidirectionally predictive) allow an interpolation forward and backward.
The whole sequence forms a succession of images as follows:
I B B P B B P B B P B B / I . . .
This sequence of images is called a Group of Picture (GOP), and the DVD Standard requires that the GOP always starts with an I image, which lasts about half a second. Once these restrictions have been followed, the soundtracks are added, then the subpictures and some other data of use to the DVD. The whole thing is called a VOBU (Video Object Unit), but since I find this term rather nondescript, I've rechristened it Object (OK, I admit, I'm not the first to have done this).
An Object (as referred to in myDVDEdit), is a subset of a video sequence which is composed of a still image, the data permitting the calculation of the intermediary images, and the data useful for managing the DVD (including the navigation and subpictures). The Object lasts half a second.
To put together a whole film, you need lots of Objects, and this is termed a Cell in a DVD. However, since you want to be able to cut the film up into lots of chapters, the Cells have been regrouped into a Program. Note, although a chapter is always a Program, a Program isn't necessarily a chapter.
To obtain a complete film, lots of these Programs have been grouped together into what is called a PGC (Program Chain).
A small illustration will help you to understand this:
Although the notion of a PGC is not considered by most people, it is an extremely important element in a DVD. A DVD is in fact nothing more than a succession of PGC along with a command language which allows them to be linked together.
There are three types of PGCs, First Play PGC which runs at the start of the DVD, Title PGCs which is for the Titles, and Menu PGCs which is for the menus. In all three cases, the format is exactly the same, It's how they're used that differs.
3. The Files
Now open the DVD directory to see what it contains.
Be careful, because to do this, the DVD mustn't be protected. You must be the owner and have the legal right to do this !
If your DVD isn't on your hard drive, copy it over. This will accelerate the loading time of your resources.
At the root of your DVD you will find two directories:
AUDIO_TS is not used in DVD videos. It is usually empty and is ignored by DVD players. However, certain players require its presence and therefore it is essential...
Open VIDEO_TS. Here at last are all the files that make a DVD video from your hard drive. This contains three types of files:
• .IFO files
• .BUP files
• .VOB files
IFO (Information) files contain all the data that describe the DVD structure.
BUP (Backup) files are exact copies of the IFO files, with the same names. They are there to replace the IFO files if they should become unreadable.
Finally VOB (Video Object) files contain all the images, sounds, subtitles, etc., which will be played on your screen and speakers. The VOB file must never exceed 1GB.
Now let's have a look at the names of these files.
They can be grouped into two types:
• VIDEO_TS (.INF .BUP and .VOB)
• VTS_xx_n (.INF .BUP and .VOB)
The VIDEO_TS files constitute what is known as the Video Manager, or VMG. VIDEO_TS.IFO is opened first. It contains the First Play PGC, the first executable program, the DVD Title Table, PGC VMG Menu, and lots of other tables (This information is beyond the scope of this basic introduction to DVD contents)
The VIDEO_TS.VOB file contains all the images and sounds used by VMG Menu PGCs.
The VTS_xx_n files are the Video Title Set. A DVD contains sets of VTS, up to 99, so there can be VTS_01_n, up to .... VTS_99_n, bravo!
Each VTS contains a number of titles, chosen by the designer. There could easily be 1 title in VTS_01, 5 titles in VTS_02 and 18 in VTS_03. Each title corresponds to a VTS Title PGC, but the VTS also contains VTS Menu PGCs.
The VTS_xx_0.VOB files contains the images and sounds for the menus. They cannot exceed 1GB, so animated menus mustn't be too long.
The VTS_xx_n.VOB files, where n>= 1, contain the images and sounds of the titles. Since a title can last over an hour, sometimes more than 2 hours, you often need lots of GBs to stock them. Since each VOB file mustn't exceed 1GB, the data is cut up into lots of pieces, numbered from 1 to 9.
I can tell you're getting a bit lost here, so let's move on to something more 'hands on' and you'll start to understand.
Start myDVDEdit !
Select File menu, Open and then select the DVD you want to edit. Then choose the VIDEO_TS folder or its parent folder, either one will do.
After a few seconds (the time needed to read all the IFO, files), a window appear. It's divided into five zones.
4. Zone 1 : The PGC selector.
At the top you will see the IFO files.
You will see from my example that there are two lines of VTS Menu 1, one for the English, one for the French. This is the main difference between the Menu PGCs and VTS PGCs (titles), there can be a different Menu PGC list for each language.
At the bottom you will find the PGC list. Click on VTS 1, so as to see what a Title PGC looks like.
Each PGC appears as follows:
I'll explain the new terms...
• The VTSTitle number corresponds with the title number in the VTS. Make sure you don't confuse it with the title number in the DVD.
• The PGC duration is expressed in hours/minutes/seconds/frames. Frames are a subdivision of a second well known to those who work with video. All you need to know is that on a DVD, there are 25 frames a second in PAL mode and 30 frames a second in NTSC.
• The Number of angles: A DVD can manage up to nine angles.
• The Number of soundtracks: (Audio stream) there can be up to eight soundtracks.
• The Number of subpictures: I use the term subpictures because although subpictures are used to generate the subtitles of a film, they are also used for other things, for example to show the selection of a button in a menu or to make white rabbits appear in the middle of a film. A DVD can manage up to 32 subpictures.
• The Number of Pre, Post, and Cell Commands: The Commands are instructions executed by the DVD player. These instructions contain the intelligence of a DVD. It allows you to modify the internal registers, to make tests and execute all kinds of procedures depending on the results. The Pre commands are executed when the PGC begins, the Post commands are executed when the PGC ends, and the Cell Commands are executed when the display of a Cell ends, if the DVD designer requires it to. The total number of Pre commands, Post commands and Cell Commands cannot be more than 128.
If, at the top of zone 1, you select Titles instead of All PGCs, you will see a complete list of the PGC titles on the DVD. You will no longer have access to First Play, nor to the Menu PGC lists.
The display is slightly different since, for each PGC, it shows the corresponding title number as well as the number of the VTS file where the title is found and also the PGC number in the VTS.
For example, if you have Title 5 - VTS 2 - Pgc 4, this means that the PGC of title 5 can be found in file VTS_02_0.IFO and that it's the PGC number 4 in that file.
If you select a title in that list and you return to the All PGCs mode, you will see the same PGC selected.
5. Zone 2: data
In zone 2 all the data on the DVD is grouped together. There are three types: DVD data, IFO data and PGC data.
The selector to the left of the zone allows you to choose what type of data is displayed.
DVD allows you access to general DVD parameters, such as the Provider ID, or which regions the DVD is authorized for.
IFO allows access to the general parameters for First Play, the VMG Menu, the VTS Menu or the VTS (Titres), according to the choice made at the top of zone 1.
PGC allows you access to the PGC parameters selected at the bottom of zone 1.
5.1. DVD Parameters
• DVD version: format version of the DVD, normally 1.1, and usually there isn't any reason to change this.
• Volume/Side: the volume number and the side of the DVD.
• Provider ID: the name of the DVD's designer, or the production house.
• Authorized Regions: Section indicating the geographical region where the DVD is authorized to play. The world is cut into 6 regions, each region carrying a number from 1 to 6. This is so as to protect the rights of the film distributors and avoid that a film that has been released early in one region, cannot be seen in another. The DVD players sold in each of these regions are made so that they can only read DVDs authorized in their region and prohibit any others. By modifying these options, you are indicating in which regions the DVD is authorized and those for which you prohibit it. Region 7 is not currently available and region 8 is allocated for planes, cruise ships and hotels.
5.1.2. Parental Management
Not implemented. In a future version this tab will allow you to modify the parental control parameters on the DVD.
Not implemented. In a future version, this tab will allow you to configure the text on the DVD. The main use of these parameters is to give the DVD a name which could be read in some players, but it has even greater possibilities since you could give a name to each title, each chapter and to other pieces of information. In practice, very few DVDs contain this information and even fewer players are capable of exploiting them, being used instead almost exclusively for Karaoke DVDs.
5.2. IFO Parameters
One further important DVD notion not yet discussed is that of the notion of domain. Each domain contains 1 or more PGCs. In fact, this corresponds to each line of the table at the top of zone 1 except when there are lots of languages for the VTS Menu, all of which form part of the same domain.
There are four types of domains: the First Play, the VMG Menu, the VTS Menu and the VTS (titles). The VIDEO_TS.IFO file contains the First Play domain and the VMG domain, while each VTS_xx_0.IFO file contains the VTS Menu domain and the corresponding VTS domain.
Each domain has its own Video, Audio and Subpictures parameters, except for the First Play which can't display any film.
It's important to note the close link between these parameters and those contained in the MPEG stream of the films. If you position the parameter to a value which doesn't correspond to an MPEG stream, the result is uncertain, some players read the IFO information to display the film while others only take the MPEG stream parameters into account.
It is also worth noting that all these parameters concern the totality of any given domain. If the domain contains lots of videos, they must all be encoded in the same way. It would be impossible for example to have a film in PAL, and one in NTSC in the same domain, or a film in 4:3 and one in 16:9. You are obliged to put them into separate domains.
Since the whole of the VTS Menu for any given VTS file is part of the same domain, there can't be any parameter specific to one language. For instance, if the VTS Menu 2 French has two audio tracks, the first one with 2 channels and the second one with 6 channels, is would necessarily have to be the same for the VTS Menu 2 English or the VTS Menu 2 German.
The Language parameter for the VMG Menu and the VTS Menu, is an exception to the rule because it isn't part of the domain parameters, instead it belongs to a sub-division of a domain known as an LU (Language Unit) which allows different menus to be displayed depending on their language.
5.2.1. Video Attributes
Encoding type MPEG-1 or MPEG-2, following the PAL or NTSC standards, following a specific resolution and compression in VBR (Variable Bit Rate) or in CBR (Constant Bit Rate). All these attributes must correspond to real video stream encoding parameters.
There remains the Aspect attribute. This tells the DVD player how it has to display the image on screen. Five possible values are: 4:3, 16:9, 16:9 auto pan&scan, 16:9 auto letterbox and 16:9 auto pan&scan and letterbox.
Let's leave aside the last case which we will examine later.
Notice that whatever the original aspect ratio of an image (16:9 or 4:3), it records to the DVD in one of 8 possible resolutions (not counting the MPEG1), 4 for PAL and 4 for NTSC. In 99% of cases, the resolution used is 720x576 in PAL and 720x480 in NTSC, but in all cases, the picture is recorded distorted.
||to 720x576 (PAL)
||to 720x480 (NTSC)
When the DVD player needs to know how to display a picture, it reads the Aspect attribute, the picture will then be distorted or truncated depending on the attribute.
The following table shows the different outcomes according to the aspect ratio of the original picture, the screen format, and the value of the Aspect attribute.
||On a 4:3 screen
||On a 16:9 screen
||On a 4:3 screen
||On a 16:9 screen
|16:9 auto pan&scan
|16:9 auto letterbox
To recap: if your original picture is in 4:3, you have to put the attribute on 4:3 so that it doesn't appear distorted on a 16:9 screen, if your original picture are in 16:9, it will be truncated in pan&scan mode on a 4:3 screen and reduced in letterbox mode.
And the 16:9 auto Pan&Scan and letterbox mode, I hear you say? In fact, this corresponds to one of these last two modes, and this is chosen according to the preference entered by the user of the DVD player.
5.2.2. Audio Attributes
A DVD can manage up to 8 audio tracks. Don't confuse audio tracks with the audio stream integrated to the MPEG data (see further on, the audio attributes of the PGC).
Each track is numbered from 0 to 7. It's this number which is used in the commands to designate the audio track to be used.
To add a new track, you just have to click on , or to delete one, just click on .
The track order can be modified using drag and drop by clicking on the audio track, holding the mouse down, and moving it to the required position. The track order corresponds to the order in which they are selected each time the user pushes on the Audio button of their remote control.
By default, only the main attributes of the audio tracks are visible. In order to make all the attributes appear, you have to click on the small triangle just next to the track number. All these parameters are directly linked to the audio stream, so you have to use their true values.
The most useful parameter is Language which corresponds to the name of the language which is displayed when the user pushes the Audio button on the remote control.
5.2.3. Subpictures Attributes
A DVD can manage up to 32 subpictures tracks, except for the menus where there is only one. Once again, don't confuse subpicture tracks with subpicture stream. Each track is numbered from 0 to 31 and the number is used in the commands to designate which subpicture track to use.
To add a new track, you just have to click on , or to delete one, just click on .
The track order can be modified using drag and drop. The track order corresponds to the order in which they are selected each time the user pushes on the subtitle button on the remote control.
Language allows you to indicate which language the subtitle corresponds to. This is because although subpictures aren't just used for subtitles, it is their principle use.
Type designates the use to be made of the subpicture when it is a subtitle.
Encoding. Designates the coding algorithm of the subpictures. I only know the 2-bit RLE. If you ever come across a DVD with a Extended encoding, please let me know about it.
5.3. PGC Parameters
This gives access to all the parameters of the PGC selected in the lower part of zone 1.
5.3.1. 'Information' Tab
Here you have the general parameters of the PGC.
- PGC Entry: This parameter depends on the type of PGC.
- In the VMG Menu, you can indicate the PGC called Title Entry. The PGC Title Entry is the PGC executed when the user pushes on the Title button on his remote control. There can only be one single PGC Title Entry.
- For the VTS Menu, it allows you to indicate if the PGC is a specific entry.
- root: the PGC is executed when the user pushes on the Menu button of the remote control.
- subpicture: the PGC is executed when the user pushes on the Subtitles Menu button on the remote control. This button is present on only a very few players. Not to be confused with the Subtitle button.
- audio: the PGC is executed when the user pushes on the Audio Menu button of the remote control. This button is present on only a very few players. Not to be confused with the Audio button.
- angle: the PGC is executed when the user pushes on the Angle Menu button of the remote control. This button is present on only a very few players. Not to be confused with the Angle button.
- chapter: the PGC is executed when the user pushes on the Chapter Menu button
There can only be one PGC of each type per VTS Menu.
Apart from the root entry, the others aren't often used. In fact, when they are, it's so as to easily access a PGC in the commands, the keys are then forbidden using the Prohibited User Options (see further on).
- For the VTS (title), the PGC entry of a title can be shown. Sometimes a title can be over many PGCs, when that's the case, the PGC entry indicates which one will be executed when the title starts.
- Pause: Allows it to stop on the last image of the PGC. The pause can be infinite, in this case, pushing any button on the remote control will cause the player to continue reading immediately, or within 1 to 254 seconds.
- Mode: There are three possible playback modes for the PGC:
- Sequential: the Cells are read in that order.
- Random: The Cells are read in a random fashion. The same Cell can be seen many times.
- Shuffle: The Cells are read in a random fashion but no Cell will be seen a second time until all the Cells have been seen.
- Audio Parameters: Configuration of the audio tracks used by the PGC and selection of the corresponding audio stream.
- Subpictures Parameters: Configuration of the subpictures tracks used by the PGC and selection of the corresponding subpictures stream.
- NextPgc: Number of the PGC started with the command Link NextPgc, or for titles recorded onto many PGCs, when the player has to go to the next PGC. This parameter only appears in VTS domains.
- PrevPgc: Number of the PGC started with the command Link PrevPgc, or for titles recorded onto many PGCs, when the player has to go to the previous PGC. This parameter only appears in VTS domains.
- GoUpPgc: Number of the PGC started with the command Link GoUpPgc, or when the user pushes on the GoUp button (also called Return) on the remote control. In the VTS Menu domain, GoUpPgc can also execute a Resume, which will cause the return to the last title being read.
But why this selection of audio tracks and subpictures: it's a possibility which is used frequently. Look at films which offer a bonus audio commentary by the director. The commentary is in fact just a specific audio track. The VTS (title) of the film will be composed of two PGCs, the first one will have all the selected audio tracks except for the commentary, the second will only have the commentary selected.
You're going to tell me that if there are two PGCs, the film will take up twice the amount of space. No it won't, because the PGCs only provide references to the video stream. The two PGCs reference the same video stream.
5.3.2. 'Cells' Tab
This is definitely the most important tab, showing the list of cells in a PGC.
- Cell: The number of the cell.
- Title: The number of the title and the chapter corresponding to that cell.
- Prgm: The number of the program, when the cell is also the beginning of a program. Remember that if all titles/chapters correspond to a program, a program isn't necessarily the beginning of a chapter.
- Angle: The number of the angle. This only appears with multiangle titles.
- Playback time: Duration of the cell, in hours, minutes, seconds, frames, followed by the number of frames per second (25 for PAL, 30 for NTSC).
- Time/Still Time: Clock, when the player arrives at the end of the cell, or when there's a pause, the amount of time when the last frame of the cell will remain visible. This option is often used in slideshows, or to display a copyright. Infinite pause means that the player will stay on the last frame, awaiting for the user to push one of the remote control buttons. This option is usually used to display fixed menus.
- VobId: Objects reference. In other programs, you will usually find two numbers, the VobId and the CellId. I found it easier to group it under one name. The IFO file contains the Cell Address Map table used to find each object address in the VOB files from the VobId.
There are many reasons for this indirectness. It allows you to access the same Objects in two different cells. So for example you can have two PGC presenting exactly the same film, thus with the same VobId, ut with a forced subpicture stream or with different commands.
The second reason is to allow the non-sequentiality of the Object in the VOB files. When the PGC is multiangled, during the making of the VOB files, the objects are not recorded by placing all the objects with angle 1, then all the objects with angle 2, etc. Instead, it places first one object with angle 1, then one object with angle 2, and then it starts again. This allows it to go much quicker in finding an object when the angle changes.
- Command: The Cell command to execute at the end of the cell, the number corresponds to the number of the command line which must be executed in the Cell Commands.
The small triangle next to the cell number allows you to configure it.
- Pause: Allows you to configure a pause at the end of the cell.
- Command: Let's you select the command to be executed at the end of a cell. The command must be recorded beforehand in the Cell Commands.
- Seamless playback: If playback is interrupted it would mean that the player had stopped decoding the MPEG stream, and had emptied the memory ready to start a new decoding. Because many tenths of a second are needed to display a new image, interrupted playback is very visible if it happens in the middle of a film. Thus it must be avoided if at all possible. However, there are certain instances where interruption is inevitable, even indispensable.
- Inevitable when for instance the DVD player needs to execute a command. In fact, the DVD Forum has imposed the interruption of a film's playback in order for a command to be executed, whether it's a Post-Command, an order to change the PGC, or a Command Cell. Thus you can't use a Command Cell to choose the next Cell without it being visible, unless you go through a black screen.
- Indispensable also when you change the DVD layer. Because changing layer can only happen if the MPEG decoder has stopped. See the note below about changing layer.
- STC (System Time Clock) Discontinuity: The DVD player has a clock system called STC (System Time Clock) which permits the synchronisation of the decoding of images from the sounds or subpictures, then their display on the screen. This parameter informs the player that there is a discontinuity of the STC, in other words the value of the STC at the end of the last frame of the preceding Cell no longer corresponds with the value of the STC of the first frame of the new Cell. The DVD player must therefore resynchronise the STC.
There is often an STC discontinuity at the start of every Chapter, and even every Cell.
- Restricted Access: DVD players allow the possibility of fast forwarding or playing back a picture, at variable speeds. When the player comes across a Cell marked Restricted Access, it immediately returns to normal speed. I, personally, have never come across a DVD using this function.
- Interleaved Objects: As explained in chapter 2, a film is constituted from many objects, also called VOBU. Normally, these objects are recorded in the .VOB files, one after another, but not always. Let's examine the case where you want to have multi-angles.
If the angles are of large size, when you change the angles, the DVD player's laser will have to carry out a displacement which will take a long time. If the time is too long, the memory buffer of the player risks rupturing data and the player might interrupt the MPEG decoder, or even display an error. To avoid this, the Objects are placed alternating.
This way, the passage from one angle to another is almost instantaneous and without interruption during playback.
The Interleaved Objects parameter signals to the DVD player that the objects of that Cell are mixed with the objects of another Cell.
When a DVD contains too much information for one layer, you can use a dual layer DVD. The first layer is called Layer 0 and the second one Layer 1.
A DVD is made up of data recorded on a unique spiral which goes from the centre of the disc outwards to the exterior of the disc. When there is a second layer, this one can either begin from the exterior of the disc and go inwards to the centre, this is called OTP (Opposite Track Path), or go from the centre of the disc out towards the exterior and this is called PTP (Parallel Track Path).
The OTP mode is systematically used for video DVDs so as to reduce the time taken to change layer. The PTP mode is most often used for DVDs containing computer data, since each layer can be treated separately, a bit like the two sides of a record.
Using the OTP mode leads to certain obligations:
- Correct positioning of the moment when you change layer. In fact, in OTP mode, Layer 1 must obligatorily be equal to or less than Layer 0.
- The moment of layer change must be placed at the start of a Cell which must be marked Seamless Playback: No.
If you modify a DVD by deleting objects placed before the change Layer point, it can happen that the size of Layer 0 becomes smaller than Layer 1. Then it will no longer change Layer. In a future version of myDVDEdit, you will be able to correct this type of problem.
5.3.3. 'Palette' Tab
These are the colors used to draw the subpictures (I should mention in passing that buttons are also subpictures).
There is the possibility of saving a color palette by using the Save as... option in the Presets control. These saved palettes can be used at any time.
You can also use one of the predefined palettes.
There are three display modes for color information:
- (R, G, B) shows the red, green, blue component of each color.
- (Y, Cr, Cb) shows the luminance, the red chrominance and the blue chrominance of each color.
- (R%, G%, B%) shows the percentage red, green and blue of each color.
You can modify the type of display mode whenever you wish. You can also modify the type of default display mode within the preferences in myDVDEdit.
5.3.4. 'Pre Cmds' Tab
Pre Commands. Commands executed at the start of the PGC PGC.
The number in brackets, in the name of the tab, gives you the number of Pre-commands.
5.3.5. 'Post Cmds' Tab
Post Commands. Commands executed at the end of the PGC, that is, when the last Cell of the PGC is finished and that no Cell Command is affected by it.
The number in brackets, in the name of the tab, gives you the number of Post-commands.
5.3.6. 'Cell Cmds' Tab
Cell Commands. Commands executed at the end of a Cell, if it is programmed to do so.
If you want to execute a command at the end of a particular Cell, you first have to create the command in that tab, then go into the Cells tab to modify the desired Cell.
5.3.7. 'Prohibited User Options' Tab
This tab shows the Prohibited User Options. For example when the Stream Change - Audio option is checked , then this prohibits the user from changing the audio track in mid-playback.
These options can be used on three levels:
- At the PGC level.
- At the Title level: The options, Time Play or Search and Chapter Play or Search, can be prohibited at the Title level. If the title uses lots of PGCs, all those PGCs will have the same Title level Prohibited User Options.
- At the object VOB level: These options will be prohibited during the whole playing of that object. The current version of myDVDEdit does not allow you to modify the Prohibited User Options at the VOB level.
Only one option needs to be prohibited on one of these levels for the DVD player to prohibit it.
5.4. The Command Editor
myDVDEdit allows you to modify your commands. To do this, click on the small triangle to the left of the command and the editor will appear; you can then modify it completely. It's a contextual editor, which means that the available commands and their possible values for any command will depend on the type of PGC, and the available resources. If you want to make a Jump Title/Chapter, only the available titles will be proposed and only the available chapters for a title will be shown.
You can add a new command by clicking on the [+] button located at the bottom of the window, or by using the [+] key when the command table is selected. If a command is selected in the table, the new command is inserted just beneath it. If many commands are selected in the table, the new command is inserted just after the last selected command. If no commands are selected, the command is added at the end of the table.
You can delete one or more commands by selecting them and then clicking on the [-] button located at the bottom of the window, or by pushing the [-] key or backspace.
You can modify the position of a command using the mouse to click on the command and then dragging it to the desired position.
You can move lots of commands in the same way by selecting the whole set of commands to be moved
You can Cut, Copy, and Paste one or many commands by selecting them and then calling up the corresponding command menu.
All these modifications to the commands can be Undone or Redone with the corresponding command menus.
These modifications won't be saved to disk until the File/Save menu has been called up.
The Goto Adjusted option allows the automatic modification of all Goto line addresses during insertion, deletion, or move of one or more commands.
For example, if the code is as follows :
1 if(R0=4) Goto 3
3 Jump Title 2
If you select 2 and click on the [+] button with the Goto Adjusted option on, the Goto of line 1 will be corrected.
Your new code will read:
1 if(R0=4) Goto 4
4 Jump Title 2
The command number still available is shown at the bottom of the window. For each PGC, the total number of pre commands, post commands and cell commands cannot exceed 128.
5.4.1. The Commands
I am sorry to tell you that I can't give you the complete documentation of DVD commands. This will be the subject of another documentation when I have time to write it.
I suggest you visit the following English language sites (dvdinfo and dvd-replica) which will allow you to know more about these well-known commands.
|Please note: Let me state again that I have never had the official DVD documentation (if you know the price, you'll understand why). myDVDEdit has solely been written by cross-referencing information found on different sites, various forums on the subject, or by looking at freeware sources. All this information is sometimes contradictory, so it is possible that some of the commands are incorrect or are not available even though they should be and vice versa. If you come across this sort of problem, please feel free to let me know...
6. Zone 3: The Object of myDVDEdit
Zone 3 allows the visualization of objects in the selected cell within the Cells tab.
Here, you will see the control buttons that enable you to move to the previous or the next objects, a slider to select the exact object required, and the display screen of your objects (presumably you've already understood this).
Located at the top left, above the screen, is the ratio indicator (16:9 or 4:3). If you click on it, you will be able to see your film in either type of screen.
Often, in a DVD, the images are recorded in 16:9 but are compatible with 4:3, which means that when you go into 4:3, the image goes into LetterBox mode. You will find this information in the IFO tab under the term 16:9 auto letterbox aspect. Now if you look a Menu PGC, you will see that it is usually in 16:9 auto pan&scan. This means that when the screen is in 4:3, the image is not reduced, but the left and right sides of the image are truncated.
Just next to it is a small selector for choosing between, displaying the DVD screen, or displaying the data of the object. I won't go into the significance of these parameters here and I've merely mentioned them for information purposes. For those who wish to know more, look at the following documentation MPEG-2, ISO/IEC 13818-2, but you'll have to persevere with it, it's not simple.
At the bottom left of the screen is the frame time of the object. This can be displayed or not by changing the option in preferences.
Next to it, the state of the GOP is displayed (as defined in chapter 2). signifies that the GOP is closed and that it is open. This display can be hide by modifying the option in preferences.
A GOP is said to be closed when it is not dependent on the previous GOP. When it's open, on the contrary, the DVD player needs the last frame of the previous GOP in order to construct the first frame of the new GOP.
This information is important when you want to cut part of a film. When you cut it at the level of an open GOP, it's necessary to close it, which usually causes the loss of 1 or 2 extra frames.
Above the image, you'll find a recap of the position of the object selector. If you put the mouse on it and wait for 2 seconds, the information will appear with the exact position on the disc of that object: the file name, the starting position of the object in that file, and the sector.
A sector is 2048 bytes. An object contains a mixture of soundtracks, subpictures, and video. In fact, they aren't actually mixed up at all but are multiplexed. In other words one has, for example, 4 sectors of video, 2 sectors of audio stream 0, then 2 sectors of audio stream 1 and then 6 new sectors of video. The whole lot allows for different decoders to be working at the same time (the MPEG decoder, the audio decoder, the subpicture decoder) and never be short of data.
Since you now know that an object is always an offset multiple of 2048, all the tables to find it with will provide not its offset but its sector. This means that the values are a lot less important.
7. Zone 4: The Subpictures
First of all, what is a subpicture ? Literally it means a subimage, but in fact we should really talk about over-images because the image comes on top of the film.
The subpictures are multiplexed with the video stream and the audio's specific stream (for the experts: private stream 1, id 0x20 to 0x3F).
The picture is coded with 2 bits per pixel, which means that each point on a picture can have four possible values. These are:
- 0 : Background color (or B).
- 1 : Pattern color (or P).
- 2 : Emphasis 1 color (or E1).
- 3 : Emphasis 2 color (or E2).
The subpicture stream also contains a table for each of the values corresponding to the color in the PGC Palette and a contrast. The contrast is a value from 0 to 15, where 0 is transparent and 15 is opaque. All the values between 0 and 15 therefore correspond with a level of transparency.
Whatever the resolution of the film and the display mode (16:9 or 4:3), the subpicture always has a resolution of 720x480 in NTSC, and 720x576 in PAL, but usually only a part of the image is coded as the rest of the image is transparent.
All this could easily have been encoded with just a few bytes, but that would be underestimating the overflowing imagination of the inventors of the DVD. Instead, they created SP_DCSQ, or if you prefer, the SubPicture Display Control SeQuence.
The SP_DCSQs are linked command tables containing the following:
- A time delay: The time to wait before executing the commands.
- A pointer to the next SP_DCSQ, or points to itself if there isn't another SP_DCSQ.
- A set of commands. There are nine possibilities:
- End : Ends the SP_DCSQ.
- Start Display : Displays the subpicture.
- Forced Start Display : Forced display of the subpicture, used for menus or to force the display of a subtitle, even if no subtitle is activated (to understand an alien, for example).
- Stop Display : Fades out the subpicture.
- Set Color : A command followed by the number of the colors to use for th B, P, E1 and E2 pixels.
- Set Contrast : A command followed by the values for the contrast of the B, P, E1 and E2 pixels.
- Set Display Area : Defines the display area of the subpicture.
- Set Pixel Data Address : A command followed by two offsets, the first one to define the pixels on odd lines, the second one to define the pixels on even lines. There are two pixel tables because the DVD is usually meant for television, which displays odd lines first, then the even lines (the well-known interlacing). This is easier for the decoder.
- Change Color and Contrast : This command is rarely used. It allows you to define the zones where the colors and contrasts will be different. As we have already seen, there are four possible values per pixel, so normally, there can't be more than four different colors in a subpicture (and usually only three since there has to be a value for transparency, usually in the Background color). This command allows you to have a lot more by dividing the image into zones where the colors and contrasts are different. This is, however, limited, because the image is cut into vertical bands of varying width and each band can be cut horizontally without there ever being more than 16 zones.
The first SP_DCSQ must contain at the very least : Set Color, Set Contrast, Set Display Area and Set Pixel Data Addresses.
The total size (including the commands) of the subpicture data cannot exceed 53220 bytes.
7.1. subpictures management in myDVDEdit
Select a VTS, and choose one with preferably lots of subtitles. Select Informations of the PGC tab. You should then see the list of your subpictures (lines with an icon of a screen with subtitles on it). With subpictures used to display subtitles, there's a strong possibility that it will show the name of the language corresponding to the subtitle language, and there should also be the subpicture stream number for 16:9 and also one (often the same) for the letterbox.
Position the object selector until the information appears in the Subpictures tab.
In this window, you will recognize the SP_DCSQ under the name Sequence, followed by the time to wait before executing the commands. There is also a list of the commands described previously. You will never see the commands End and Set Pixel Data Addresses.
Warning: The Change Color and Contrast command has not yet been implemented in myDVDEdit. If your DVD uses it, the image rendered will be incorrect.
The title of the window indicates the subpicture stream number. By finding this number in the Informations tab on the PGC window, you can find which language it corresponds with.
Under the window on the right is a numerical value. This indicates the number of subpicture stream in the selected object.
On the left is a stepper (a small control with an arrow pointing up and one pointing down). This allows you to select the stream displayed in the Subpictures tab when there is more than one..
Beneath the window is a pop-up menu which allows you to select what you want to be displayed on-screen.
- Hide all subpicture streams : The subpictures no longer appear on-screen.
- Show all subpicture streams : This shows the subpicture selected in the tab which appears on-screen.
- Show subpicture stream n : This shows the selected subpicture, and only this one, which is displayed on-screen.
7.2. Subpictures May Be Used As Buttons
I know you'll say I'm repeating myself when I remind you that subpictures are also used to make buttons, but let's see how.
Button definitions are placed in a special packet called PCI (Presentation Control Information) which is always in the first sector of each Objet (remember, first sector has 2048 first bytes). Whether it contains buttons or not, this packet is always present.
There is a table which can contain the definitions for up to 36 buttons.
For each definition, you'll find the following:
- The position of the rectangle used as the action zone of the button in the image.
- A table number from among three possibilities giving the colors and contrasts when the button is selected, as well as the colors and contrasts for when the button is activated.
- An Auto action flag. If this option is used, the button becomes active the moment it is selected to avoid the user having to press ENTER.
- The number of the next buttons when using remote control keys to navigate with.
- One command (yes, a single command). This is the command executed when the button is activated.
How does all this work?
First of all, a subpicture is used to display the buttons in their normal state (not selected, not activated). When the button is selected, the part of the subpicture as defined by the button rectangle is redrawn without the colors and contrasts defined in the subpicture commands, but with those from the table of selected button colors. The same is true for when the button is activated (when the user pushes ENTER) except that it uses the colors and contrasts from the table of the activated mode colors.
Is that any clearer? If not, then take another look at myDVDEdit.
Select a VTS Menu. Choose a PGC, it must have at least one subpicture.
As soon as myDVDEdit detects an object with a button, the Button tab is displayed.
Note, if you want to see the button on-screen, you have to position the mouse on the object containing the button subpicture.
For now, forget the upper part of the Buttons tab. In the bottom part, you will see for example, Button 1/5. This means that button number 1 is selected out of a total of a possible 5 buttons. The stepper next to this allows you to choose the button you want to select. You can also select a button by clicking on it on-screen.
Just below, you will find the definition of the selection zone of the button. To the right you will see the number of the selected buttons when the user pushes on LEFT, RIGHT, UP, or DOWN with the remote control..
below , is the color table number used.
To the right is the Auto action option.
Finally, right at the bottom, is the command that will execute when the button is activated.
When a button is not selected, it's drawn using the normal colors of the subpicture. As soon as you select it, and it becomes active, it will take the colors from the color table of the corresponding mode.
Suppose the color table indicates 1. Click on the Color tab. Selection 1 will show you the colors and contrasts it uses to redraw the subpicture when the button is selected. When the button is activated, it will use the colors and contrasts in Action 1.
OK, is that clearer now?
I told you about a table which can contain the definitions for 36 buttons. Therefore, you think that you can have 36 buttons on screen. Well,...yes and no.
When an image is in 4:3, that's no problem, whether the screen is in 16:9 or 4:3, the image and the subpicture display in 4:3.
However, when the original image is shot in 16:9, there are three possible outcomes.
- Image in 16:9 on a 16:9 screen. The image isn't changed.
- Image in 16:9 on a 4:3 screen displayed in letterbox. The image is reduced.
- Image in 16:9 on a 4:3 screen displayed in pan&scan. The image is truncated.
Whatever the mode used, the images are always in 720x480 in NTSC or 720x576 in PAL. Whether the screen is in 16:9 or 4:3, the subpicture will always occupy the whole screen. You understand by now that the position of the button absolutely cannot be the same in all modes since the film and the subpicture cannot undergo the same deformation.
In the top part of the Buttons tab, you'll find the Group selector. There can be one, two, or three possible options depending on the film characteristics. By selecting each of these options, you will see the characteristics of each button in the corresponding mode.
Since the Button table can only contain 36 entries, if there is only one option you could have 36 buttons, but with two options you can only have 18 buttons, and with three options (rarely used) you can only have 12 buttons on your screen.
Normally, a button defined in one mode will be the same in the other modes, but theoretically nothing should stop you from having a button which is different in different display modes.
To finish with all these buttons, here are the rest of the options:
- Force Select Button: Allows you to automatically force the selection of a button after a specific time.
- Force Action Button: Allows you to automatically force the activation of a button after a specific time.
- Delay: The time to wait before a button is automatically selected or activated.
- Frames: Allows the display of the button selection rectangle.
- Numbers: Allows the on-screen display of each button number so as to locate them more easily.
- Select all: Allows the display of all the buttons in their selected state. Note that the buttons are drawn with the color tables for a current button. Buttons which don't use the same table will not be displayed correctly in this mode.
If you double-click on the command of a button, or in the selection zone of an on-screen button, and that command is one that moves you to another PGC/Cell/Program, then this new PGC/Cell/Program will be displayed.
8. Zone 5
The first important element in this zone is the mode selector for the functioning of myDVDEdit.
When the cursor is positioned to the left , myDVDEDit is in Edit mode.
When the cursor is positioned to the right , myDVDEdit is in Debug mode, which we will look at in chapter 9.
In Edit mode, the first table in zone 5 displays the size in bytes of different elements of the DVD.
- Dvd: This is the total size of the DVD. To fit on a single DVD, it must be less than 4.707.319.808 bytes, but you have to leave a small margin of error since formatting a DVD uses a good few thousand bytes.
- Pgc : size of the current PGC.
- Cell : size of the current Cell.
- Obj : size of the current object.
- Sel : size of the selection.
The selection is a collection of objects defined by the starting and finishing positions in the current PGC.
In the current version of myDVDEdit, the selection isn't yet usable, but soon it will be very useful for defining zones to cut, copy or export.
The Selection table provides the starting and finishing positions of the selection.
- displaces the cursor to the memorised position.
- memorises the current position as being the start of the selection.
- memorises the current position as being the end of the selection.
- deletes the selection.
The trash can in the current version is only there for information purposes. It allows you to know whether there are any objects present in the VOB files which aren't referenced by any PGC. These are therefore useless objects. A future version will allow you to delete them.
9. The Debug Mode
One of the major benefits of myDVDEdit is it's Debug mode which allows you to execute step by step, each command in the DVD.
To go to Debug mode, move the mode selector to Debug position, or click on Start Debug in the Debug menu.
9.1. Zone 4 Debug
In Debug mode, the tabs in zone 4 change. Two new tabs appear: Regs and System Regs.
- The Regs tab displays the content of the General Registers, also called GPRM (General Parameters). There are 16 of these registers which are completely modifiable by program. They allow you to do arithmetical or logic operations, or to keep data between two playbacks in order to know what needs to be done next.
Each register can contain an unsigned integer, with a value from between 0 and 65535, or between 0x0000 and 0xFFFF in hexadecimal.
By default, myDVDEdit uses the letter R to designate the registers. If you prefer to call them GPRM, you can change the corresponding option in Preferences.
When a register is modified by a command, it appears in red in the table.
The command Set Register Mode allows you to modify the mode of the register and to change it into counter mode. The word Counter appears on the line and the value of the register automatically increases by one each second.
The registers are reset to zero each time Debug mode is launched.
- The System Regs tab allows you to display the content of the System Registers, also known as SPRM (System Parameter). There are normally 24, but only the first 21 are currently used. They are 16 bit registers whose values determine the state of the player. If most of these registers are just in playback, some can be modified using special commands.
By default, to simplify reading the commands, myDVDEdit uses a generic name to designate these registers, but if you prefer to use the term SPRM or a combination of both, you can modify the corresponding option in preferences.
The registers are reinitialised to their value by default each time Debug mode is launched.
A 2 character code (ISO 639 norm) for the country of the menu's preferred language, defined in the preferences.
0 to 7: current audio track number.
15: no audio track.
||Bits 0 to 5: number of the current subpicture track (0 to 31), or 62 (none), or 63 (forced subpicture)
Bit 6: 0 = masked subpicture, 1 = visible subpicture.
||1 to 9: current angle.
||1 to 99: current title.
||1 to 99: current VTSTitle.
||1 to 32767: current PGC.
||1 to 99: current chapter.
||1 to 36: current selected button.
||0 to 65535: automatic second counter, once at 0, the player executes the PGC saved in the navTimerPgc.
||1 to 32767: Number of the PGC from the current VTS executed at the end of navTimer.
||Mixing mode of the audio during the playback of a karaoke disc.
||2 character code (ISO 3166) for the country of parental management.
||1 to 8: current parental level.
||bits 8 and 9: 0=4/3 or 16/9, 1=pan&scan, 2=letterbox.
bits 10 and 11: 0=4/3, 3=16/9.
||Each bit defines whether the player is capable of using a specific audio format. The main ones: bit 11=DTS, bit 12=MPEG, bit 14=Dolby Digital.
||2 character code (ISO 639) of the country of preferred language for the audio, defined in the preferences.
||Type of audio track preferred: 0=not specified, 1=normal, 2=for visualy impaired, 3=Director's comments, 4=Alternative Director's comments.
||2 character code (ISO 639) of the country of preferred language for the subpictures, defined in the preferences..
||Preferred type of subpicture.
||Region code of the player as defined in the preferences. bit 0=region 1, bit 1=region 2, bit 2=region 3, etc...
9.2. zone 5 Debug
In Debug mode, step by step buttons appear in zone 5, equivalent to the remote control of the user..
||During the execution of the Pre/Post/Cells commands, it executes the current command. When a Cell is being read, it passes to the next Cell, or if it's the last, displays the next command to be executed.
||Only available if there is a button available on screen, it executes the command of the selected button.
||Executes all the following commands until the next Cell, or until the next breakpoint.
||Preceding Chapter button of the remote control. Does nothing if there is no preceding chapter..
||Next Chapter button of the remote control. Does nothing if there is no next chapter.
||Menu button of the remote control. Stops playback of the current title and launches the VTS Menu (root) of the current VTS.
||Select Subtitle button. The selection is from among selected tracks in the Information tab and according to the order defined in the IFO parameters.
||Select Audio track button. The selection is from among the selected tracks in the Information tab and according to the order defined in the IFO parameters.
||Select Angle button.
||Enter button to activate the current menu button. The command associated with the button is executed.
||Navigation buttons. Allow you to change the button selected. The choice of the next button selected is defined at the level of each button.
The buttons can be deactivated. There are 2 main reasons for this:
- The button has no meaning in the context of use.
- The option prohibiting the use of a button has been checked in the Prohibited User Options tab.