Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Another way...same end result' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another way...same end result
Authored by: joshMV4 on Apr 26, '06 02:50:56PM
I agree with the comment above. This isn't using mpeg2 files in iDVD, but rather using iDVD to get fancy menus for your existing mpeg2 footage.

I used to do a lot of this sort of thing, but recently gave up due to the monotony. If you are interested in this sort of thing, here is some of my knowledge...This is many, many, many hours of research online, and trial and error....This is simply another method, actually very simple and fast, once you get the routine down.

First of all, the DVD File Structure DVDs have two folders, an AUDIO_TS and a VIDEO_TS. I have never seen an AUDIO_TS folder with any data. I suspect it was for the "DVD Audio" format that never went anywhere, but was talked about a little many, many years ago. (I think that Toast 7 can make these, but few commercial players will play the disks...anyway). Here is a typical layout of a VIDEO_TS folder.


This is three parts. The files beginning with VIDEO_TS..... are for the menu that starts automatically when you play a DVD and is necessary. The files beginning with VTS_01_... are the first main video on the disc and is necessary. The files beginning with VTS_02_...would be for an additional (but not necessary) 2nd video on the disc, similarly with VTS_03_...

The files ending in .vob are the actual mpeg2 video files. The files ending in .ifo are the information the DVD player uses to properly display the vob file. The files ending in bup are the same as the ifo files (bup => backup file) with a different extension.

The VTS_0x_0.VOB files are not always there (x meaning 1 or 2 or 3, etc...). These are sub-menus. If you press "MENU" while watching the movie, and it jumps to a sub-menu, it is this file. Some DVDs don't have this, and jump right to the main DVD menu. Sometimes this file is there and is just a space filler, from what I can tell.

Disk Organization Using VLC, or MpegStreamClip (with the AppleMpeg2Playback Component), you can view the VOB files on your mac to see what they look like...(Most commercial DVDs are encrypted, and you often can't view these). If I were to look at the VIDEO_TS.VOB file from the disk above, it would be my main menu that I see when I play the DVD. It may have motion, or it may not. It may span various "scenes" for a complex menu, or it may be a static picture with a few links. This particular one, at minimum, has two links to get the the two videos on this disk. The links are not really in the VOB video, but in the VIDEO_TS.IFO file, (which I personally don't know how to read). Using your remote for the DVD Player, clicking on the "first movie" in the menu, triggers the player to start playing the first video on the disk, which is really the first VTS_01_file...For the actual movie, the same story applies here. The Movie is the VOB file, and the IFO file is info about the movie (how long is it, where are the chapters, how many audio tracks, what kind of audio, the resolution (4x3 or 16x9), ntsc, etc...). The file size limit on the VOB files is 1GB (or 1024MB), so depending on length and quality, there may be more than one VOB file for each movie...(Before anyone gets any ideas, I already tried cannot use Hi-Def mpeg2 VOB files on DVDs. The DVD standard written years and years ago didn't allow for any higher resolution than 720x480--Apple DVD player supposedly plays HD-DVDs, and I don't know anything about how this works...)

SO, what this author is doing in this hint, is "stealing" the menu files from iDVD, and linking them to the eyeTV mpeg2 files. (I do this all the time. Think of the VIDEO_TS files as the alias on the desktop and the VTS_01_...files as the real file.) I don't know why he has to demux and then re-mux his VOB files. All he should have to do is rename so the menu VOB points to the correct VTS_ files. Just make sure you keep all the original video segments together (i.e. if renaming from VTS_01_xxxx to VTS_02_xxxx, make sure you get all the BUP, IFO and VOB files). If it doesn't work, it may be some proprietary thing eyeTV does to the files it creates, and de-muxing and re-muxing gets rid of this.

dvdauthor...GEEK alert If you want to keep the same mpeg2 files and add chapters, without re-encoding, you can use ffmepgX to make an mpg file out of the VOB, then use dvdauthor to re-make the VOB files with the new chapter positions where you want them. (dvdauthor will make new VOB files, and also makes the IFO and BUP files.)

Documentation for the program "dvdauthor" is poor unless you are a total geek, so here is what I found after many, many hours....due to my unknown knowledge about the laws of the gnu license, I'll leave it up to you on getting the program. It is free, and even is included with ffmpegX (hint...hint) place the dvdauthor binary file in some directory. You will also need an xml file in the same folder. Command line alert! To run the program, open terminal, change to the directory with the program, and then run it by typing

 ./dvdauthor -x filename.xml 
, where filename.xml is the xml file I mention earlier. Note the period before the /dvdauthor, that isn't a typo.

Here is a sample xml file. Create this in a plain text editor. I use TextWrangler (free), and it even color codes the file

<dvdauthor dest="/new/">
<pgc entry="root">
<post>jump vmgm menu;</post>
<video aspect="4:3"></video>
<vob file="/CSI/CSI#221.mpg" chapters="0,2:12,9:41,19:19,28:48,43:49"></vob>
<post>call vmgm menu;</post>

I won't go through everything, most of it is necessary. There are many other options to expand this file, and with enough searching, you can find it on that internet thing, but info is scarce. Especially since programs like iDVD are so good and cheap anyway, most people don't care about things like this....

**The top line is the destination directory. This is an absolute file path. Your VIDEO_TS folder will be created inside the directory /new/ in this example.
**Aspect ratio is 4:3 in the example above. Another option is 16:9.
**VOB file is the source mpg file. Here my file was called CSI#221.mpg in the folder /CSI/. Again another absolute file path. I am adding chapters at the positions above. Note, commas separate chapter times, format is h:m:s . If no hours is specified, defaults to min:secs.

Putting it all together
Depending on the length of your video, it can take several minutes for dvdauthor to make the folder/files. When finished, it will make a VIDEO_TS folder in the destination directory above. If you do a second video, and keep the same destination directory, it is smart enough to know you already did a first video and rename the second video files accordingly. SO, THE SHORT ANSWER IS move the three VIDEO_TS...files created by iDVD into this new VIDEO_TS folder, and you are good. Preview the VIDEO_TS folder with Apples iDVD player to make sure everything works right. To burn it to a watchable DVD, you need to use either ffmpegX to make a Disk image, or use Toast. Burning the folders directly with Disk Utility will not work.

[ Reply to This | # ]

Another way...same end result
Authored by: Wazzoo on May 05, '06 02:11:27PM

Wow, very detailed and useful. Thanks josh, it explains a bit about why what I did worked, whereas I just kinda bumbled through.

The thing about the demux/mux bit I had to do was, if I just tried to take the eyeTV mpg file and author it as a Video_TS folder ffmpegx couldn't read the file properly. I think its something that eyeTV does to the mpg..I've found on more than one occasion that mpgs produced by eyeTV don't behave the way they should and work in every other program. Demux/muxing was the only way I could get around this.

But thanks for the info, definately will look into messing around with dvdauthor.

[ Reply to This | # ]
a slight variation, which seems to REQUIRE the use of dvdauthor
Authored by: baronworm on Nov 15, '06 01:38:41PM
I found this hint as I was trying to make a tiny change to an existing home-made DVD:

The ORIGINAL dvd was an ultra-simple home movie: one title, one movie.
The NEW dvd needed to be the same, but as a "kiosk" disk where the movie would autoplay and loop.
I tried to use this hint's instructions, but my experience was that the addition of the loop behavior meant that just replacing the three VTS_ files won't work so well.

So instead I went the dvdauthor route, and once I got 'fink install dvdauthor' to work, it was a piece of cake to just pull off the VTS_01_0.VOB file from the original DVD and then tell dvdauthor to make a new DVD with that VOB as the sole, looping, movie.

For others who are looking at dvdauthor, I recommend this excellent page full of xml file syntax examples:

[ Reply to This | # ]