Vector 22: How to rip and transcode video for the best quality possible

Don Melton, former Engineering Director of Internet Technologies at Apple, talks about his non-browser-based passions - Blu-Ray, transcoding, H.264, and managing massive amounts of media. Warning: Contains extreme nerdery.

Show notes

  • Don Melton's shell script for OS X to transcode a video file (works best with Blu-ray or DVD rip) into MP4 (or optionally Matroska) format, with configuration and at bitrate similar to popluar online downloads. Requires HandBrakeCLI and mediainfo executables.
  • Don Melton's shell script for OS X to detect crop values for a video file to use with mplayer and Requires mplayer and mediainfo executables.
  • Don Melton's shell script for OS X to convert an MP4 video file into Matroska format with a single audio track. Requires mkvmerge executable.
  • HandBrake and HandBrakeCLI: Convert video from nearly any format.
  • HandBrake and HandBrakeCLI: nightly builds.
  • MediaInfo: Display technical and tag data for video and audio files.
  • MKVToolNix: Tools for Matroska, including mkvmerge.
  • MPlayer: Media utilities and player.
  • Homebrew: Package manager for OS X to install MPlayer, MediaInfo and MKVToolNix.
  • MakeMKV (opens in new tab): Convert/rip video that you own into the portable and open Matroska format.
  • Plex
  • XBMC
  • OpenELEC (Open Embedded Linux Entertainment Center)
  • X264 Settings
  • Scene Rules: warez)




Yell at us via the Twitter accounts above (or the same names on ADN). Loudly.

Rene Ritchie

Rene Ritchie is one of the most respected Apple analysts in the business, reaching a combined audience of over 40 million readers a month. His YouTube channel, Vector, has over 90 thousand subscribers and 14 million views and his podcasts, including Debug, have been downloaded over 20 million times. He also regularly co-hosts MacBreak Weekly for the TWiT network and co-hosted CES Live! and Talk Mobile. Based in Montreal, Rene is a former director of product marketing, web developer, and graphic designer. He's authored several books and appeared on numerous television and radio segments to discuss Apple and the technology industry. When not working, he likes to cook, grapple, and spend time with his friends and family.

  • Yet another good podcast that I'm keeping. Thanks, iMore! Sent from the iMore App
  • Loved this showed but I am a little confused about what the first script does. Sent from the iMore App
  • Another interesting, highly-geeky conversation. Couldn't help but keep thinking though: what an enormous waste of effort it is for people all over the country to be having computers execute the same algorithm (this transcoding script) over the same substrate data (movies/teevee shows) in dozens/hundreds/thousands of reduplicated instances for no good goddam* reason. If only there were a way to have this process done once, correctly, and then have the output of that process be made available for others to download as necessary/desired! If only! * pardon my Quebecois, but I'm just following Mr. Melton's elofuckingquent lead
  • Fascinating podcast, but Mr. Melton and Rene are right: for 90-95% of users, the Plex/XBMC solutions are more than enough. I've got well over a thousand movies, maybe a dozen TV series, lots of videos, and the Plex/Roku combination has proved to be a godsend for me. Once all the files are named properly, which in my case did prove to be a bit time-consuming, Plex loads and organizes all the metadata and artwork. The Plex client on Roku does have a habit, once every couple of months, of locking up in the middle of a playback and crashing the Roku, which then resets... but I can live with that. Navigation on the Roku Plex app is still a bit clunky, but so is every other such solution, including Apple TV. (That deficiency is obviated with the Roku Remote iPhone app!) Other than those issues, it works beautifully.
  • Nice information, but why the need to diss on phone watchers? My Android has a 4.5" screen and I watch it from ~12" away when a movie or TV show is playing. That 2.67x the diagonal, but its also not a 1080p screen. Users with bigger phones could hit the desired size pretty easily. With a decent set of headphones, the experience is not unpleasant in the slightest. Faint praise, I realize. But if the need arises it's quite practical. My reason? I was visiting my brother and didn't want to wake him up so I couldn't watch on the Television (and the TV doesn't have a headphone out, plus the receiver uses the 1/4" plug) and so I watched Jack Taylor on my phone. Give it a try!
  • any chance there is a script for handbrake on windows?
  • All the talk about: "Once all the files are named properly, which in my case did prove to be a bit time-consuming" - there is a much, much simpler way: use a program like DVDPedia. All you have to do is scan the barcode on the DVD/Blu-ray or enter the title and all metadata, cover art etc. will be downloaded. Then when you rip the disk you link the file via the DVdPedia entry. Doesn't matter what is called. No fuss, no muss and like Plex/XBMC DVDPedia provides an elegant full screen mode for viewing on your HDTV. Mr. Melton argues that you should be transcoding your BDs/DVDs using inferior, less than optimal settings "because it takes too long". And then he goes on to talk about how to get the best quality audio out of Blu rays. Are you kidding?
    First, as to his credit he does say, *you should not be transcoding*. Period. Rip the disk as is using either RipIt or MakeMKV for playback on your HDTV. The only reason to transcode would be for viewing on tablets or phone when on the road. And then, just let Handbrake run overnight. Who cares how long it takes? You don't view 5 movies a day, every day on your phone -- you'll have plenty of time to transcode all you could possibly watch. It's not like you have to sit in front of your computer waiting for it to finish. Seeing the movie in anything less than optimal quality -- why would you want to? On the other hand I challenge Mr. Melton or anyone else to do a double blind test and see if they can tell the difference between core DTS and full quality audio on a Blu-ray. Spoiler: they can't.
    For audio you should be worried about having high quality (and that almost always means high cost, and often large in size) speakers and a top notch amplifier. That is difference you can actually hear, but I bet 95% of the people reading this don't have a serious sound system.
  • Does anyone know if this script could be turned into a service with automator?
  • a truly challenging transcode is trying to do the Original HBO DVD set of "From the Earth to the Moon".
    Just the montage title into is a mix of Interlaced and 24p. Wow... the space suite pan moves also get jumpy very easy because of the fabric textures.