Playing x264/H.264/MKV on the Xbox 360

Update 03-30-2008: If you follow this tutorial and find that GOTsent isn't for you, please check out XenonMKV, a custom utility I've written to replace this process. I highly suggest you check it out! Questions and concerns can be posted on the XenonMKV Forum. I've also stopped mirroring any new custom GOTsent packages.



 

With the release of the Xbox 360 'Fall' Update, MPEG-4 ASP support (commonly known as DivX or XviD support) has been added to the integrated video player.

 

ilmlivebladefall2007.jpg

The primary missing feature is the ability to play high-definition H.264/x264 MKV streams. While H264 support was added in the previous Dashboard upgrade, unfortunately, the decoding implementation isn't perfect: the dashboard doesn't natively read MKV. As well, high definition files can only contain a 2-channel AAC soundtrack, not full 5.1+ surround. This prevents using the Xbox 360 for most H264 content available on the Internet.

There is still a way to view HD content (with 2 channel sound) on the Xbox 360: transcoding the audio track and repackaging the MKV file into a MP4 container. This process takes significantly less time than converting both video and audio, and the visual quality is maintained. You do lose the additional 3.1 channels, but it's better than having to install a Core 2 Duo E6750 under your TV just to play these files.

For a while, AAC recoding has been somewhat of an arcane art, known only to those who've spent years looking on the Doom9 forums. I'd looked into this a few months ago and wasn't too impressed with the available solutions. Skimming the Xbox 360 information thread from the Something Awful forums today, though, I found a solution that should work for people prepared to install a few free utilities.

Getting Set Up for Encoding
You'll need a few free utilities to get your system in the best shape possible for repackaging the MKV contents into an MP4 container. Here's the sequence I followed on a fresh XP installation:

  • Download and install the newest version of CCCP, which includes a stable version of ffdshow and Haali Media Splitter. A new edition was released on January 24, 2008 so I'd advise an upgrade if you're running something older.

  • Download and install AC3Filter, which is a good utility to have anyway if you're planning on listening to 5.1 audio or outputting optical/coaxial audio from your sound card.

  • Download a copy of Nero AAC Encoder and extract the contents of the win32 folder where you can find them later. If you use the package I provide below, the files are already included.


The Magical Tool of Whimsy
The tool that makes Xbox playback possible is called GOTSent, which boasts "easy and fast x264 .MKV to PS3 and XBOX 360 compatible MP4 and PS3 compatible VOB/AC3 conversion." It's essentially a wrapper around several open source video encoding utilities, but it certainly does the job as intended. The current version is 0.23B10, which has been mostly stable in my experience. Make sure you've already downloaded and installed Nero AAC Encoder, CCCP and AC3Filter before grabbing this file.

Before You Begin: AC3Filter Gain Level
In my experience, the AAC audio in the newly muxed file is at a significantly lower level than most non-HD sources, so you may have to increase your volume to properly watch the videos on the Xbox 360. The more permanent way to solve this issue, though, is adjusting the gain control in AC3Filter. These instructions assume you've installed the newest CCCP and AC3Filter already.

  • Start the original H.264 video file that you'd like to convert in Windows Media Player, Media Player Classic, Zoom Player, or any other player that uses DirectShow media filters. (Most players except VLC fall into this category.)

  • In your system tray, right-click the red FFDshow icon - highlighted in yellow in the following image. Select AC3Filter from the popup menu.
    ffdshow tray icon

  • In the AC3Filter dialog, slide the Gain slider up until the sound from the original video file matches your normal system sound or MP3 volume. Try seeking to a loud section of the video to get a good idea of where this setting should be. I needed a fairly hefty boost on my system (which has onboard Intel HD-compatible sound to standard stereo out, on an Asus P5B Deluxe motherboard) of about +16.6dB to match standard iTunes output, but going any higher resulted in clipping and distorted sound.AC3Filter Gain ControlAs you adjust the slider, you should immediately hear the difference in the video file. Ideally, make this setting as close to 0dB as you can tolerate to avoid distortion. Looking at the input levels equalizer may also help in determining the right setting.

    Once you've selected your gain level, click OK and close the current video file.


GOTSent Tips and Tricks
You'll definitely need to use the "Split >4GB option" so that the Xbox recognizes the output files, and try converting one file at a time to get a general idea of how the process works. I've been able to avoid using the MPEG2 Recode, Safe Sync, Mux to Vob (PS3) and 25 FPS options, so leaving them unchecked should work.

Once the GOTSent process is done, rename the output file to Filename.avi - while the Xbox 360 should detect the original .mp4 extension from Zune or Windows Media Player 11 sharing, Windows Home Server standard media sharing requires .avi extensions for the files to be properly seen. Add the faux-AVI files to your video library as usual, and you should be up and running watching HD content from your Xbox 360.

Caveats and Setbacks
Not all files I've found will work with GOTSent, but it's certainly got a high level of compatibility with exotic downloads. For example, certain x264 HDTV files simply cause GOTSent to chew up CPU and refuse to enter the demuxing phase of the job. You can tell if this is the case, because a command prompt window appears in the tray during the first step GOTSent takes.

It appears as if all the tools included with GOTSent are single-threaded and Win32 binaries; for those of you with high end 64-bit systems intending on taking advantage of extra CPU cores, there's not too much optimization coming your way with the utility. You'll still be able to perform normal computing tasks while the program works, though, so not all is lost.

I'm looking forward to any new updates and fixes for this program, and will keep you informed as to any developments I'm aware of. sentry23 (the original author) has done a great service releasing this tool and it's certainly sped up the process of converting files for me.

 

Comments

Professor Grum on 2008-02-05 07:14 AM (#)
nice wokr on this, this is exactly what ive been looking for,

Now i can play all those illegally Hi def Blu-Ray/HD rips movies downloaded from bittorrent or from yastorage/adrive/other upload sites posted http://www.rlslog.net/ that get put into the x264 mkv format. :)
Jake Billo on 2008-02-05 01:14 PM (#)
Hey, nobody said anything about illegal MKV rips. :) This is just a conversion guide.
God on 2008-02-20 11:05 PM (#)
After going through many time consuming articles and forum threads, i find that this is probably the easiest way to convert a x264 mkv file into a mp4 playable on both the xbox 360 and ps3

definately try this way before doing anything else.
Houmi on 2008-02-21 02:53 PM (#)
Very nice doc. Thank you.

By the way you do not need to split the files into 4G, if you format your
USB drive (to be used with Xbox 360) via MacDrive w/ the HFS file system
format. But yes, if you do use FAT32 you need to split video files.
Jake Billo on 2008-02-21 03:16 PM (#)
The 4G restriction also applies from NTFS drives over Windows Media Connect. The box simply refuses to play the files, and with >1.1TB of videos an external drive's really not an option for me. :) You also can't connect an NTFS drive directly to the box, so that option's out. :(

Thanks for the pointer though!
Gotsent rocks on 2008-02-21 11:42 PM (#)
Yes. the xbox 360 can't read any h264 file over 4gb and/or has 5.1 aac. Two features i hope they add
Houmi on 2008-02-22 02:43 AM (#)
Wait a minute, so MP4's have to be 4G or less ? Because I do have 7-8Gs
for my WMV's... just about to use this guide to convert couple of mkv's
I have.
Roo on 2008-02-22 02:58 AM (#)
i did everything exactly as posted here but unfortunately it didn't work....all GOTsent did was to split my 4.32GB file into 2 files of 198 MB combined. so i have no idea what happened.....i am retrying to convert the .mkv file without splitting and see if it works. i have read comments here saying that it wont work if the file is over 4GB but i am gonna try anyways since the first option didn't work....i'll briefly state below what i did and what the outcome was if you guys can spot an error.
i selected the file i wanted to convert in GOT....selected my output folder....the only box that was marked for split>4gb....i started the converting and after 30 or mins it created two mp4 files....one was 101MB and other was 97MB. i tried playing them using media player, VLC and others but only the sound worked and the video files were somehow totally gone which is what i expected with 198MB. so got any solutions?
i use vista, trying to play my first downloaded HD dvd on my tv using media center and xbox 360.
alright as i was writing this....my second attempt was a failure as well. this time the split?4gb was unchecked and the same outcome....this time one file of 198MB instead of 2. playing only the audio.
Jake Billo on 2008-02-22 10:38 AM (#)
Houmi: In my experience, anything with a filesize above 4GB won't work as intended. I've tried this on two separate files and both came up with the same result - inability to play the file simply based on filesize. It seems to be another restriction on Microsoft's part.

Keep in mind that my testing was done through Windows Home Server and its built-in version of Media Connect; using the media sharing in WMP11 (which has never really worked as intended for me) may give better results. I'll run a conversion this afternoon and perhaps post a clarifier if I can get decent results.

Roo: That's unfortunate to hear. It sounds like the original MKV file has a bad frame or segment that's preventing GOTsent from encoding the video material correctly. If you'd like, feel free to email me the filename or release name that you're trying to convert, and I can check things out from my end. It may be that the original release has been nuked, which can sometimes happen if you're using BitTorrent or other similar means to get these files.
Houmi on 2008-02-22 11:19 AM (#)
Jake,

I did convert a mkv to mp4 (4.25g), I left it intact (did not split it),
it plays fine on my PC. I checked it w/ Gspot and it shows it's a h264
and the ac3 is now aac with 2.0 channel instead of 5.1, so the
conversion worked. But it does not work on 360.

I'll reconvert tonight and split it... and see what happens. Again,
I have some BBC / Discovery Shows that are 8GB WMV's (VC1) and they
all work from my USB drive that is formatted in HFS as I said it before.

I'll let you know if this was a conversion error or size error.
Roo on 2008-02-22 06:49 PM (#)
jake: link is posted below from where i got the movie from....the first one on the list (equilibrium). i doubt that there is anything wrong with the file but i am gonna try all of this with a totally different movie from a different site. thanks for trying to find the problem for me. and thanks for posting this guide....from what i have seen online about converting mkv and playing it on 360, this is by far the easiest and most convenient way to do it. now i just have to make it work for myself. lol.
http://hdtvshare.blogspot.com/search/label/HD%20720p?updated-max=2007-05-04T03%3A27%3A00-07%3A00&max-results=20
Jake Billo on 2008-02-22 07:01 PM (#)
Unfortunately, it looks like I have a different HD release of Equilibrium than that one (just checking... I've got the PROGRESS copy, which is tagged really similarly), and my usual sources aren't being too forthcoming with any details on nukes. Since I'd rather not sit in line for hours with BitTorrent or Rapidshare, I'll try converting my version now and let you know how that fares.
Roo on 2008-02-22 07:06 PM (#)
Jake: thanks for the help....you are right though, the second half of the movie doesn't work. i got it last night and had never actually seen the entire movie. i unzipped it few times to make sure that wasn't the problem....but there is something wrong with the rar files. so i am gonna get a different movie and try to convert it....if you got a working link to equilibrium or any other HD movies please let me know...thanks for your help.
roo
Jake Billo on 2008-02-22 07:14 PM (#)
HD movies, in my opinion, necessitate a newsgroup account just based on the slow download times. Pulling 5 to 9GB down for each movie over a standard 10Mbit line is still hell even at top speed. I also wouldn't trust BitTorrent unless you had something like a private TorrentLeech account with PeerGuardian running.

It's worth the $15/month to have access to a decent collection of HD requests, plus all the other available content, plus avoiding the perils associated with uploading is always good news. Not for everyone, but I have no problem paying for a quality service - standard XviD files pull down in about 20 minutes at top speed.
Roo on 2008-02-22 07:22 PM (#)
i just downloaded a small HD file and same problem....only audio and no video.

Evanescence-Call.Me.When.You_re.Sober.Live_720p_x264_hdtvshare.blogspot.com_.part1.rar
Evanescence-Call.Me.When.You_re.Sober.Live_720p_x264_hdtvshare.blogspot.com_.part2.rar
Roo on 2008-02-22 07:24 PM (#)
http://rapidshare.com/files/29442842/Evanescence-Call.Me.When.You_re.Sober.Live_720p_x264_hdtvshare.blogspot.com_.part1.rar
http://rapidshare.com/files/29444573/Evanescence-Call.Me.When.You_re.Sober.Live_720p_x264_hdtvshare.blogspot.com_.part2.rar
Roo on 2008-02-22 07:25 PM (#)
http://hdtvshare.blogspot.com/search/label/HD%20720p
Jake Billo on 2008-02-22 07:38 PM (#)
Okay, I'll pull these files and see what I can come up with.
Roo on 2008-02-22 08:01 PM (#)
no luck on my side. no video, only audio. only the MPEG2 recode option gives me audio and video both but that doesn't play on my 360 via media center.
Jake Billo on 2008-02-22 08:42 PM (#)
I'm actually now having similar issues with the utility, where I'm only getting audio output and no video. Not sure if this has something to do with the network drive I'm running things from, but I'll try and get to the bottom of things.
Houmi on 2008-02-22 08:49 PM (#)
Ok, I did another convert and it works now on 360 (it had to split the file).

I just wish there was a way to retain the 5.1 sounds , that's too bad.
Jake Billo on 2008-02-22 09:03 PM (#)
Aha! Running the conversion from a network path (UNC share), like \\server\Videos\HD\Test.mkv causes the program to fail at remuxing the "movie.h264" and the converted audio file. Running the same MKV file from a local drive causes the file to retain its proper size and contain the video. I'm willing to bet that the batch programs in place don't recognize network paths.

I'm going to do some more testing - my theory now is that if you use a path containing spaces, GOTsent won't work properly. Times like this, I wish the utility itself was open source so I could take a look for the issue.
Roo on 2008-02-22 09:17 PM (#)
its like you are speaking french to me...when you do confirm your theory can you please tell me how to fix it in lame terms?
Roo on 2008-02-23 01:00 AM (#)
alright 360 wont even play a regular avi file...nor does it play divx....i had to convert all of them to wmv and the quality got worst.
Jake Billo on 2008-02-23 11:38 AM (#)
OK, here's what I've found. If you're running the conversion process over a network, it's bound to fail. The most reliable way I've found to run these conversions is to move the original MKV right to C:\ (or D, or other hard drive) and then output to that drive as well. For example, I'd run the process on C:\s01e01.whatever.mkv and output to C:\.

Add Comment

If you'd like, you can add your own comments to this post. The site owner may choose to moderate comments, so your comments may not appear immediately.



(Your email address will only be stored and not posted publicly.)

Verification