Xbox 360 H.264 Conversion GuideOriginal Page URL: http://www.digital-digest.com/articles/Xbox_360_H.264_Conversion_Guide_page1.html
Date Added: May 11, 2007
Date Updated: Jan 9, 2010
The Spring 2007 Dashboard update for the Xbox 360 adds H.264 playback support. H.264 is a very advanced video codec used in Blu-ray/HD DVD, and offers better quality and smaller file sizes than DivX/XviD, at the cost of slightly more processing power (and encoding time). Processing power becomes less of an issue with the powerful Xbox 360, and since the Xbox 360 does not support DivX/XviD (and is unlikely to do so), H.264 then becomes an ideal format for those that don't want to use WMV. Please note that some people have had success with playing back standard resolution MOV (QuickTime) and certain high resolution MOV (QuickTime HD) files directly without further re-encoding, so you might want to try this first. QuickTime HD files are already encoded using H.264, but some are encoded using settings which are incompatible with the Xbox 360's H.264 support. The PS3 also supports H.264 playback, and you can view the PS3 version of this guide here - the PS3 has an advantage over the Xbox 360 in that it supports AAC 5.1 channel audio (although with limited decoding support).
Make sure you are able to playback H.264 clips on your computer first. Consult our H.264 Playback Guide if you are unsure.
This guide uses MeGUI to provide the H.264 conversion from a DVD source or from other file formats (AVI/DivX/XviD/MOV/HDMOV - many other formats, such as MPG, are also supported). MeGUI is one of the newer tools that's been designed with H.264 encoding in mind. This guide is very similar to the MeGUI H.264 Conversion Guide, except it simplifies a few things and the H.264/MP4 file produced has Xbox 360 compatibility in mind. It also covers how to playback the MP4 file on your Xbox 360 using the TVersity or Zune software.
This guide is aimed at intermediate users that already have some knowledge in regards to video conversion. As such, basic knowledge of things such as framerate and resolution is recommended (and since you are here to experiment with H.264, this assumption is not all that unrealistic). You will also need to know some network basics for Xbox 360 to Zune software connection, such as knowing what your network IP address is, configuring your firewall or port forwarding if your computer is not on the same LAN as your Xbox 360.
Software you'll need (all freeware):
Hardware you'll need:
Step 1: Installation
If you're using Windows XP, the first thing you need to do before you can even install MeGUI is to download and install Microsoft's .NET Framework version 2.0. It's a fairly large file and installation could take more than half an hour. If you're already using Windows Vista or 7, then the .NET Framework 2.0 is already installed.
The next thing you need to download and install is AviSynth.
If you're using Windows 7, because Microsoft now includes their own codecs pre-installed with the OS, this interferes with the way MeGUI works and you'll need to install compatible codecs (for example, ffdshow) and use the Preferred Filter Tweaker for Windows 7 to change the settings so that the Microsoft codecs won't be used within MeGUI. You can download and install ffdshow (remember to choose the 64-bit version if you're using 64-bit Windows), and then you can download and run the Preferred Filter Tweaker for Windows 7 tool individually, but if you're starting with a brand new Windows 7 system, you might want to install the K-Lite Codec Pack, which works well with MeGUI (I recommend the Full version of the codec pack). If you're using 64-bit Windows (Vista or 7), then you should also download and install the K-Lite 64-bit add-on pack after you install one of the K-Lite packs (Full or Mega). The advantage of using the K-Lite pack is that it installs both ffdshow and the Preferred Filter Tweaker for Windows 7 tool, and in a configuration that is tested to work well.
In any case, once Preferred Filter Tweaker for Windows 7 has been installed, start the tool and in the section where you configure the preferred DirectShow decoding filters for Windows 7, you need to make sure at least the "H.264" option is set so that ffdshow is used, instead of the Microsoft codecs (for those experimenting with VC-1, you need to set its settings to ffdshow as well). If you're trying to load or encode any video format in which MeGUI appears to hang, or give you an error in relation to AviSynth, then you can come back to this tool and ensure the video format is using the ffdshow codec, and not the Microsoft one. Press "Apply" to apply the changes and then exit the application.
You can now go on and download MeGUI.
Install MeGUI. Start it up and most likely, it will prompt you to update the software used by MeGUI - click "Yes" to launch the update Manager.
Press the "Update" button to start the update process - MeGUI will automatically download and launch the install for the required software. Note that when MeGUI asks you to import H.264/XviD/Audio/... profiles, right click and select "Select All" to import all of them (overwrite existing ones if asked). You will most likely get a "1 file had problems" error, this is because the "neroaacenc" software cannot be downloaded automatically from MeGUI. To download it, go to this page, and download the ZIP archive. There are several files in the ZIP archive, but the files we need is NeroAacEnc.exe. Extract the .exe files to your "megui\tools\neroaacenc" folder (eg. "c:\program files\megui\tools\neroaacenc\win32\neroaacenc.exe"), creating one if it does not exist.
When all the updates are completed, you can now close the MeGUI updater.
If you've extracted neroaacenc, you might need to access the "Settings" option from the "Options" menu, and go to the "External Program Paths" section. For "NeroAacEnc", use the browse button to locate where you extracted the neroaacenc executable file (eg. "c:\program files\megui\tools\neroaacenc\win32\neroaacenc.exe"). Press "Save" to close the settings window.
Also, MeGUI often doesn't update to the latest x264 version, so you will have to do this manually. First, from within MeGUI, go to the "Tools" menu and select "Settings". Go to the "Program Paths" section and see where MeGUI accesses the x264.exe file.
Step 2: DVD/MPEG-2 Conversion
The instructions in this step are for conversion from a MPEG-2 source (eg. DVD, SVCD). If the file you want to convert to H.264 is not a DVD or MPEG-2 source (eg. AVI/DivX/XviD/MOV), you can skip to "Step 3" right now.
If you are using a commercial DVD, you will need to rip the DVD to your hard-drive. Because ripping a commercial DVD may be illegal in your country, we won't cover these steps here.
For more information on all the settings of MeGUI, please refer to the MeWiki website.
The next thing we need to do is to use MeGUI's D2V creation tool to create a D2V file needed for MeGUI/AviSynth to handle MPEG-2 files. This step is required only for MPEG-2 files - all other types of inputs do not require a D2V file and can be loaded straight into AviSynth and as mentioned before, you can skip this step and go to the next page/step (Step 3: AviSynth Script Creator).
Start MeGUI. I like to first clear the job queues of previously finished jobs. This is optional, but it might help to make things clearer. To do this, click on the "Queue" tab and then click on the "Clear" button.
From the "Tools" menu, select "File Indexer". In the "Input File" section, load the first VOB file of the movie titleset (the rest of the files in the set will be loaded automatically - if not). You will get an error message about not being able to find DVD Decrypter generated info files, this is fine (as we did not use DVD Decrypter's IFO mode) and press "OK" to skip this error.
Select which audio track(s) to demux - you can select more than one track if you want the encoded file to have multiple audio tracks. Alternatively, you can just select the demux all the tracks and then choose the correct audio track(s) later on.
The default save directory is the same directory as your loaded DVD VOB files - change this if you want to. Select both the "On completion load files", "and close" checkboxes and press the "Queue" button. You are now returned to MeGUI - click on the "Queue" tab and press the "Start" button to start the D2V creation. When processing has finished, the status of the queued job will read "Done" and the created D2V file will be loaded into the AviSynth Script Creator ready for the next step. This can take a while, so please be patient - the status window's progress bar may not move, but don't worry, DGIndex is working.
Please note that if for some reason MeGUI refuses to process the VOB series (only processes the first file in the series), then you may have to use DGIndex manually to create the D2V file. This guide can help you do so, and DGIndex is already included as part of MeGUI under the "Tools" folder (for example: C:\Program Files\MeGUI\Tools\DGIndex\).
Step 3: MeGUI: AviSynth Script Creator
For more information on all the settings of MeGUI, please refer to the MeWiki website.
This step will use MeGUI's AviSynth Script Creator tool (Tools -> AVS Script Creator) to create an AviSynth script. If you followed Step 2, the AviSynth Script Creator tool should already be started with the D2V file created loaded. Otherwise, you'll need to load the media file you want to convert into the "Video Input" section (see hint below about opening files whose formats AviSynth does not natively support, including MOV files).
AviSynth is able to open almost any video file that you are able to play with a Directshow based multimedia player, such as Media Player Classic or Windows Media Player. You may need to select the "All Files" option when opening the file to be able to see it (eg. FLV files). In most cases, you'll need to install a video codec, an audio codec and a splitter filter for the format you wish to convert.
For example, if you want to convert FLV files using MeGUI, you will first need to make sure you have the required video, audio and splitter filters to make FLV files playable in Windows Media Player. A good way to ensure you have all the right codecs and filters installed is to use the K-Lite Mega Codecs Pack. Download the package, and it will ask you to uninstall any existing filters which might interfere, and then install a set that is very compatible with tools like MeGUI. You can find instruction on how to install the K-Lite Mega Codecs Pack here.
The "Input DAR" is the aspect ratio of the input video. In most circumstances, it should be automatically set for you. Anamorphic DVDs will be set to "ITU 16:9", for example.
For DVD sources, press the "Auto Crop" button to remove the black bars from the input video if it has any (most widescreen DVDs will, but most other files won't).
Next, you have to decide whether you need to reduce the resolution of the output video as compared to the input. In most cases, especially converting from DivX/XviD, you do not need to so uncheck the "Resize" option. For DVD sources, you might need to reduce the resolution, but only if you have file size requirements (eg. to fit a certain amount of video onto 1 CD). For DVD conversion onto a single CD (700 MB) using H.264, you can get away with using the maximum resolution (720x***) - so uncheck "Resize" in this case too.
Click on the "Filters" tab. For films on DVDs, you usually do not need to run a deinterlacing analysis. If the content you have is TV based, then you might need to click on the "Analysis" button to see if the video requires de-interlacing. Select "Source is Anime" if that's what you have.
Again, if you followed my advice for keeping the resolution for DVD sources, then you don't need either the resize of the noise filters. Otherwise, if you chose to reduce the resolution, then you can choose how the resize will look like ("Bicubic (Neutral)" is recommended as a middle of the road choice). If the source has lots of noise, you can choose to enable the noise filter and choose how much noise is present in your source (usually not necessary, unless the original source is VHS or something). The other options can be left alone ("Colour Correction" is automatically checked for D2V input sources).
If your source is not DVD, then you can click on the "Edit" tab and edit the AviSynth script manually to enable audio (you don't need to do this with DVD sources if you have followed this guide, since we have already demuxed the audio using D2V Creator). Simply change the "audio=false" entry to "audio=true".
Make sure the "On save close and load to be encoded" option and press the "Save" button to save the AviSynth script (by default, in the same directory as the D2V file, the filename is not important). Don't worry too much about the AviSynth Script Creator tool's preview window - it can be a little buggy where cropping and resizing and concerned. After saving, the AviSynth file should be loaded automatically into MeGUI - MeGUI's preview window does work fine and please make sure the video looks alright, especially for DVD sources with cropping/resize.
Step 4: MeGUI: Video Encoding Options
We'll now set up the H.264 encoding options in the x264 encoder. This step has the most options to configure, and this is where Xbox 360 compatibility is determined. This guide won't go into detail about all the options, just the ones you need to ensure Xbox 360 compatibility - and if you need further explanation of the options, refer to our x264 Options Explained article.
In the MeGUI "Input" section, select one of the "x264" profiles for the "Encoder setting" option. We do not need to set a container as we will do that later using the "AutoEncode" function.
Xbox 360's H.264 video support is limited to the following (you don't need to understand what it all means):
The "x264: Xbox 360" set of profile is the one that we need and using this one will ensure compatibility with the Xbox 360. If you want to be able to set the output file size, you need to select the "2-pass" profile - all the other profiles will have unpredictable output file sizes as they're either based on encoding speed or output quality. For example, "Balanced" will give you a good balance between encoding speed and quality, but you can choose something like "High Quality" for that extra bit of quality, or "Insane" if you don't mind spending hours to encode just a few minutes of video.
The problem with both of these profiles, however, is that they are all High Profile profiles, meaning that software like Zune will not support them (the second section of this guide will cover how to connect your Xbox 360 to your PC so you can play/stream files off it, and using Zune is one of the options). This is easily solved though, because you can press the "Config" button to open the profile editing area. Next, select one of the Xbox 360 profiles, depending on which you want to edit. Change the "AVC Profile" setting to "Main" or "Baseline". Then press the "New" button, and enter in a new name for the profile.
We can determine which of these profiles we should use for our encoding. You can use the Baseline profile for all encodes, it's the fastest and it will be the most compatible. Using the Main Profile will improve quality (at the expense of encoding speed, and some compatibility issues). Using one of the "High Profile" profiles will further improve quality (and reduce encoding speed), but compatibility might be an issue (we had no playback problems once we disabled "B-Pryamid"). The main compatibility issue is that High Profile files will not show up in the Zune software, and therefore, not show up on the Xbox 360 for playback - the only way around this at the moment is to copy the file to a USB drive or CD/DVD media and play the file from there (hopefully a software fix will solve this problem in Zune).
It is recommended that you use one of the "High Profile" profiles, as this would ensure maximum quality. You can always share the file with your console using TVersity, which will support High Profile encodes.
Select the profile you want to use from the "Video Profiles" drop down menu.
Step 5: MeGUI: Audio Encoding Options
Now it's time to set up the audio encoding options. If you've followed this guide for DVD conversion, then the demuxed audio track we selected in the D2V Creator should already be loaded in (if not, load in the .ac3 file that was created). If you are not converting from a DVD source, then you can either load in a separate audio file or if you edited the AviSynth script (set "audio=true"), then load in the AVS file into the "Audio Input" section (meaning both video and audio inputs are the same AVS file). If you want more than one audio track, right click on this audio aread and select "New Track". If you changed your mind about including an audio track, click on the "X" button to remove the audio from being included.
Now we select an audio codec to use. The Xbox 360 supports AAC LC (low complexity), 2 channel audio only. Select one of the "Nero AAC" profiles, such as "NDAAC-LC-96Kbps" as the "Encoder settings" option. Just like the video profiles, you can click on "Config" to edit the profile or create your own - as long as you ensure the "AAC-Profile" is set to "AAC-LC", and "Output Channels" is set to stereo, it should all work with the Xbox 360. The only setting you might want to change is the bitrate (96 Kbps should be enough for most encodings, 128 Kbps gives you near CD quality audio, and anything else above that, like 192 Kbps, is a bit of an overkill).
For more information on AAC audio options, please refer to this MeWiki page or this Wikipedia entry.
Step 6: MeGUI: Cutting, Bitrate Calculator and AutoEncode
If you wish to cut your input so that you don't encode the entire video, it is possible to do this using MeGUI's AVS Cutter tool. To launch it, go to the "Tools" drop down menu and select "AVS Cutter". You will be asked to load in your AVS file (the one generated in Step 3) - do it.
What's going to happen here is that a list of "zones" need to be added. Each zone has a start frame and an end frame, and all frames in between will be kept (and all frames outside of the zones will be cut). You can either manually enter the desired frame number into the "Start Frame" and "End Frame" input box of the AVS Cutter tool and then press "Add" to add the zone, or use the video preview to skip to the appropriate sections and press the "Zone Start" and "Zone End" buttons to set a start/end frame, and then the "Set" button to add the zone to the list. If you specified multiple zones, you can also specify a transition between the zones (fade is the default setting). Once you are all done, press the "Add cuts to script" button and the cuts will be added to your AVS script. Press "Close" to close the "AVS Cutter" tool.
Press the "AutoEncode" button or from the "Tools" drop down menu, select "AutoEncode" to launch the Automatic Encoder setup windows.
This is pretty straight forward - just specify the output size of your video file either as a file size, or as an average bitrate and make sure the Container is set correctly, to "MP4" for the purpose of this guide. Note that certain profiles, which are based on quantizer selections, do not let you set an output file size (for the Xbox 360 or PS3 profiles, only the "2-pass" profile allows you to set the file size). For AVI/DivX/XviD conversion, you can get the same quality video at roughly 80% of the original AVI/DivX/XviD file's filesize. For 720p/1080p QuickTime HD (MOV) files, these are already using H.264 so you should try and match the file size whenever possible (again, make sure the "Average Bitrate" is under control). For maximum compatibility with the Xbox 360, the bitrate peaks should not exceed 15 Mbps (15,000 kbit/s, although I've observed brief peaks of more than 25 Mbps that seems to not cause problems, and that the Xbox 360 handled peaks better than the PS3), otherwise you could see skipped playback. There is currently no way to control the bitrate peaks for the encoded file, and so as a general rule, try to keep the average bitrate of the video under 9000 kbit/s. The output location can be changed as well - this file will be the final output file that you want, so make sure you remember where you put it and don't accidentally delete it when cleaning up (I like to put this file in a different folder to all the other files, just in case).
When you're ready, press the "Queue" button and all the necessary jobs will be added to the encoding queue.
Click on the "Queue" tab and all the jobs should be listed there. Below is an example job queue where I have two video clips "tdk" and "seu" to be encoded, an explanation of the queued jobs shown in the screenshot below:
About Digital Digest | Help | Privacy | Submissions | Sitemap
© Copyright 1999-2011 Digital Digest. Duplication of links or content is strictly prohibited.