Streaming MPEG-4/H.264 Files to the Xbox 360

I was excited when Microsoft added support for H.264 video (my video codec of choice due to its extremely efficient compression) to the Xbox 360 earlier this year. I eagerly fired up Windows Media Player to turn on content sharing and went to try it out, only to find that all files with an .mp4 or m4v extension did not even show up in the list of available videos. Feeling a little disappointed, I forgot about this for a while.

Then, I read an article on arstechnica which alerted me to the fact that the Zune software could also share with the 360, and it supports H.264 and MPEG-4. Feeling a little excited again, I downloaded and installed the Zune software (the installer takes an unusually long time for some reason). However, as Zune loaded up my video library, only a couple of my videos appeared. These files did, indeed, play on the 360. However, some Google searching revealed that while the 360 itself supported H.264 High Profile, the Zune software only supports H.264 Low Profile. This basically meant that only those videos which I had encoded for my iPod were appearing in the Zune library. This is not the majority of my library, since my usual intent when encoding videos is to try to preserve the quality of the original DVD while taking up the least amount of hard drive space.

For those of you not following along with all the techno-speak, the short version is that Microsoft supplies two different programs which can stream content to an Xbox 360, but neither program supports all the video formats that the 360 itself supports.

Anyway, my goal of streaming H.264 to my 360 got put back into its box again until the release of the “New Xbox Experience” (NXE) last week. NXE brings Netflix streaming to the Xbox 360, which is absolutely fantastic. Yes, the library of available videos is small, but the intersection of the set movies that I want to see and the set of available movies is not empty. Furthermore, the quality is quite good. So, from my perspective, this is a great addition to the 360 experience. Yet, having this new feature brought back the bug to get H.264 streaming working on my 360. Some furious google searching revealed some good fruit.

There is a way!!

Red Herring has created a registry patch which can coerce Windows Media Player into reading MP4 files. Red Herring’s instructions which actually allow you to play H.264/MP4 files in windows media player, but I didn’t even bother going that far. Simply installing his registry patch causes WMP to add your MP4 and M4V files to its library, where you can now stream them to the 360.

Discovery of this technique has also coincided with a new release of Handbrake. Handbrake is an excellent encoder for Windows/Mac/Linux that can encode to MPEG-4 and H.264. The new release has support for some fancy new psycho-visual rate reduction techniques that essentially allow the encoder to output a smaller file while preserving the same perceived video quality. After following along with some forum threads, I have discovered some settings which produce excellent quality video which can be played back on my computer, and Xbox 360, or an Apple TV.

handbrake-thumb.jpg My Handbrake settings. Click image for full-size version.

Basically, starting with the new AppleTV preset, turn off “large file size”, then go to the “advanced” tab. Change “b-frames” to 3, “subpixel motion estimation” to 6, and turn on “CABAC entropy encoding”. Finally, add the text “:b-adapt=2” (without the quotes). Your final options string should look like this (order of entries doesn’t matter):

ref=3:mixed-refs=1:bframes=3:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=6:analyse=all:b-adapt=2

Enjoy!


0 Responses to Streaming MPEG-4/H.264 Files to the Xbox 360

  1. There are currently no comments.

Leave a Reply