August 30, 2006

Step By Step Guide: Putting DVD's On To Your iPod

UPDATED: 28th November 2006. Conversion scripts updated with settings for much better quality—the resulting files will be pretty much transparent quality to the original DVD now. I'm using these settings for archival purposes, so if you're looking for really small files, these might not be for you. The output is now VBR (both video and audio), with a file size of between 8-12MB/minute depending on content.

While I have previously written about this topic, I never covered it in any depth or went into every step I follow. When I first got my G5 iPod it was a steep learning curve figuring out MPEG video; what tools to use, what settings to use, what version of each software app was best, etc. to get the best possible quality and filesize.

This post should serve as a complete answer to the question of "How do I get DVD's onto my iPod that look good on both the iPod Screen, a TV at the smallest possible filesize". Below is the step by step process complete with illustrations and links to the required software.

DISCLAIMER

THIS GUIDE IS ONLY FOR CONVERTING MOVIES TO VIEW ON YOUR IPOD THAT YOU LEGALLY OWN, I.E. YOU PAID FOR THE DVD.

WE DO NOT SUPPORT THE PIRATING OF MOVIES, AND ANY COMMENTS OR MESSAGES RELATING TO THIS WILL BE DELETED. UNCLE TRAVELING MATT.COM ACCEPTS NO RESPONSIBILITY FOR THE USE OR MISUSE OF ANY OF THE SOFTWARE MENTIONED ON THIS SITE. UNCLE TRAVELING MATT.COM DOES NOT HOST AND DID NOT WRITE ANY OF THE SOFTWARE LINKED TO HERE, EXCEPT FOR THE BATCH FILE SCRIPTS THAT INTERACT WITH THE AFOREMENTIONED SOFTWARE. SO IF THESE MESS UP YOUR COMPUTER OR RUN OFF WITH YOUR DOG IT'S NOT OUR PROBLEM, BY USING THIS INFORMATION YOU ARE AGREEING TO THESE TERMS.

Required Software

* You are welcome to try newer versions than those listed above, in most cases newer versions work fine, but I can't guarantee the results.

Installation

  1. Install DVD Decrypter.
  2. Create a folder called C:\Program Files\MP4 and extract the contents of FFMPEG, AAC Gain, MP4 Box, Atomic Parsley and MP4 Folder Scripts into it.
  3. Add C:\Program Files\MP4 to your path. Right click on My Computer, Properties, Advanced, Environment Variables, System Variables, Path, Edit, Add ";C:\Program Files\MP4" (without quotes) to the end of the list.
  4. Create a folder under My Documents\My Videos\_Import to save your working video files into. This can be a different location if you wish, however you'll need to edit the v.cmd script file.
  5. Extract the contents of Import Folder Scripts into the _Import folder created above.

Overview

These are the steps we will do for each video:

  1. DVD Decrypter: Rip the VOB file from the DVD
  2. FFMPEG: Convert the VOB into an MP4 H.264 File, using anamorphic wide screen*
    MP4BOX / AACGAIN: Normalize the volume of the audio stream, so every movie plays back at a consistent volume. (normalizes to 89db, consistent with MP3Gain for music files)
  3. QUICKTIME: Remove the studio branding from the beginning and credits from the end of the film (this is optional—I no longer do this step myself, but i've just bought an extremely large hard disk, so space is of less of a concern now ;-)
  4. ATOMIC PARSLEY: Add the meta data (tag) to the file

* This is so the picture completely fulls the screen of the iPod, but when played on a wide screen TV the movie will be restored to its original wide screen format.

1. DVD Decrypter: Rip the movie

DVD Decrypter should be set to IFO mode and have the following settings chosen—for screens not shown below the defaults are fine. These settings will auto select the primary language of the DVD (i.e. English, unless it's a foreign language film) for both AC3 and DTS formats.

Set the destination folder on the DVD Decrypter main screen to be the My Documents\My Videos\_Import folder created earlier (click on the yellow folder icon)

Once you have all these set, pop in your DVD movie disc, and click the "DVD > Hard Disk" at the bottom left. DVD Decrypter will then rip the DVD to your hard disk as a VOB file. Open the windows explorer, navigate to the _Import folder and you should see a file named something like VTS_01_001.VOB (the numbers may be different, but that's ok). Rename this to something more useful, e.g. My Movie.vob where "My Movie" is the actual title of the film.

2. FFMPEG/AACGAIN/MP4BOX: Convert the movie

In the _Import folder right click on convert.cmd and choose edit, this is batch script that will convert the MPEG2 VOB file into an MPEG4 file (the format that the iPod needs). By default this file has two lines as examples (delete whichever you're not using), but you can add lines to convert several files at once (good if you want to set it going overnight).

The syntax for each line is: @call mp4convert [ratio] [infile] [outfile], for example:

@call mp4convert widescreen "My Movie.vob" "My Movie FULL.mp4"

The ratio can be either standard for 4:3 or widescreen for 16:9 content, this should match the format of the movie / tv show being converted. Remember to include the quotes around the filenames. You can edit the script to add different presets with cropping for specific DVD's.

The FULL in the output filename is so we know this the full length and not the trimmed version of the MP4 (see next step).

Run the convert script by starting the Command Prompt, changing into the _Import folder*, and type convert and press ENTER. This will take a while, on my machine about 1.5hr per movie.

* One of the installed scripts in the path is called "v.cmd", this changes into the Import folder, so you can just press V and then ENTER to get to the import folder in one easy step.

3. Quicktime Pro: Trim the movie (optional)

Once the convert is complete, open the MP4 file up in Quicktime Pro Player. We are now going to trim all the studio credits off the front of the film, and delete the credits from the end. This step is optional, if you wish, however you won't be able to fit as much on your iPod.

Maximise the Quicktime Player window as it will make the next steps a lot easier.

With the location slider (The top black arrow on the top of the progress bar) dragged all the way to the left, press I (to set the In point), and then play. When you get passed the studio fluff to the actual start of the film, pause it and press O (to set the Out point), you can fine tune the location before pressing "O" by using the left and right arrow keys. Once you're happy with the selection, press DEL to the delete that segment.

Drag the location slider all the way to the right, and press O then drag it back to the left a little and locate the end of the film/start of the credits, fine tune it as above and press I and then DEL. Double check the beginning and end are ok, and cut where you want them to be—You can undo and try again if it's not quite right.

Now we need to export out the trimmed movie, choose File > Export...

  1. Filename: Remove the FULL from the end so it reads something like: My Movie.mp4
  2. Export: select "Movie to MPEG-4" (not the iPod option) and click Options...
  3. In the options make sure you've got Pass Through selected for both the video and audio formats
  4. Click OK and then SAVE.

The progress bar should appear and jump straight to 80%, once this disappears close the window without saving (if prompted).

4. Atomic Parsley: Tag the movie

In the _Import folder right click on tag.cmd and choose edit, this is batch script that will tag the MPEG4 file(s). By default this file has two lines as examples (delete whichever you're not using), this tagging can be done manually in iTunes, however here you can batch several files at once saving a lot of time.

The syntax for each line is: @call mp4tag [type] [filename] [year] [title], for example:

@call mp4tag movie "My Movie.mp4" "1969" "My Movie"

Run the tag script by starting the Command Prompt, changing into the _Import folder and typing tag and then pressing ENTER.

5. And You're Done

Once you're finishing tagging the files, move them to their final storage location and then delete the FULL versions and the VOB files. Import the finished movies into iTunes as normal, sync to your iPod and enjoy!

Great hall locations: Music , iPod  |  Talked about by: 1 Fraggles

February 15, 2006

New iPod Lovin'

I've recently upgraded to a 60GB Video iPod from my ancient 2nd generation ipod, and am absolutely loving the thing. I've finally got 'on-the-go' playlists, shuffle songs that is actually random, and video functionality (which i hadn't really considered) turned out to be pretty damn cool.

After purchasing the apple a/v cable, I'm in the progress of converting a huge amount of video that i'll be able to watch anywhere. Well actually, i've converted some of it several dozen times so far. Finding the best encoder, codec, and settings turned out to be a little challenging, since i wanted pretty good quality on a TV *and* a reasonable file size—2500kbps was out of the question.

In the end i decided on ffmpeg (windows binaries) as the encoder with these settings:

Video

-vcodec xvid -s 512x384 -qscale 6 -g 300
The "xvid" codec turned out to produce much cleaner and smaller files than the "mpeg4", and plays on the ipod fine. Depending on content, I've increased the quality a bit, levels 4 and 5 are a fair bit smoother though file size jumps up considerably—I've done some of my faster moving music videos at these levels.

Audio

-acodec aac -ac 2 -ar 32000 -ab 48 -async 1
High passing frequencies above 16kHz and lowering the bitrate saves a huge amount of space. TV shows especially could go even lower, however I'm using shure e3c's and am quite sensitive to audio quality, and these were the lowest settings i was happy with. Incidentally, with the apple stock headphones 22050 & 32 or 40 was passable since they seem to roll off the top end anyway.

Misc

-f mp4
Makes sure the muxing is suitable for the ipod.

Once you've got the video converted, tagging it so the iPod sorts it nicely is another matter. iTunes [as of this writing] is completely unable to tag video files as TV Shows properly. It has a TV Shows setting, but it is ignored by the iPod. Fortunately there's a tool called Atomic Parsley, which was originally just for the mac, but windows as well.

One thing I've found really handy to do with my video tagging, is to put "Videos" in to the "Album" field for all my videos; movies, music and tv shows. The reason is iTunes treats videos just like songs and finding a handful of videos intermixed with them is a pain. With the album set to videos, you can just type "videos" in the search field to list all the videos on your iPod—sweet.

Here is an example of Atomic Parsley config I use, for a TV show:

--genre "TV Shows" --stik "TV Show" --artist "Seinfeld" --album "Videos" --year 1989 --TVShowName "Seinfeld" --TVEpisode "The Seinfeld Chronicles" --TVEpisodeNum 1 --TVSeasonNum 1 --title "The Seinfeld Chronicles" --writeBack

To get the video off your DVD's the best tool is DVD Decrypter, you'll have to google search for it as Macrovision (the makers of DVD encryption) under threat of lawsuit made them take the site down and remove the software. The last version was 3.5.4, and make sure you uncheck the "Check for Program Updates" under Settings > Events.

From the UI you can't extract more than one episode at a time in IFO mode (the mode you want to be using). However, from the console it's possible to write a batch script to extract them one after the other. Just add one line for each PGC with the switches below:

/MODE IFO /DEST F:\VIDEOS /VTS 1 /PGC 1 /START /CLOSE /SPLIT NONE /DIRECT 0x80 0xE0 /NAMING PGC

In closing, having all my video with my me is just as cool as having all my music. iPod's just seem to get better and better!

UPDATE: The information above has been superseded, please see the more recent post entitled: Step By Step Guide: Putting DVD's On To Your iPod

Great hall locations: Music , iPod  |  Talked about by: 1 Fraggles

May 9, 2005

Shitty MP3's Must Die!

Dr Evil

With my next overseas trip just over a week away, I'm in the final mad rush to get everything ready, including breaking in my new Shure e3c Noise Isolating Earphones. These are the in ear canal style units that musicians use, and I have to say the sound quality and detail is quite extraordinary!

I used Sony active noise canceling headphones on my last trip. They helped a lot in reducing the aircraft engine noise, but were quite bulky, only worked on low/mid frequencies and need batteries. The Shure ones on the other-hand block about 25dB across all frequencies (the noise-canceling ones were 10dB) and are very compact, which will help my carry-on baggage only plan for this trip.

They take about a week to properly mold to your ear canal (or your ear canal to mold to the earphones as the case maybe, lol) and break-in the speaker drivers. We're at day 3 now and they're definitely getting more comfortable to wear—and the sound quality still blows me away!

Shure e3c Earphones

However, this does cause one major problem— 128 & 160kbps CBR MP3's which previously sounded ok, now sound terrible. The encoding artifacts are clearly audible in all their hideous glory. The 160kbps songs sound flat and lifeless, and we won't even mention mangled state of the poor 128k ones, lol.

So, I've been on a mission hunting out all the poor quality songs in my collection with the help of Tag & Rename, which is an excellent program.

Tag & Rename can also tell you which encoder was used to make the file (this is separate from the ID3v2 tag's "encoded by" field), which is quite handy for generating a report of all the MP3's not encoded with LAME and are CBR 160kbps or less.

On a related note, I checked with the airline the other day and my skateboard is good to go as carry-on. It was the only piece of baggage I thought might possibility have to be checked, which would ruin my carry-on only plan. Apparently if my main carry-on bag isn't too big, it's all good ;)

Update: It appears I was missed informed, and the skateboard can only be taken on as checked luggage—which added just under an hour to me getting out of LAX the other day, arrrghh!

Great hall locations: Music , iPod  |  Talked about by: 0 Fraggles