Using the Roku Internet video box with a USB Drive

I bought a Roku box last month and its been quite a bit of fun. When we watch TV, we now watch Vimeo or Netflix. There is a lot of great “user created” content – in fact, I have not watched satellite TV in six weeks now and plan to terminate our subscription this coming weekend.

The new Roku box also supports an external USB drive – which could be either Flash or hard disk based.

Streaming my own videos from the drive has mostly worked fine. Except for some that pause frequently and say “loading, please wait”. Looking around the net, I found a number of mostly random explanations.

The simple reason is that the data rate of the videos I created (from my own video productions) was too high. I had encoded 1080/30p videos at 16 Mbps (same as BluRay discs).

I registered as a software developer (in real life I am a professional software engineer) with Roku and have downloaded the developer documentation.

According to the documentation, Roku supports .mp4 files, mov and .m4v files having h.264 video compression, and WMV9 SD and VC-1 HD video files, using constrained variable bit rate (VBR) encoding. (I have not succeeded in getting the .wmv files or .mov files to work, however.)

The frame rate must be either 23.976 or 29.97 fps and this is probably the key part – the average USB disk video bit rate is limited to 8 Mbps depending on the codec used and the peak video bit rate is limited to 1.5 x the average bit rate. (For streaming videos coming over the Internet, the data rate is limited to an average of 1.6 to 4 Mbps depending on the coding. For H.264 HD, its limited to an average of 3.2 Mbps.)

Depending on your MP4 encoding tools, you might have difficulty specifying precisely the options you want. The key goals, it appears, are to try and select a constrained VBR, set to less than 8 Mbps, at 23.976 (a.k.a. 24 fps) or 29.97 (a.k.a. 30 fps).

I am doing some experiments with encoding at different data rates to see what happens and I will probably post an update later.

One thing that is clear – encoding a 1920x1080p video is sort of a waste of time since you’ll have to encode it at less than 8 Mbps. At that level of compression, a 1280x720p at 8 Mbps will actually look much better. (Well, unless your video is mostly static images with little movement.)

Consequently, while the Roku box really does support 1080p, you are unlikely to see video clips that are actually any better than 720p. In fact, most people cannot tell the difference between 720p and 1080p anyway, especially if the screen is less than 55 inches.

Update: On Mac OS X, I used MPEG Streamclip to create some 1280×720 video files for playing off a USB drive with the Roku. At about 7.5 Mbps, the video almost plays without buffering. I probably need to pick a slightly lower data rate – may be 7.2 Mbps for the video clip.

I had much better success playing some 8, and even 12 and 16 Mbps encoded videos produced by the Magix Movie Edit Pro 17 program on Windows 7.

I am guessing that it is not strictly the data rate but the “complexity” of the h.264 encoding used as well as whatever the unspecified “peak” data rate might be. MPEG Streamclip does not provide many options to control the h.264 encoding while Magix provides overrides of just about everything. Again, I’m guessing here but I suspect that MPEG Streamclip might be using one of the higher complexity profiles, or setting the “peak” rate to perhaps 2 x the selected data rate, and the Roku just can’t keep up.

I do think we’ve identified why some of us have received the “loading” message periodically while trying to play our own videos off a USB drive using the Roku box. The solution is to encode at a data rate probably between 7 and 8 Mbps using a variable bit rate h.264 encoder and setting the peak data rate, if you can set it, to something less than 12 Mbps.

Leave a Reply

Your email address will not be published. Required fields are marked *