Update 2014-04-27 10:00 PM: See also Using Handbrake to Encode Blu-Rays for the Roku
In a previous post, I noted that I use ffmpeg to convert DVDs to MP4s which will play on my Roku. I recently encountered two problems with this approach. First, the resulting MP4s only include a stereo audio track, so are highly sub-optimal for surround sound systems. Second, for a yet-undetermined reason, Plex (my current preferred media client) will transcode the videos rather than play them directly.
To solve both problems, I have changed from ffmpeg to Handbrake and I am following the encoding guidance of Rokoding. Specifically, since most of my source material is DVDs, I use the 480p Original settings.
Just in case the Rokoding site disappears, I have reproduced the 480p DVD Settings below in a slightly modified form. These instructions apply to Handbrake 0.9.9.
In Handbrake, start with the High Profile preset and then make the following changes:
- In Output Settings:
- Set Container = Mp4
- Ensure Web Optimized is checked
- Ensure Large File Size and iPod 5G Support are unchecked
- In Picture:
- If the movie is widescreen or hard letterboxed, set Anamorphic = Strict. If the movie is 4:3, set Anamorphic = None and ensure Keep Aspect Ratio is checked.
- Set Cropping = Automatic.
- In Filters:
- Set Detelecine = Off
- Set Decomb = Fast
- Set Deinterlace = Off
- Set Denoise = Off
- Set Deblock = Off
- Ensure Grayscale is unchecked
- In Video:
- Set Video Codec = H.264 (x264)
- Set Framerate (FPS) = Same as source
- Set Constant Framerate
- Set Quality = Constant Quality of RF:19
- Set Optimise Video = Use Advanced Tab instead
- In Audio:
- Create two audio tracks. The first audio track will have:
- Source = AC3 5.1 (which is what you should have ripped from your DVD)
- Codec = AAC (faac)
- Bitrate = 160
- Samplerate = Auto
- Mixdown = Stereo
- DRC = 1.5
- Gain = 0
- The second audio track will have:
- Source = AC3 5.1
- Codec = AC3 Passthru
- Create two audio tracks. The first audio track will have:
- In Subtitles, keep everything empty. I do not handle subtitles.
- In Chapters:
- Ensure Create chapter markers is checked
- In Advanced:
- Set Adaptive B-Frames = Optimal
- Set Adaptive Direct Mode = Automatic
- In x264 Encoder Options, set it to
b-adapt=2:rc-lookahead=50:direct=auto
- The rest are as default:
- Set Reference Frames = 3 (Default)
- Set Maximum B-Frames = 3 (Default)
- Ensure CABAC is checked
- Ensure 8x8 Transform is checked
- Ensure Weighted P-Frames is checked
- Set Pyramidal B-Frames = Normal (Default)
- Set Motion Est Method = Hexagon (Default)
- Set Subpixel Motion Est = 7: RD in all frames
- Set Motion Est Range to 16
- Set Partition Type = Most (Default)
- Set Trellis = Encode Only (Default)
- Set Adaptive Quant Strength = Middle
- Set Rate Distortion = Middle
- Set Psychovisual Trellis = Leftmost Setting
- Ensure No DCT-Decimate is unchecked
- Set Deblocking = 0 (Default), 0 (Default)