• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 7
Working Solution: 720p/HD movies on your XBOX (using DiVX)
#1
Lightbulb 
*New DiVX Profiles / Staxrip updated*

As promised in this thread on encoding 720p movies using XViD (which was limited in terms of bitrate and resolution), here is my HowTo for making your xbox true-hd capable. In short, the trick is to use the DiVX codec and take advantage of its unique ability to limit the maximum-bitrate and not just set the average bitrate (as XViD is limited to).

This method allows you to encode XBOX-Compatible HD-Movies (from Blu-Ray, HD TS or H264 Rips) at very high bitrates without the need to downsize the source-movie. You can [b]watch full 1280x720 resolution movies on your xbox without visual frame dropping or stuttering! By having the opportunity to use high-bitrates (as opposed to the 4.500 kbit limit with XViD) we can finally reach the quality of h.264 encodings![/b]

Let's start:

  1. Grab the newest DiVX Codec from here (http://www.divx.com/en/downloads). The free version of the codec should be fine for our needs.


  2. Decide what tool to use to rip or transcode the movie. You can use Staxrip, AutoGK, VirtualDub, or any other frontend that supports DiVX codec.
    I suggest heavily you try out Staxrip, which comes with all needed extra software.
    Download the latest Beta-Version here https://sourceforge.net/projects/staxmedia/ (Updated Version!).

    I have prepared an XBOX-HD Template for Staxrip, which you can import in your installation.
    Download XBOX-HD Template
    It comes preconfigured to encode with DiVX and output the Video, Audio (and Subtitles) muxed into a MKV container.
    To import do this: Run staxrip, go to menu "Tools" -> Directories -> Templates. Paste my template in the folder that will open and restart staxrip.


  3. Prepare your source (Blu-Ray Disc, h.264-Rip, etc..) and make the necessary preparations (cropping, colorcorrection, audio-setup, etc)
    I will not get into details how to rip or convert a movie. There are enough
    guides on the net about this. Those tutorials for staxrip should get you started though:
    H.264 Encoding using StaxRip
    StaxRip XviD Install Guide

    UPDATE: CHECK OUT MY SCREENCAST ON HOW TO USE STAXRIP!

    Quote:Make sure that in staxrip when you click on Options on the right side of the applications window that you have "Use VirtualDub instead of VirtualDubMod" enabled. Otherwise i have had problems with wrong colorspace in the resulting video.

    Screenshot:

    Image
    _________

  4. Now for the fun part (Making sure the bitrate is kept withing the processing limits of our XBOX). Some background info first:
    Quote:You might have asked yourself why its possible with DiVX to encode 720p movies in full resolution that play smoothly on the XBOX. The reason is, that with DiVX encoder you can set a global Bitrate-Maximum. That means that the encoded movie will never surpass the defined bitrate over any 1 second period. Now, the XBOX can surprisingly handle quite high bitrates even in HD-Resolution movies. But as soon as the encoded movie goes higher than the supportable bitrate playback will stutter and you wont have much joy watching that flick on your box.
    The issue with XViD encoded hd-movies are exactly those uncontrollable bitrate spikes: Although you can define the so called "constant bitrate", this means in fact nothing more than that XViD-encoder will try to keep that bitrate as an average. But, it will not honor this as a maximum bitrate.
    As a result, even though the constant bitrate may be 5.000 kbit, your movie will hit bitrate spikes of 18.000 kbit or more quite frequently. As a result, encoding a high quality 720p movie with XVID that plays without serious stuttering is not possible.
    For Details on this issue, read my post here.

    Ok, so where to set the maximum bitrate in the DiVX configuration?
    Well, the first method is choosing one of the "Certification Profiles" like the "720hd" or "1080hd" profile in the DiVX configuration window. Those profiles have already a max. bitrate preconfigured. In the case of 720hd its set at arround 9.700 kbit.
    Now, if your movie is 1280x544 or lower res. you might as well just choose that "720hd" profile and start your encoding.
    But if its resolution is 1280x688 or 1280x720 you will have to set a lower max. bitrate manually. Plus, even for 1280x544 movies you might better be off
    by also manually defining a bitrate limit, as you can actually go higher than the default of the "720hd profile".
    Setting the max. bitrate manually can be done by opening up the "Advanced Settings". On the top you will find a line that says "manual cli".
    The magical max. bitrate is defined by the parameter prefixed with "-vbv".

    Screenshot:

    Image

    Quote: If you use the free version (Community Codec) you cannot edit the "Manual CLI". In that case you have to download my "Saved settings" and import them first in your registry (read below).
    So what do those values mean?
    E.g."-vbv 9708400,6291456,6291456" (which is the default value of the 720hd profile) means that the max. bitrate ever reached over any 1-sec. period is 9.708400 Mbit. The second and third value dont have to concern us now. Its only important to note that their value is mathematically depended of the first value.
    Ok, so when your movie is e.g. 1280x720 then you take the vbv values in the column labeled "CLI SWITCH" from my bitrate-table below and replace the one in the advanced settings.Dont replace the whole line! Just the part with "-vbv number,number,number"!
    Then press "Apply" and your good to go. Also make sure that the profile you set under "Certification Profile" on the main DivX configuration windows corresponds with the Profile in my bitrate-table!


    To make things easier for you and for those who have the free version of DiVX, you can add my presets to DiVX encoder by importing the following registry file (Version -v4-) here (just double click the *.reg file).
    After that, you can find all the settings of my bitrate-table under "Saved Settings" in the DiVX advanced configuration tab (see screenshot above).

    Bitrate Table:

    UPDATED Version v3!

    After a lot of testing, i have prepared the following bitrate matrix, which shows you the bitrate settings of the divx encoder relevant for the resolution of the movie. The reason for the different max. bitrates is, that the bitrate limit of the xbox is not static but (mainly) dependend of the resolution of the movie.
    Keep in mind, that those are my save settings. Which means that they have been choosen as so, that even the most complex scenes will play smoothly on the box (no VISIBLE frame dropping). Typical movies scenes that will make the bitrate spike are fast action in general, lot of panning, particles (snow, rain, fire, etc...).
    Even though you might have success encoding a movie with higher settings, by doing so you're taking the risk that your saturday movie night might be ruined as soon as the flic reaches its grand finale and the xbox cant cope with those high bitrates leading to stuttering.
    Keep in mind, that those values are based on the assumption that you have a Dolby/DTS decoder attached to your xbox. If not, you might have to reencode your 5.1 audio to a stereo ac3/mp3 track or lower the values in my table. Audio decoding takes cpu power, too!

    Image

    For copy & paste:

    Code:
    Pixel Width    Pixel Heigth    ~ Max. Bitrate    DiVX Profile    CLI SWITCH
    1280    <= 720    6.000 kbit    720HD    -vbv 5978400,3866624,3866624
    1280    <= 688    6.400 kbit    720HD    -vbv 6366400,4112384,4112384
    1280    <=544    11.700 kbit    1080HD    -vbv 11661200,7553024,7553024
    960    <=544    15.500 kbit    1080HD    -vbv 15548400,10076160,10076160


  5. What else is there to take care of?

    - Rate Controll Setting:
    Go 1-pass as long as you dont care about the filesize. Dont choose target bitrate, but instead a target quality with a quantizer of 1.8 to 2.4 (e.g. 2). Setting a target quantizer is the preferred setting quality wise.

    - Encoding Performance
    I suggest you choose "Better quality"

    - Bidirectional Encoding
    Choose "Adaptive Single Consecutives"

    - Quantization:
    It seems as if h.263 quantization is more strict in regards of keeping the max. bitrate.so choose that instead of mpeg-2!

    See this screenshots for additional settings i suggest:

    Image
    Image



That should be all to get you started encoding your first XBOX-compliant HD-Movie.
Any comments, suggestions or corrections are welcome. Have fun with your HD-Ready XBOX !

MEDIAINFO OF ENCODED MOVIE (NOTICE THE AVERAGE BITRATE)

Image

DISCLAIMER:
Cause of probable high cpu usage,you might want to verify your fan-speed settings in XBMC (put it on auto-temperature).
#2
TOP WORK FELLA!!

Much appreciated!
#3
Hmmm how much of the DivX package do you install? I just installed the codec and the convertor.... I cant find anything that looks like the Pro settings Huh

Also cant seem to find CTonguerogram Files/StaxRip/Settings/Templates after StaxRip is installed - its justa folder with the app in along with a readme and an uninstall app.....
#4
Geeba Wrote:Hmmm how much of the DivX package do you install? I just installed the codec and the convertor.... I cant find anything that looks like the Pro settings Huh

Also cant seem to find CTonguerogram Files/StaxRip/Settings/Templates after StaxRip is installed - its justa folder with the app in along with a readme and an uninstall app.....

Mhh, it seems as the page i was referring to is outdated. To import the template into staxrip do this:
Run staxrip, go to menu "Tools" -> Directories -> Templates. The right folder will open up, then just paste my template in there and reopen staxrip.
I'll fix that in my tut.

As to your first question: its enough to just install the DiVX codec.
All the divx settings are made from within staxrip! Look for a line that says "Codec configuration" after opening my template via menu "File" -> "Template Projects".
#5
Any other tool that can do this besides Staxrip? The site is down and none of the tool updates seem to work for me Sad

MeGUI and AutoGK don't seem to be able to encode Divx. I tried the Divx converter free trial that comes with the codec, but that creates a .divx file (whatever that is), and seems to change the audio from 5.1 ac3 to stereo, even though it should just copy it over Sad

I wouldn't mind using Staxrip if it actually worked.
#6
Oldie Wrote:Any other tool that can do this besides Staxrip? The site is down and none of the tool updates seem to work for me Sad
Here is another download link:
http://www.digital-digest.com/software/d...id=0&did=1
Oldie Wrote:MeGUI and AutoGK don't seem to be able to encode Divx. I tried the Divx converter free trial that comes with the codec, but that creates a .divx file (whatever that is), and seems to change the audio from 5.1 ac3 to stereo, even though it should just copy it over Sad

AutoGK should support DiVX, at least thats what they say on their site.
Definitly DONT use the DiVX converter! Use Staxrip instead, it works!

Check out my video how i do it: http://www.screencast-o-matic.com/watch/cQ1UomfiE and read the tutorials i linked to.
#7
I can download the exe and install it, none of the rest of the app plugins can't be downloaded though. I've been trying to download them and install them manually, but just can't seem to get them all there. Someone could probably post an upload with them all included until the author gets his site back.

AutoGK does indeed support DivX, but it won't read .mkv's
#8
Just for completeness, any chance of a basic DVD (480p/576p) profile? Would be nice to use the same process & format for all media encoding for the old xbox. I assume this would still produce a nice picture.
#9
Oldie Wrote:I can download the exe and install it, none of the rest of the app plugins can't be downloaded though. I've been trying to download them and install them manually, but just can't seem to get them all there. Someone could probably post an upload with them all included until the author gets his site back.

Yeah, oldie, i get u know. The site has probably some temporarly DNS problem. Expect it to be up again within a day.

In the meantime download the required staxrip-tools for h.264-mkv to divx-mkv conversion here.

1. Unpack and install avisynth and mkvtools in the file named "1.Unpack-And-Install.rar"
2. Extract the two .dll files from "3.Extract-to-Avisynth-Plugin-Directory.rar" and put into the installation directory of avisynth in the plugin subdirectory
3. Extract the file "2.Extract-to-Staxrip-Applications-Directory.rar" and put all the directories in the staxrip application directory. You can find it in staxrip via menu "Tools" -> Directories -> Applications

Hope that helps you!
#10
That did the trick, thanks for the help Smile
#11
Oldie Wrote:I tried the Divx converter free trial that comes with the codec, but that creates a .divx file (whatever that is)

A .divx file is...well, a .divx file! Xbox plays 'em fine.
#12
Great guide..very easy to follow.

I downloaded you settings and installed them via your link (didn't want to input them wrong). But I am still getting the same results with my test clip I linked to in the sister thread to this thread. I will also link it below as well. I followed your settings guide to the letter (double checking it at that) and as you can see by the screenshot below from the Xbox I had already dropped 166 frames within a minute and half. (note: Yes the video looks like that on the blu ray too. I guess that is why it is so rough on the decoder)

Image

The final count was 216 dropped frames with DVDplayer and 601 with Mplayer.
The following testbeds were utilized with the little change in results:

2-Xbox 1.4's,2-Xbox 1.6's,1-Xbox 1.1 all with the Babylon final installed
File was tested both from a local 100mb network and then FTP to Xbox's hard drive to test from there.

The only change I found was a decrease of approx. 40 frame drops (in DVDplayer) from the local Xbox hard drive test to the network storage test.

Now mind you, maybe I just happen to find a 1920 X 1080/1280 X 720 16/9 1:78 video that has to be downsized to 960 X 540 (which by the way does encoded rather nice at the higher bitrates you provided!) but that leads to the point I made in the other thread that allot more testing needs to be done to zero in on that sweet spot in your settings. I for one am encoding 2 other different 16/9 1:78 videos to see how they pan out and will post my findings to help in this endeavor. I would love to see this work so that I would not have to encode a video twice (one at 1280 X 720 and one at 960 X 540) just to be sure I had a copy that won't drop frames.

I have linked the test clip below so you and anyone else can test it to see if your results compare or differ from mine.

Great stuff keep it up!

Test Clip

http://www.megaupload.com/?d=QS8PXWGF
#13
I have updated the bitrate matrix, because i found out that with 1280x720 there were still some scenes with dropped frames (though not visible).
I have also uploaded the complete staxrip package, while the authors site is down!
#14
PrimusZa1 Wrote:Great guide..very easy to follow.

I downloaded you settings and installed them via your link (didn't want to input them wrong). But I am still getting the same results with my test clip I linked to in the sister thread to this thread. I will also link it below as well. I followed your settings guide to the letter (double checking it at that) and as you can see by the screenshot below from the Xbox I had already dropped 166 frames within a minute and half. (note: Yes the video looks like that on the blu ray too. I guess that is why it is so rough on the decoder)

Hey, thanks for trying out my settings.
While looking at your picture, it shows a bitrate of 9.82 mbit which is way higher than the max.bitrate i suggested for 1280x720 (7400 kbit originally / now 6300 kbit).
Are you sure, that you set it all right when encoding?
Could you please try it out with the new version of the bitrate-matrix? (Redownload the .reg file) Also, try to use the "h.263" quantization (under DiVX configuration -> Video) and not the "mpeg-2". I think the later does not strictly honor the bitrate maximum.

You are right, there has to be some more testing to find the optimal max. bitrate. The problem is, that we have to try out each resolution seperatly as the relation between resolution and max. supported bitrate seems not to be linear but logarithmic (so we can not easily calculate the max. bitrate for resolution X if we already know the max. bitrate for resolution Y). I have just updated my bitrate values for 1280x720 and 1280x688 though. And i think they are fine now (i would like test them with your sample clip though).
This clip you linked to, is that the original source or already the divx encoded clip?

Are you sure that you have your audio decoded by an external decoder and not the xbox when having those frame-drops?

Downsizing 1280x720 to 960x544 is always an option. I think when taking into account the much higher possible bitrates and the good job the xbox does when upscaling its recomended at least for complex movies (action, etc...). And even when downsizing i think DiVX is superior to XViD because you cannot reach the same high bitrates with the later.

Thanks for your feedback!
#15
funkytown Wrote:Hey, thanks for trying out my settings. You are right, there has to be some more testing to find the optimal max. bitrate. The problem is, that we have to try out each resolution seperatly as the relation between resolution and max. supported bitrate seems not to be linear but logarithmic (so we can not easily calculate the max. bitrate for resolution X if we already know the max. bitrate for resolution Y). I have just updated my bitrate values for 1280x720 and 1280x688 though. And i think they are fine now (i would like test them with your sample clip though).
This clip you linked to, is that the original source or already the divx encoded clip?

Are you sure that you have your audio decoded by an external decoder and not the xbox when having those frame-drops?

Downsizing 1280x720 to 960x544 is always an option. I think when taking into account the much higher possible bitrates and the good job the xbox does when upscaling its recomended at least for complex movies (action, etc...). And even when downsizing i think DiVX is superior to XViD because you cannot reach the same high bitrates with the later.

Thanks for your feedback!

The test clip is a direct clip (non renecoded) from the source H264 MKV with 5.1 so it makes a good test subject so far. I also pass thru to an external audio decoder for the audio. I did a complete encode of the Full movie downsizing it to 960 X 544 using your 960 cli and so far it looks great compared to the Xvid copy I just did before you posted about the Xvid problems with CBR. I will be doing a complete play thru to see if I drop frames though I think from what I saw it should be ok. (max cpu with test clip was 97%) I will do a run through with your 1280 CLI and let you know how it goes on the other 1280 16/9 videos I have. Hopefully we are getting close to the "sweet spot" Keep up the great work!
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 7

Logout Mark Read Team Forum Stats Members Help
Working Solution: 720p/HD movies on your XBOX (using DiVX)3