August 30, 2006

Step By Step Conversion Guide: Putting DVD's On To Your iPod (revised)

UPDATED: 22nd September 2007.
(MP4 Scripts updated September 17th 2007)

These settings/scripts will generate files of pretty much transparent quality to the original DVD. I'm using these settings for archival purposes, so if you're looking for really small files, these might not be for you.

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 file size.

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 file size". 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. FFMPEG svn builds especially, I've found svn8891 or svn8797 stable on all my systems. If you want to try the latest ffmpeg builds, you'll need to change the codecs in the scripts (the names have changed) acc -> libfaac and h264 -> libx264.

Installation

  1. Install DVD Decrypter.
  2. Create a folder called C:\Program Files\MP4 and extract the contents of FFMPEG, AAC Gain, MP4 Box, BeSweet, Atomic Parsley and the MP4 Video 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, of course.

Overview

These are the steps we will do for each video:

  1. RIP: The VOB file from the DVD
  2. PREVIEW: To calculate the frame cropping.
  3. ENCODE: Convert the VOB into an MP4 H.264 File, Normalize and Remux.
    Video is encoded using anamorphic wide screen*, normalizing makes every movie playback at a consistent volume (normalizes to 89db, consistent with MP3Gain for music files), and the remuxing is necessary to convince iTunes your iPod can actually play the file.
  4. TAG: Add the meta data (tag) to the file such as the Title, Year, Genre etc.
  5. COVER ART: Optional —Add DVD cover for movies or the TV show title frame so it looks nice in iTunes.

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

TIP: iPod's currently don't support the files with a SAR (Sample Aspect Ratio) of anything other than 1:1. In future hopefully this will be fixed. I suggest including the movie's Aspect Ratio in the description tag, so if in future other SAR's are supported, you can use this information to calculate the appropriate SAR for the movie and update the file's MPEG headers.

UPDATE: If you wish to use these files with an AppleTV, which does support custom SAR's, you can use Quicktime format to save a linked movie with the correct SAR (and subtitles as well). In Quicktime Pro, select Show Movie Properties, Video Track and Visual Settings. Uncheck Preserve Aspect Ratio and enter appropriate resolution. For 2.40:1 (720x320), 2.35:1 (720x328), 2.20:1 (720x350), 2.00:1 (720x384), 1.85:1 (720x416), 1.78:1 (720x432), 1.37:1 (720x562). These are for PAL, for NTSC divide the height by 1.2. The picture should resize, and then Save As.. a .mov reference movie. This file will play in correct widescreen format on an AppleTV and should only be about 1MB in size (it uses the original MP4 file for the picture and sound content).

1. RIP: The movie using DVD Decrypter

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). If it's a foreign film and you want the English soundtrack, use the stream processing tab in DVD Decrypter to check that language and uncheck the foreign one.

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, put 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_02_PGC_01_1.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.

TIP: An example extract script is included that shows how to rip multiple episodes from a TV Show DVD in one step. You will need to edit the VTS and PGC numbers to match the DVD in question, and you could use multiple blocks with a ECHO Insert Disc X and a PAUSE before each to process a whole season.

2. PREVIEW: Calculate the frame cropping.

In the _Import folder create two batch files called preview.cmd and convert.cmd. We'll use convert.cmd to convert the MPEG2 VOB files into an MPEG4 files (the format that the iPod needs), and the preview one to do a similar conversion but to generate a preview instead.

Edit your preview script and call the mp4preview.cmd script for each VOB file, use an output file similar to: Movie - Preview.mp4. This generates a rough 10sec conversion at 100% without cropping in H263 format (fast). Play each resulting file, and find a frame where you can clearly see the edge of the picture. Press Print Screen and paste into Photoshop (or another program with measuring tools) and measure the distance between the inner edge of Quicktime player window and edge of the video content (overlap the into the content area by 1px). Measure the for all 4 sides.

Using the crop calculator webpage included to generate the scale parameters variable (select the Source frame size and enter the four measurements taken earlier, click calculate and copy & paste the output into your convert script). There is an example convert.cmd in the examples folder, have a look at this for the syntax. At this point you can delete the preview MP4 files.

You'll need two lines in convert.cmd for each video file you wish to convert. The first one sets the cropping (scale params) and the second one calls the encode script. Converting this way lets you process many files at once, good if you want to set it going overnight.

TIP: When working with MPEG4 files, always use the standard "MP4" file extension, and not the non-standard Apple "M4V" as this can cause problems. M4V is meant to be for raw video stream and not a video and/or audio stream inside a MPEG4 container.

TIP: The MP4 file's name must be less than 64 characters (including the extension) or Quicktime for Windows will say it's corrupt.

3. ENCODE: Convert the movie to H.264 format

After the scaling parameters SET command, your convert script will call one of the 3 encode scripts. These scripts use slightly different video / audio settings:

  • MOVIE: Encodes with the highest video quality and audio quality. Preprocesses the soundtrack with BeSweet to downmix 5.1 Dolby Digital into 2.0 Dolby Surround 2 this multiplexes LCR+Surround into the Stereo output (use the "Dolby Pro Logic II Movie" on your AV receiver during playback).
  • TVSHOW: Encodes with slightly lower video and audio bitrates. TV Show material is often easier to encode and volume of data is higher, so these settings are a good trade off of quality vs. disk space.
  • MUSIC VIDEO: Uses the same video settings as the TVSHOW script, but with very high audio quality

If you are unsure of the settings any of the encoding scripts, just run them without without parameters to see the help screen.

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... ;-)

TIP: Interlaced TV Shows and mono soundtracks require additional parameters, see the help screens of the encode scripts for further information.

4. TAG: The MP4 files with Atomic Parsley

In the _Import folder create script called tag.cmd. There is an example tag script included, so use that as an example. The tag scripts also print help screens, so you'll want to refer to those too. This tagging can be done manually in iTunes but it's really slow as the whole file must be rewritten. Atomic Parsley has to do this also, however here you can batch several files at once saving a lot of time.

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

TIP: Descriptions/synopsis's longer than 255 characters won't display in iTunes. Watch out for international characters (accented western, asian and eastern) the command prompt uses a different code page than iTunes, so you'll need to correct these using iTunes afterwards.

5. COVER ART: Add the Cover Art (optional)

This is really an additional tagging step, however I find it easier to separate this out from the main tagging. This adds the artwork displayed in Album and Cover Flow view in iTunes and on the iPod's screen in TV Out mode. For movies I use the front of the DVD Cover (you can scan in the cover yourself, or download it from one of the sites on the Internet (just google "DVD Covers"). For TV Shows I normally use the title frame from the show, same procedure as in the preview step above except you crop and save a jpeg. Use the mp4tag-artwork script in a batch file similar to your tag one.

6. ADDITIONAL STUFF: Subtitles etc

There are scripts included for processing subtitles. However, bear in mind the iPod currently doesn't support subtitles, so like adding the Aspect Ratio/SAR to the tags, adding these will be possibly be useful in the future but not so much now. If you add subtitles, you must do it before the tagging step (any existing tags aren't copied to the new [output] file). To rip the subtitles to a text file, you can use SubRip in SubPictures to Text via OCR mode, you'll also need to make sure you check the appropriate subtitle stream in DVD Decrypter during the rip stage.

TIP: If you rename the file MP4 to have the extension .3gp, Quicktime for Windows will display the MP4 timed-text subtitles.

UPDATE: Subtitles are supported in Quicktime containers, .mov files, in Quicktime Player, iTunes 7.4, AppleTV and iPod 6G (sorry not 5G with 1.2.1). To correctly add the subtitles, see the paragraph about Quicktime containers in the Overview section above, and just before saving the file do this. Open up mp4-subtitle-convert.html, which is included in the latest scripts archive, and paste the contents of the .srt into the top box. Click convert and copy & paste the results from the bottom box into a .txt file. In quicktime open the .txt (you'll need to change the file type to all files) and do a Select All and Copy. Change to the main movie window, make sure you're at the very start of the film, and choose Edit > Add to Movie (not Paste). In the Movie Properties dialog, select the Text Track, Visual Settings and set the Offset to 0 x 430. Close the movie properties box, and do the Save As... Reference Movie as normal. Your linked Quicktime file should now have subtitles and the correct aspect ratio! ;-)

Once you're finishing tagging the files, move them to their final storage location and then delete the VOB files (you can also delete the video-stream.mp4 & audio-stream.mp4 working files and FFMPEG logs). Import the finished movies into iTunes as normal, sync to your iPod and enjoy!

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

August 29, 2006

Wanderlust

Winter is finally drawing to a close, the weather is warmer and the sun is out more often. It's a nice change after the reading about all the summer adventures of the northern hemisphere dwellers, who seem to forget we're stuck down here in the cold. Yet ironically in just over a month's time I'm heading over to Europe for autumn.

I have recently added a travel map to the site, detailing all the countries and places I've visited. In listing all the countries and territories it's really made me realise how few places I've actually been to. Especially in the Pacific where I live, I've only managed to visit 4 out of the 40. Hopefully I can check off a few more of these off by years end.

Travel Map & Visited Countries List

Great hall locations: Travel  |  Talked about by: 0 Fraggles

August 22, 2006

Musical Dope

PUTS

As many of you already know, one of the great loves of my life is music, and not just one style of music either—at last count I had 46 genres on my iPod. That said it's not very often that I get really excited about a new album, but once in a while there is an exception. An exception that makes me call up everyone I know and play it down the phone line them (and believe me, if I know you, you'll be getting a call soon!). If speakers could get the burn in effect like old monitors, they'd permanently say "Stepfather by People Under The Stairs"!

Unfortanately, Amazon.com doesn't have samples for this album on their site, so I have included a couple below and a link to the album page so you can buy it. And believe me it's worth every penny, this is one funky hip-hop album.

Days Like These (clip) (MP3 / 1.38MB)  |  Jamboree Part 1 (clip) (MP3 / 1.54MB)

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

August 15, 2006

Chattering Teeth

Dog looks like owner

You all have no doubt heard about dogs looking like their owners. There was an advertising campaign about it a while ago, which the picture to the left is from. Well, in my case it's my car that is like its owner—we both hate the cold!

Whenever the weather is too cold, apart from not wanting to start in the morning, the speedo starts making a noise like chattering teeth and stops working. Well it does work, it just doesn't tell you the right speed, lol. Apparently I was doing 125km/hr in a residential area this morning, drove right by a cop and he didn't bat an eye! Funny thing was, it didn't seem that fast...

Great hall locations: Miscellaneous  |  Talked about by: 0 Fraggles

August 14, 2006

I'm Karma's Bitch

I cancelled my audiologist appointment at short notice this morning (i was going to get some custom earphone molds taken for my shure e3c's), which was kind of mean but I need to stop spending money if I'm going to be able to afford to go to Italy. Last night my flatmate came back from the supermarket with a 4c off voucher for petrol (if you spend over a certain amount at the supermarket, you get a discount on their petrol) which was sweet cos' i needed to fill up this morning.

However in a swift karmatic bitch slap for diss'ing the audiologist, the [automated] petrol station ate my voucher, the lcd started flashing all this code stuff and then all the pumps came up with "out of order"! So not only did I have to pay full price for my fuel, I had to drive out of my way to get it!! grrrrr.....

Great hall locations: Miscellaneous  |  Talked about by: 0 Fraggles

August 7, 2006

How To Look Italian On A Moped...

This is funny... from With a Rebel Yael, the blog of an English expat living in Italy.

How To Look Italian On A Moped

Great hall locations: Italy  |  Talked about by: 0 Fraggles

I Tag Therefore I Am

Tagging problem in Antarctica

Actually I don't actually tag stuff, it just sounded just a catchy post title. Was browsing the 'net the other day when I found the site for Deception Island, which apart from sounding like it should be a location from a James Bond film, looks like a very interesting place!

However, it appears that even the most unlikely places have a graffti problem these days, including Antarctica! As you can see from the photo tagging is now on all 7 continents. The question is: I thought there was like a dozen people living down there, so who exactly is doing it?!

Great hall locations: Antarctica  |  Talked about by: 0 Fraggles

August 1, 2006

How Rice Was I?

I have now been in business for myself full-time for three years and things are going really well. However, it's funny to think back to when I first started, when I had no money, about all the rice* things I did to get by... * "rice" here means cheap, since rice is very cheap foodstuff.

  1. Going to the department store and using the [guys] perfume testers before meeting a girl for coffee [on several occasions] because i couldn't afford to buy it ...Yep
  2. Paying my rent 2 days late completely with 5 and 10 cent pieces (that's €0.02 and €0.05 coins for my international readers) ...Yep
  3. Cutting my own hair because the budget shopping mall $5 (€2.50) hair dresser was too expensive ...Yep
  4. Driving with my car's fuel gauge permanently on empty and only filling up when it started to misfire*...Yep
  5. and the number times I did actually run out of gas: 6
    —The worst of which the car died in the middle of busy bridge at 2am in morning in the pouring rain!!

* Occurs when the fuel injectors start pumping air, because the fuel tank is dry.

Great hall locations: Miscellaneous  |  Talked about by: 0 Fraggles