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?