Posted Sunday, June 15, 2003

Hacking iDVD, Part I: Making a Self-Playing, Continuously Looping DVD

The challenge: To create a DVD containing one movie that plays continuously, looping back to the start when it finishes.

The bigger challenge: To use iDVD to do this.

Last week on the Macintosh Digital Video discussion list, a list member posed this very challenge. He had a three-minute movie that he wanted to burn onto a DVD, and he wanted that movie to loop continuously -- it was going to be playing at a trade show booth.

This sort of chore is child's play if you're using Apple's DVD Studio Pro. (Assuming any DVD Studio Pro task can be called "child's play" -- that program can bend your brain, and I will pop a cork when Apple ships version 2.0 this summer.)

But iDVD doesn't provide the kind of playback control you need for a chore like this. You can't specify that a particular movie play automatically when the disc is inserted, nor can you have a movie loop continuously.

Ah, but there is a way to use iDVD to create an auto-playing, auto-looping disc. The basics of the technique were outlined by list member and author Erica Sadun. In this dispatch, I've fleshed them out and added some essential steps.

Erica's trick involves adding your movie as a background menu movie: a background movie loops continuously and plays automatically when the DVD is played. "But," you ask, "doesn't iDVD limit background movie looping to 30 seconds?" Yes it does, and working around that requires a simple little hack.

Step 1. Create the movie that you want to play. You knew that, didn't you?

Step 2. Start iDVD and choose a theme that provides motion menus and no drop zones. The "Global" theme works well; it's in the Old Themes area of the themes list.

Step 3. Kill the title. With the Customize drawer open, click the Settings button. In the Title area, choose No Title.

Step 4. Add your movie as a background movie. Drag the movie into the Image/Movie well in the Background area of the Settings pane. (Don't use the Command-drag shortcut to make the background movie -- its soundtrack won't come in.)

Step 5. Create a slideshow with one image in it. iDVD won't burn a DVD that contains only a background movie and nothing else. To make iDVD happy, simply create a "placeholder" slideshow and add an image to it.

Step 6. Make the slideshow's button stealthy. You don't want someone playing this slideshow, so choose the text-only button format (the T icon in the Settings panel). Rename the button so that its name is a single space: select the button's name and hit the spacebar. Finally, drag the button off to one of the corners of the iDVD window.

If you like, you can test your efforts by clicking the Motion button. You should see the first 30 seconds of your movie playback and loop continuously.

Step 7. Save your project and quit iDVD.

Your next step will be to "hack" your project file to work around iDVD's 30-second limit.

Step 1. Control click on your project file and choose Show Package Contents from the pop-up shortcut menu. As I describe in The Macintosh iLife, iDVD stores a project file as a Mac OS X "package," a kind of sophisticated folder.

Step 2. Open the Contents folder, then the Resources folder. Inside the Resources folder, you'll find a file named ProjectData. Open this file using TextEdit. (Drag the file to TextEdit's icon.)

Step 3. Search for the text MotionDuration. You'll be modifying the value at the bottom of this area (see the highlighted value at left).

Step 4. Replace the existing value (30) with the length of your movie, in seconds. For example, if your movie is 4 minutes and 50 seconds long, replace 30 with 290. Save your changes and quit TextEdit.

Step 5. Re-open the project in iDVD and test. Turn motion and previewing on, and watch. Your movie should play from start to finish, and then repeat.

Step 6. Burn, baby, burn. You're done; happy burning.

I don't think I'd try this technique with a long movie -- some players may not be able to handle a 30-minute looping background movie. But for movies of a few minutes long, it works nicely. A doff of the iLife propeller beanie to Erica!