OSX 10.7.0 - Back Up a DVD to mp4


DVD to iTunes and AppleTV with all the info.

This tutorial is intended to show a basic MAC user how to back-up their movie and TV show DVDs into the most portable Mp4s possible with meta-data. The end result will be your movies and TV shows in iTunes looking like you bought them from the iTunes store.

Table of Contents

  1. Introduction
  2. Tools
  3. Movie or TV Show
  4. Movie Back-up
  5. TV Series Back-up
  6. Conclusion

Introduction toc^

So, I have to admit... I have a problem... I have spent a small fortune on DVDs of TV Series and Movies that I like, but the world is moving to the cloud. I have an iPhone, an iPad, an AppleTV, and a Mac Mini Server, and I want all my TV Series and Movies in my iTunes so I can watch them on any of my devices served up though the Mac Mini by iTunes. Getting iTunes to work as the server is no problem, but how does one get the Movies and TV Series off the DVD and into iTunes? Does one have to re-purchase the Movies and TV Series though iTunes to have descriptions, genres, cast, release date, and all that jazz?

I started working on this and found that it was an obnoxious task, and that there were limited tools and tutorials for those living in the Mac world. At one time we had Mac-The-Ripper and Visual-hub that could pull this off, but no descriptions, genres, cast, release date... After stumbling around, and learning a lot, I built some tools to make this task easier for me, and would like to share how I back up Movie and TV Show DVDs into MP4s on my Mac OSX > 10.7.0.

Tools toc^

Here is a list of the tools, and links to their documentation. Follow the links, take a look at what these tools can do for you. They are true Free-ware. No ads, no annoying "Donate", F.R.E.E. free. Don't believe me, check out the code, you can see for yourself, the code can be downloaded and you can compile any of these projects with your own modifications.

Movie or TV Show toc^

So the first thing one has to decide is if they are backing up a movie or TV series. Movies are easy, Mp4DVD makes quick work of them, and Mp4Autotag will find them easily. TV Series are a little more difficult. Sometimes, the DVD provider makes it easy for us, and puts each episode under its own title on the DVD. Other times, they make it harder by storing all the episodes under one title, with chapters separating the episodes. Either way is not to difficult with our new tools, so lets get started.

Movie Back-up toc^

Start up Mp4DVD, and drag and drop the DVD onto it. I have chosen to back-up the movie Summer Wars. So, when I put the disc in the DVD drive a DVD icon appears on my desktop labeled "Summer Wars". I dragged that icon and dropped it on Mp4DVD (figure 1), which will bring me to a title selection table (figure 2).

Figure 1
Figure 2
What we are looking at in Figure 2 are the different titles on the DVD. As one can tell the longest title has automatically been selected for us. When backing up movies, the longest title is almost always the title you want, as it is in my case with Summer Wars.

Why would we need to adjust this title? Well if you want the "Extras" on the DVD for example, they are probably one of the smaller titles. If you want the extras, I suggest opening the DVD in DVD Player and matching up the lengths with the "Extras" you want.

Place a check mark in the box next to all the titles you want to back-up. When satisfied with the selections, click the "Rip" button. I selected just the longest title (I just want the movie), and when I clicked "Rip", it brought me to Figure 3.

Figure 3
This is a "Save As" dialog. Here one decides where they are going to save the Mp4 file. So, browse to where you want to save the file, and name it. Mp4DVD will take the name you type in the box and if you only have one title selected, use that name, if more then one title is select, then it will use that name as a prefix and append [X] where X is the index of the saved title.

The movie I am converting was nice to me, it named its disc "Summer Wars" the same as the movie title. This is not always true, usually it is named more like "SUMR_WAR" or something like that. When we go to add the meta-data with Mp4Autotag, it uses the file name to search for the meta-data on-line, so make sure you name the file the name of the movie.

Once you are satisfied on the name and place for the back-up, click the save button. I am going to back Summer Wars up in my Movie folder with the name "Summer Wars", and when I hit "Save", it takes me to Figure 4.

Figure 4
Now, go work out, get lunch, go to work, do something besides stare at the progress bars! This part takes a while, but the result will be worth it.

Figure 5

What is Mp4DVD doing that takes so long?toc^

Mp4DVD is decoding the selected titles off the DVD, that's what "Copying VOB files" means. Mp4DVD uses the free-ware libdvdread and libdvdnav (libdvdcss2) to remove the Content Scramble System (CSS) from the DVD VOB (Video Object) files and copies the files in to a temporary file. Not only does the CSS have to be keyed and decoded, but the files have to be put back together as well.

Next Mp4DVD has to encode the temporary VOB file into a Mp4 file, that's what "Encoding to MP4 file" means. Mp4DVD uses the free-ware application ffmpeg to encode the VOB files to Mp4 files. These VOB files are somewhere in the neighborhood of 6GB in size, and ffmpeg is compressing it down to a 1GB file. That amount of compression so that you can watch a movie over an Internet connection is gonna take a little processor time.

Once Mp4DVD has finished doing all that, it is time to close Mp4DVD and open Mp4Autotag (Figure 6).

Figure 6

Now click on the "Add" button which will bring you to Figure 7.

Figure 7

Select the file you just created with Mp4DVD. In my case it is "Summer Wars.mp4". Click the "Open" button. This will add the file to the table and when you select the file, you can see and edit the current tags (Figure 8). You could also add the file by drag and dropping it from Finder or iTunes.

Figure 8

Now make sure you have selected the file in the table, and click the "Autotag" button

Figure 9

After searching, you should get a window like I got (Figure 9) where you can choose a match for your movie. If not you can do a custom search for your movie. Once you find your movie, click the "Tag" button to automatically set all of the tags for the movies meta-data (Figure 10).

Figure 10

Now, we are done with Mp4Autotag and we can close it down. All that is left is to add your new movie to iTunes. Adding movies to iTunes tutorials have been done to death, so you are on your own here, but check out how "Summer Wars" now looks in my iTunes (Figure 11).

Figure 11

TV Series Back-Up toc^

TV Series Back-ups and movie back-ups are not much different. We start the same, open Mp4DVD. Drag and drop the DVD into Mp4DVD like we did for the movie DVD, only this time I have chosen 2 different DVDs from 2 different series: "Gungrave Disc 2'; and "Transformers Season 2 Disc 6". I am using these two different series because they illustrate the two different ways manufactures store the data on the DVDs. "Gungrave Disc 2" is stored as one title with chapters for the episodes, while "Transformers Season 2 Disc 6" has each episode stored as an individual title. We will start by backing-up "Transformers Season 2 Disc 6" in TV Series Back-up: Multiple Files, and then back-up "Gungrave Disc 2" in TV Series Back-up: One Large File.

TV Series Back-up: Multiple Files toc^

Start up Mp4DVD, and drag and drop the DVD onto it. I have chosen to back-up the TV Series "Transformers Season 2 Disc 6". So, when I put the disc in the DVD drive a DVD icon appears on my desktop labeled "TRANSFORMERS_S2_D6". I dragged that icon and dropped it on Mp4DVD (figure 1), which will bring me to a title selection table (figure 12).

Figure 12
What we are looking at in Figure 12 are the different titles on the DVD. As one can tell the longest title has automatically been selected for us. We probably want the longest title, but one can tell that the longest title is not the only title of that length. The manufactures did something weird here: not only do they have every episode as an individual title; they have duplicates of every title. This happens sometime. I look at the lengths of the titles to decide which titles to choose, and sometimes, I just choose them all. In the case of "Transformers Season 2 Disc 6", I picked one of every title with the same length (Figure 13) and it works.

Figure 13

Click the "Rip" button, it will bring us to Figure 14, the Save as Dialog. Here we name the files to output. In this case there will be multiple files out so the value here will be used as the prefix for [X], where X is the index of titles selected. For example, I am putting in "Transformers S02D6E" (Figure 14). The 7 files out will be "Transformers S02D6E[1].mp4", "Transformers S02D6E[2].mp4", ..., "Transformers S02D6E[7].mp4".

Figure 14

Click the "Save" button to begin the back-up. This will take a while, see What is Mp4DVD doing that takes so long? to know why.

Figure 15

Once Mp4DVD is finished with the "Rip" we should have 7 new Mp4 files with the names: We could rename them with the appropriate season and episode number (i.e. Transformers S01E36.mp4, Transformers S01E36.mp4, ..., Transformers S01E42.mp4) and use the Automated Autotag feature in Mp4Autotag, but I will demonstrate how to do that in TV Series Back-up: One Large File. Instead, I will use the multiple Autotag feature in Mp4Autotag to tag these files.

Close Mp4DVD and start up Mp4Autotag (Figure 6).

Now click on the "Add" button which will bring you to Figure 7.

Browse to the files you created, in my case it is the files listed above in my "~/Movies" folder. Select all of them and click open (Figure 16).

Figure 16

This will bring all the files into Mp4Autotag (Figure 17), make sure to select all of them.

Figure 17

Now make sure you have selected ALL the files in the table, and click the "Autotag" button

Mp4Autotag will try to fine matches for your files, but since the filename is not in a standard way, Mp4Autotag will not fine a correct match (Figure 18).

Figure 18

Bummer, I know, but no worries, click the "Search" button and do a custom search. Go to the TV Search tab and type in your Series name, Season number, and Episode number. In my example, it would be Series: Transformers, Season: 2, Episode 36 (Figure 19), incrementing the episode for each file.

Figure 19

How did I know the episode number? I own the DVD and have been importing these DVD so I know what count I am on, also, episode numbers are on the DVDs. This is not always the case, and using theTVDB can really help.

Click the "Search" button and Mp4Autotag will now find the appropriate series, season, and episode for you (Figure 20).

Figure 20

Click the "Tag" button and continue this process to add meta-data tags for each of your new episodes. There is an easier way, as you will see...

Now all you have left to do is add these new episodes to iTunes. Once you do you will see they are added under TV Shows, and organized by Episode under the Series, just like if purchased from iTunes Store (Figure 21).

Figure 21

TV Series Back-up: One Large File toc^

Start up Mp4DVD, and drag and drop the DVD onto it. I have chosen to back-up the TV Series "Gungrave Disc 2". So, when I put the disc in the DVD drive a DVD icon appears on my desktop labeled "GUNGRAVE_VOL2". I dragged that icon and dropped it on Mp4DVD (figure 1), which will bring me to a title selection table (Figure 22).

Figure 22

What we are looking at in Figure 22 are the different titles on the DVD. As one can tell the longest title has automatically been selected for us. The manufactures seems to have put all the episodes under one title this time, so I want the longest title. I will just leave it selected. Clicking "Rip" brings me to Figure 23.

Figure 23

Here I choose a location and name for the new Mp4 file. I have my Mp4 files go to the "~/Movies" directory, and named this file "Gungrave D2". After the rip the file will be in /Users/<USERNAME>/Movies Folder, with the file name "Gungrave D2.mp4". Click the "Save" button and relax as Mp4DVD converts the DVD into a Mp4 file.
Here, the manufacture placed all the episodes under one title, so we will only have one Mp4 file output. To see what to do when there are individual titles for each episode see: TV Series Back-up: Multiple Files

Remember, I don't want one file, I want a file per episode, and there are 4 episodes on this DVD. I'll use Mp4Split to quickly split up the Mp4 file by chapters. Start up Mp4Split (Figure 24).

Figure 24

Click on the "Open" tool bar button and open the Mp4 file created by Mp4DVD. Mine is ~/Movies/Gungrave D2.mp4(Figure 25).

Figure 25

Using Mp4Split to scrub we have to find all the spots to split the video up into individual episodes. Almost always this is done by chapters, and lucky for us, Mp4DVD copies the chapters to the Mp4 file. We can scrub through using the slider, the quick keys, or jump chapters (Figure 26), and place splits where ever the new episodes start.

Figure 25

Mp4Split has a cool feature for helping here. Remember Figure 22, we had a number of chapters for the title we chose, in my case it was 21. Since we have 21 chapters, and this DVD should have 4 episodes on it, I use ((Chapters)-1)/(episodes on disc)=(Chapters per episode). (21-1)/4=20/4=5, so every 5 chapters is a new episode. If I choose Splits -> Split Every -> Chapters... from the Main Menu, I get Figure 26.

Figure 26

Here put the number of chapters there are for each episode, in my case 5. Makes adding scrubbing the video really easy.

Figure 27

Once I have all my splits in place (Figure 27), Click the "Split" tool bar button. This will bring up Figure 28.

Figure 28

The "Output file name prefix" what will go at the beginning of every output file. "Add to index" is a number to add to the index for the output file. For example, if we use "Gungrave E" and 4, the 4 files out will be "Gungrave E5.mp4", "Gungrave E6.mp4", "Gungrave E7.mp4", and "Gungrave E9.mp4".
I am using the "E" after Gungrave because Mp4Autotag looks for the E in the file name to now that next number is the episode number. If this was a Series that had more then one season then I would use S1E1 for Season 1 Episode 1.

The reason we use 4 as an "Add to index" is because this is "Gungrave Disc 2" and "Gungrave Disc 1" had 4 episode on it. So I have to offset by the previous episodes. "Gungrave Disc 3" will be offset by 8.

Figure 28

Once I have decided, click the "Ok" button bring up Figure 29.

Figure 29

The first progress indicator is the current segment getting split, the second progress indicator is all the splits. Click the "Split" button again to cancel if you want. The progress indicators will go away when you are done.

When done splitting open up Mp4Autotag (Figure 6).

When done I use finder to go to the Folder I output the split Mp4 files into. Unless someone changed my preferences it will be the same folder as the original Mp4 file. For me this is my ~/Movies folder.

Figure 30

I select all the new Mp4Files in Finder, and drag and drop them on Mp4Autotag (Figure 6). This bring up Figure 31.

Figure 31

I select all of the episodes in Mp4Autotag (Figure 32) and click the "Automated" tool bar button.
Mp4Autotag "Automated" button will go though and tag all the selected files with the "first" result of a search.

Figure 32

Mp4Autotag will use the file names and do a search on-line. Once it finds the best possible match, it uses the match to attach/modify the meta-data tags of the Mp4 file. It also attaches the movie poster, or an episode image. You can specify which in Mp4Autotag's Preferences. See the Mp4Autotag page for more on using Mp4Autotag.
When Mp4Autotag is finished "Automated" autotagging the files, it allows you to verify that the changes where correct, and undo the changes if they where not (Figure 33).

Figure 33

All of the changes are highlighted in orange. If I don't like the changes, I just click "Undo". Click "Close" when everything looks good, and check out the data added (Figure 34).

Figure 34

Add the Mp4 files to iTunes and Check out how cool they look!

Figure 35

Conclusion toc^

I know it seems like a lot, but it is really just the same process over again for three basic different types of video DVDs. Use Mp4DVD to convert the DVD to Mp4, and Mp4Autotag to add the meta-data tags. Sometimes you might need to use Mp4Split to "split the file up into episodes."

I hope this tutorial was helpful, and please let me know what you think. You can email me, or post on the repos in github. Any feed back can help me.