Sunday, September 22, 2013

Convert VOB to MP4 and edit in iMovie

Movies

If you want to play your DVDs on your appleTV you have to convert the VOB files to MP4 then add them to iTunes then share them with your appleTV. There is a lot of spam and bad software out there. When googling for "convert vob to mp4 on mac" all I got were a bunch of sites pretending to be impartial reviews but actually baiting you to download converter software that will just watermark the output until you pay them. Surely this is a known domain and should be both free and easy.

Adding opensource and sourceforge into the search gives better results. I've decided to focus on Handbrake, although there may be others out there just as good or better.

Handbrake > Download > For Mac OS X 10.6 / 10.7 / 10.8 > Download (Intel 64bit) 
[double-click] HandBrake-0.9.8-MacOSX.6_GUI_x86_64.dmg
[drag] HandBrake.app into your applications folder
Close, Eject and Delete the .dmg

Launch HandBrake
Select a folder 
 that contains a VIDEO_TS folder 
  that contains a list of VOB files
   and click Open

Browse to an output location.
(note file name can end with .m4v but format is mp4)
Accept all defaults and click start.

A two hour movie on a mac mini with 1GB ram takes ~50 minutes to convert.
There is no water mark.

Drag the resulting .m4v into your iTunes and if you've turned on home sharing you'll be able to play it on your appleTV.

YouTube

Note that handbrake works just as well on Windows7, but if you want to edit the resulting file for upload to youtube, Windows Movie Maker doesn't support mp4/mkv, so you'll need an additional conversion software. I tried using EZVid on windows, but it turns out to be adware, so I'd suggest avoiding it.

In my case, I bought a DVD of our rafting trip with wilderness tours and wanted to crop out just the highlights for upload to youtube. I converted to mp4 with handbrake on Windows7 then edited in iMovie before upload to youtube.

The default handbrake and iMovie settings seem wrong for this use-case. First you want to convert the VOB to MP4 so that iMovie can import it, and you don't want to loose any quality. Open your VOB folder in handbrake and select the following settings. They're documented on the handbrake wiki.

Output Settings
 Container > Mp4 > Large File Size [checked]
Picture
 Anamorphic: Strict

That said, I don't really see any difference (in quicktime on windows) in the output I've suggested above and the output when selecting the appleTV preset config. However when I used the appleTV preset and selected the MKV container, iMovie didn't like it and showed the file name grayed, and I had trouble getting qualit output from iMovie.

To import to iMovie, you again want to avoid quality and/or aspect ratio conversions. In your iMovie project properties you have three Aspect Ratio options:

Standard    4:3
iPhone      3:2
Widescreen 16:9

It's not obvious what my source is:

Handbrake says both 720x480 and 626x480
After conversion to MP4, Windows Explorer says 704x480
Quicktime movie inspector says 625x480 and 626x480
Of the original VOB, Windows Explorer says 720x480
A screen capture of the MP4 in Quicktime measures approximately 625x480
Thus we are closest to 4:3

There doesn't seem to be an iMovie option to preserve the exact input aspect ratio. Change your project properties to 4:3, then select File > Import

Create new Event: yourEvent
[checked] Optimize video: Full - Original Size
Copy files

On a Macmini Lion 8GB RAM for a 600 MB file (17mins footage) the import takes about 8 minutes.

Before you start you editing be sure you can export and acceptable quality. Click the footage in your event. A section becomes bordered in yellow. Drag the yellow section to your project. Right-click your project and choose:

Export Movie
 Size to Export: Medium 640x480
 > Export
 - in my case 640x480 was the largest supported size
 - presumably this is because my input was 626x480
-- this gave the best result

Export Using Quicktime
 Export: Movie to MPEG-4
 Options
  Image Size: Current
-- this reduced quality

In both cases the outbout was 640x480, which seems to have been achieved by growing the 626x480 to 640x490 and cropping the top 10px go get 640x480.

For a 12s clip, the "export movie" gave a 2.3mb output that looked like the original quality and the "export using quicktime" gave a 1mb output that was visibly degraded.

After listening to this advice, I settled on the following export.

Export using QuickTime
Save As: whatever.mov
Export: Movie to QuickTime Movie
Options
 Video
  Compression Type: H.264
  Frame Rate: Current
  Key Frames: Automatic
  Frame Reordering: [unchecked]
  Data Rate: Restrict to 6000 kb/s
  Optimized for Download
  Compressor Quality: High
  Encoding: Best Quality multi-pass
 Size
  Preserve aspect ratio using:
  Deinterlace Source Video: [unchecked]
 Sound
  Format: AAC
  Channels: Stero
  Rate: 44.1
  Prepare for Internet Streaming: [checked] / Fast Start

I used iMovie iLife jingles havana audio in my movie and after upload to youtube it was flagged as copyrighted and they started displaying ads on my video. A bit of research shows that the track matches a false positive and that many others have this same problem.

raoulpop.com
productforums.google.com
productforums.google.com
productforums.google.com

I used the following text from that last link in disputing the copyright claim on youtube.

iMovie contains sample content including but not limited to graphics, audio clips, video clips and/or templates (“Sample Content”). This Sample Content is proprietary to Apple and/or its licensors, and is protected by applicable intellectual property and other laws, including but not limited to copyright. Except as otherwise provided, all Sample Content included in iMovie may be used on a royalty-free basis in your own video projects but may not be distributed on a standalone basis.

Hopefully that does the trick. If not, I'll find some royalty free music elsewhere.

Update

The youtube video manager now has a feature that lets you delete copyright claim audio from existing videos.

ios
{ "loggedin": false, "owner": false, "avatar": "", "render": "nothing", "trackingID": "UA-36983794-1", "description": "The best free open source way to convert a vob dvd file to mp4 itunes on a mac.", "page": { "blogIds": [ 414 ] }, "domain": "holtstrom.com", "base": "\/michael", "url": "https:\/\/holtstrom.com\/michael\/", "frameworkFiles": "https:\/\/holtstrom.com\/michael\/_framework\/_files.4\/", "commonFiles": "https:\/\/holtstrom.com\/michael\/_common\/_files.3\/", "mediaFiles": "https:\/\/holtstrom.com\/michael\/media\/_files.3\/", "tmdbUrl": "http:\/\/www.themoviedb.org\/", "tmdbPoster": "http:\/\/image.tmdb.org\/t\/p\/w342" }