Your Digital Media Has Never Looked So Good

 
shelleye
Topic Author
Posts: 30
Joined: Thu Dec 10, 2009 8:13 am

Handbrake Best Practices Thread

Thu Oct 07, 2010 7:25 pm

Recently I have begun streaming home media content (home movies, recorded Tivo episodes and DVDs from our family collection) over our Roku boxes, using the Roksbox application and KMTTG, a batch processing application written for transcoding Tivo content. As anybody who has tried this knows, there are many quirks in the Roku box, in Handbrake, and with codecs and streaming in general that make this a challenging process. I have been told that the encoding challenges are the same for anybody streaming media via the Roku box (and not specific to the Roksbox application), so I decided to start a thread, summarizing my solutions, and inviting others to share encoding challenges and solutions of their own. I owe thanks to several generous people on the Roksbox thread in this forum, and a couple on the KMTTG thread at the tivocommunity.com forum, who helped me understand the workflow better. Please excuse and feel free to correct my home-baked language—I am not a video-tech, just an enthusiast, entering a brave new world.

My setup: I have two HD (720P) Roku boxes, one SD (4:3), two HD (16:9) tvs, and one HD (1080P) Tivo.

My goal: to stream media from a NAS drive to one SD and one HD tv via the Roku boxes using the best possible quality encodes. I ended up choosing quality over size/universal compatibility, because I have a large hard drive, I don’t use my iPod that often, and I can just re-encode what I want in the proper format when needed.
I ended up learning a few general rules about transcoding for the Roku box: 1) you need to set your stream at 29.97 fps, or the roku stream will hang up and rebuffer, especially on content longer than one hour. 2) the Roku can’t process an encode with two audio tracks, so you need to set 1 audio track in Handbrake; although some people are able to successfully pass through AC3 content, faac is the most universally compatible format. 3) the Roku can’t (at least in my house) handle passthrough greater than the capacity of your Roku box; since my boxes are 720P (1280 x 720), I have to set the width at 1280 or less—when I did pass through encoding of hd content (1920 x 1080), the stream was noisy, and rebuffered.

Following these three rules, I have been able to play with different settings, and arrived at the following “best practices” workflow:

I use KMTTG to process Tivo recordings, because it is a simple batch processing program that runs in the background as a service, downloads selected Tivo recordings, cuts commercials and encodes to the folder of my choice. I also use it to manually batch process .mpgs from ripped dvds. I use one Handbrake profile for transcoding HDTV content, and one for standard definition DVDs, although they are basically the same except for the frame width:

HDTV Profile: Frame width 960, I let Handbrake determine height based on the original aspect ratio; anamorphic “none”; keep aspect ratio checked; decomb and detelecine video filters “default’ the rest off; fps 29.97; avg bitrate 2500; faac audio; audio bitrate 160. DVD Profile: the same except I set the frame width at 720, which is the original width of a standard dvd.

Notes: I tried various picture widths: 640, which is recommended on the Roksbox thread, as well as 720, and 940, and felt that 940 gave me by far the best results. I didn’t go any higher, because the highest Handbrake preset is 940, and I figure those guys must have some reason for keeping it at 940. Some people have said that lower bitrates (1500-1600) and/or using constant quality (RF 21) produce equivalent results with smaller file size, but I had some issues with buffering when I tried constant quality on some videos.

KMTTG uses the HandbrakeCLI, and after asking advice, I have ended up with two .txt files that seem to give me the same output as using the above settings in the Handbrake GUI. Because these settings might prove useful to people using the HandbrakeCLI to do batch encodes either with KMTTG or another program, I am posting the text files on the tivocommunity KMTTG thread (can't post files here).

That’s my story. What’s yours?
:D
 
destructo
Posts: 106
Joined: Thu Nov 25, 2010 12:09 pm

Re: Handbrake Best Practices Thread

Thu Jan 13, 2011 8:41 pm

Shelleye,

Do you have any color blocking issues with your encodes? I'm having a flower of a time with Harry Potter and the Half Blood Prince. I've been wondering if the movie is a bit over compressed on the DVD, thus translating into a grainy, compressed and blocked picture when encoding to a .m4v file.
destructo
--------------------------------------------------------------
Rokoding: http://roku.yt1300.com
Destructo! Project: http://destructo.YT1300.com
LunchTray Conspiracy: http://lunchtray.YT1300.com
 
shelleye
Topic Author
Posts: 30
Joined: Thu Dec 10, 2009 8:13 am

Re: Handbrake Best Practices Thread

Thu Jan 13, 2011 8:53 pm

No, I haven't had those issues. And I happen to have ripped all the HP movies my kids own, so I suspect I would have heard and/or noticed.

I don't know enough about any of this, unfortunately, to offer solutions, except to say that, in spite of 99.9% successful outcomes with the above settings, I still get occasional wierdnesses-- for some reason, some (but not most) episodes of a particular series just refuse to transcode; a very few (but not most) of the transcoded episodes, or dvds, won't start from the beginning, but if I fast forward one frame, they play just fine.

Sorry I can't be more helpful. :)
 
Arwen
Posts: 366
Joined: Tue Dec 22, 2009 11:33 am
Location: Middle Earth

Re: Handbrake Best Practices Thread

Sun Jan 16, 2011 2:14 am

Here are some Handbrake settings I used. It's
for a 720p HD to encode with Handbrake
using a super bit, (high bit rate), DVD. It was
just a test but seems to have worked fine.

HandBrakeCLI --no-dvdnav --cpu 8 --large-file \
--input /dev/sr0 --longest \
--audio 2 --arate 48 \
--optimize --format mp4 --vb 6000 --deinterlace \
--width 1280 --keep-display-aspect \
--output my_video_file.mp4

I would have prefered to use DVD -> 1080p since
my monitor is 1080p. Thus one single scale of the
video. But my monitor won't do 1080p at 24 or 30
frames per second which the Roku requires.

Anyway, I get double scaling, (but still looks great).
My Roku XR does 480i/480p to 720p, then my
monitor takes 720p and scales it up to 1080p.
Arwen Evenstar
Middle Earth
 
timeshadowrider
Posts: 1
Joined: Tue Oct 04, 2011 9:35 pm

Re: Handbrake Best Practices Thread

Tue Oct 04, 2011 9:39 pm

Shelleye - I have been trying to stream from my laptop to the Roku and it keeps buffering any chance of you emailing me or posting your configuration files on a public share?
 
mikebdoss
** Valued Community Member **
Posts: 4967
Joined: Mon Oct 25, 2010 12:52 am

Re: Handbrake Best Practices Thread

Tue Oct 04, 2011 11:30 pm

timeshadowrider wrote:
Shelleye - I have been trying to stream from my laptop to the Roku and it keeps buffering any chance of you emailing me or posting your configuration files on a public share?


FYI. this was Shelleye's last post, 10 months ago.
 
sharpedge
Posts: 136
Joined: Wed Nov 03, 2010 11:40 am

Re: Handbrake Best Practices Thread

Wed Oct 05, 2011 5:56 am

timeshadowrider wrote:
Shelleye - I have been trying to stream from my laptop to the Roku and it keeps buffering any chance of you emailing me or posting your configuration files on a public share?


What framerate are you using? I used to get buffering until I changed to always using 29.97
 
shelleye
Topic Author
Posts: 30
Joined: Thu Dec 10, 2009 8:13 am

Re: Handbrake Best Practices Thread

Wed Oct 05, 2011 10:03 am

True, I haven't posted since I got everything figured out-- happy to report that I haven't had to think about it at all since I got things working, which means that things are working! Everything I know I posted in this thread. The .txt configuration files are available tivocommunity forum. If you give me instructions for posting to a public share, I will be happy to do so. :)

PS the frame rate mentioned above was ESSENTIAL for me.
 
stratcat96
** Valued Community Member **
Posts: 3432
Joined: Sat Nov 06, 2010 7:22 pm
Location: Ice Planet Hoth
Contact:

Re: Handbrake Best Practices Thread

Wed Oct 05, 2011 1:28 pm

If you use Freemake with the Apple-->iPad preset and framerate of 29.97 everything will work fine For DVD rips. I have done about 60 of them so far.. It's faster and upconverts 720x480 widescreen DVDs to 852x480. It also can rip straight from a dvd without having to use another program like anyDVD to break copy-protection. There have been a few it has a problem with but 98% have been no problem. If you are not trying to add a pass thru audio track it's the easiest and best way to go.

Who is online

Users browsing this forum: No registered users and 11 guests