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
- DVD Decrypter 3.5.4
- FFMPEG Win32 (tested with svn8891 & 8797)
- BeSweet 1.5 beta or newer (if the site is down try googling it, BeSweet 1.5 b31)
- Nic's Build of MP4 Box
- AAC Gain 1.7
- Atomic Parsley 0.9
- 7-Zip (needed to open .7z files)
- My MP4 Video Scripts (These scripts will all print a help screen when run without any parameters).
* 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
- Install DVD Decrypter.
- 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.
- 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.
- 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:
- RIP: The VOB file from the DVD
- PREVIEW: To calculate the frame cropping.
- 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. - TAG: Add the meta data (tag) to the file such as the Title, Year, Genre etc.
- 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!
Posted by Matt at August 30, 2006 3:31 PM
Fraggle Chitter Chatter
Posted by: Matt at October 1, 2006 7:13 PM
For the cover art, I'm using a 350x500 jpeg of DVD cover.
M.
Posted by: Matt at September 3, 2007 12:10 PM
Have Your Say
The Great Hall
Historial Postcards
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
Ask Marjorie
This was the thread that helped me figure out what the problem was with my original H.264 files, which worked fine when manually copied to the iPod, but iTunes wouldn't accept, which lead me to finding Nic's build of MP4Box:
http://lists.mplayerhq.hu/pipermail/ ffmpeg-devel/2006-September/045391.html
(that url should be at on one line, wrapped for posting here)