• 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 25
[XBOX] HOW-TO encode videos in H.264 to be able to achieve playback on the Xbox
dbldown768 Wrote:This is the first time using your tutorial and I am really bad with all this DAR and aspect ratios for movies. When I encode a dvd I am always busting out a calculator trying to make sure the file stays in the correct aspect ratio. For example, it says on the wiki that if your film has horizontal bars to choose a width of 704 instead of 720. So I choose this value. However, the suggested size of the film then is 704 x 288 for a 2.35 DVD NTSC movie. This is a ratio of 2.44, which is not 2.35. What I normally do is change the size to something like 704 x 304, but I don't know if this is correct? In addition, when I was configuring the bit rates for the encoder, I was not sure what values I was supposed to set it from the chart. Since I went with the 704 x 288 resolution, it looks like I was supposed to set the bit rate to 1816, however, the suggested bit rate is 1362 - but that is for a 704 x 384 size movie?

As you can tell, i am rather confused. I saw one post that said it doesnt matter what you set the size of the video because the DAR will correct this...

1. Step #8 of the Wiki is wrong. My mistake... I just fixed it. All films have horizontal bars... what I meant to write is if your film has vertical bars then you will need to crop them and go down to the next Mod16 value of 704 (or 688 if the crop is more than 16 pixels wide).

2. Just to make myself clear... 1816 is the highest possible bitrate for a resolution of 704x288. 1362 is the highest possible bitrate for a resolution of 704x384. So 1362 is not the "suggested" bitrate for a resolution of 704x288, but it is an acceptable one. You are reading the chart wrong. I agree with Jhcheslik on this one... 1500 is a good number to go with... But you can make up whatever number you want as long as it doesn't go over what the chart tells you.

3. I'm not expert on DAR, but I believe that Jhcheslik's advice on DAR is correct. However, I would like to add that MeGUI should handle DAR correctly most of the time and you should only have to set it manually on few occasions.
Reply
dbldown768 Wrote:In the past, I have used meGUI for encoding dvd films. During that time, I did encode multiple films without any problems, however, I did run into a couple of films where the audio would just never in sync with the video. I found that these videos had contained bad/"dummy" chains (if this is the correct term) that are put in the film on purpose to cause a problem. Since then, I began using FairuseWizard to encode my dvds into an XviD format. I found that it encoding the film at a quick rate with a decent picture quality. These files would contain AC3 audio and could be played by both my old xbox and the newer 360. In addition, any of the films that gave me grief with audio before were corrected after using this application. One other plus was the ability to add forced subtitles to the video. I am not sure if this available when encoding to H.264?

What brings me back to this thread is that I want to begin using blu ray discs as a source. I am also very close to getting parts for a xbmc linux pc to replace my old xbox. Because of this, I know the .mkv format is important to HD encoding. I know this "how-to" only is written for the xbox, but I wanted to try this method to learn a similar process to gain more of an understanding.

Out of the hundreds of films I have ripped, I have run into a couple of these films also. They are very rare. Your best bet when you come across one of these is to use an alternative program such as Handbrake or something similar. XviD is inferior -- drop it! And if you need to rip subtitles there are programs out there that do this for you. Google it.

.MKV is a more versatile container, but less supported. If you are wanting to play your videos through X360 or PS3, then I wouldn't suggest it. But if you are going to go ahead with the Linux build, then you basically can use any settings/bitrates/resolutions/containers/codecs. I usually don't do this (to avoid confusion), but here is my custom profile for non-Xbox users.

PC/Mac ONLY! HD Source Profile:
program --pass 2 --bitrate 1500 --stats ".stats" --level 4.2 --ref 16 --mixed-refs --no-fast-pskip --bframes 16 --b-pyramid --weightb --direct auto --deblock -1:-1 --subme 7 --trellis 2 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --ratetol 4.0 --me umh --threads auto --thread-input --progress --no-dct-decimate --no-psnr --no-ssim --output "output" "input"

PC/Mac ONLY! SD Source Profile:
program --pass 2 --bitrate 1500 --stats ".stats" --level 4.2 --ref 16 --mixed-refs --no-fast-pskip --bframes 16 --b-pyramid --weightb --direct auto --subme 7 --trellis 2 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --ratetol 4.0 --me umh --threads auto --thread-input --progress --no-dct-decimate --no-psnr --no-ssim --output "output" "input"

It's basically all the settings maxed out, and it shouldn't take too much longer to encode than my Xbox profile. The only difference between the two is the SD Source Profile uses 0,0 Deblocking and the HD Source Profile uses -1,-1 Deblocking. Change the bitrates to whatever you want, but I find 1500 to look really good.
Reply
Quote: I have never really experienced any bad/"dummy" video. What kind of ripping solution did you use?
anydvd with dvd shrink... have you tried encoding blu-ray disc yet?
Reply
For those that have been asking for Handbrake equivalence of JPSiemer's great work, here's my very rough version. Worked well so far, but of course will evolve over time.

Handbrake Settings

Just put that file in /Users/"Username"/Library/Application Support/Handbrake/ and start up Handbrake, should have the settings as a preset under "xbox-h264-new"

Enjoy. And of course, no guarantees, if it makes smoke come out of your xbox... then oops, my bad.

If I have helped you in any way, please forgive me, it was entirely accidental.
Reply
^ ^ ^ ^ ^
I have handbrake 0.9.3 the newest build, when I try to use the above Handbrake settings. Handbrake crashes while starting up.:confused2:
Reply
i know this is specifically for xbox, but can someone recommend a good bitrate for hd source to run on xbmc linux in hd?
Reply
FOR LINUX/WINDOW (NOT XBOX)

I would usually go for 2500 to 3000 bitrate, but really, its up to your eyes.

You can do some testing, like take a 10 minutes clip of your favorite part of any movie and encode them at bitrate of 1500, 2000, 2500, etc. and see if which one you like the best.

Have fun.

(Hard drive space is also to consider, especially for me, so that's why I don't go for insane bitrate of 8000 or whatever. Almost impossible for me to tell the difference between 8000 and 4000.)
Reply
Well since i am a bit rookie at blu ray this is what i have done so far. I took the main film in .mkv and audio in .ac3 using eac3to. I then loaded the .mkv file in meGUI to create an AVS script for cropping and setting the resolution. After that I am now trying to encode the video with an x264 profile with a bitrate of 10,000 - yeah way high it sounds like compared to what your a saying. I was trying to look online at what other used for bitrates. That process is taking like all day to complete on my Q9450 2.66 quad core pc. I them plan on muxing the mp4 video with the ac3 audio. I hope I am doing all this correctly.

I had a few questions though. You said to take a 10 min clip and try it out, how to i do that? I couldnt find anything to split this .mkv file up into clips to test it out? Also, to you have a profile or some settings you would wish to share on your encoding - linux of couse and probably not on topic.
Reply
Okay, I've read through the wiki guide in the online manual, and I have a couple questions...

1) I always rip my DVD's in ISO format. Do I need to re-rip to VOBs?
2) What's so great about the mkv container? Isn't it really the codec settings here that matter? Can't I use the .avi container if I like? I know the mkv container has more options available but since this HOW-TO is very specifically oriented toward making quality videos for use in XBMC *on* Xbox, what does it matter what the container is?
3) Has the OP/author (or anyone else) ever tried SUPER to achieve these same results?

Thanks!
Reply
dbldown768 Wrote:I had a few questions though. You said to take a 10 min clip and try it out, how to i do that? I couldnt find anything to split this .mkv file up into clips to test it out? Also, to you have a profile or some settings you would wish to share on your encoding - linux of couse and probably not on topic.

Yeah, you are doing it all correctly. Excellent.

To split the .mkv into 10 minutes segment, you can just use the mkvtoolnix, then open the MKVmerge, load the .mkv file you have, then go to Global tab, you'll see the splitting part, click on the timecode and put in 00:10:00 for 10 minutes or whatever you desire.

Put in the correct output folder, and click Start Muxing!! Make sure you abort once it does the splitting.

For profile. I use what MeGUI came with, when you update it. OR you could use the one JPSiemer used.

sion28 Wrote:Okay, I've read through the wiki guide in the online manual, and I have a couple questions...

1) I always rip my DVD's in ISO format. Do I need to re-rip to VOBs?
2) What's so great about the mkv container? Isn't it really the codec settings here that matter? Can't I use the .avi container if I like? I know the mkv container has more options available but since this HOW-TO is very specifically oriented toward making quality videos for use in XBMC *on* Xbox, what does it matter what the container is?
3) Has the OP/author (or anyone else) ever tried SUPER to achieve these same results?

Thanks!

1) Yeah. AFAIK. You can use DAEMON Tools Lite, mount the .iso, and re-rips the VOBs.
2) MKV. It can accept TONS format, .avi, .mp4, and more. You name it. It's very flexible, it can have multiple audio stream, multiple subtitle stream, etc. We use .mkv because it work best with x264 codec, especially when its in .mp4. I don't see any reason why you shouldn't go for .avi. I will do some research tho.
3) I haven't. Wouldn't care. It doesn't give that kind of flexible like I want like it would in MeGUI.
Reply
I couldn't figure out how to get the command line to match what's in the wiki guide. So I downloaded the presets .ZIP file posted by the OP. Problem is, even THAT doesn't match EXACTLY what's listed in the wiki guide.

When I load the "Xbox HIRES" preset, here's the command line options I get:
Quote:program --pass 2 --bitrate 1250 --stats ".stats" --keyint 240 --min-keyint 24 --ref 8 --mixed-refs --no-fast-pskip --bframes 6 --b-adapt 2 --b-pyramid --weightb --no-cabac --subme 7 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --vbv-maxrate 1500 --ratetol 4.0 --qcomp 0.5 --me umh --merange 32 --threads auto --thread-input --aud --progress --no-psnr --no-ssim --output "output" "input"

But the wiki guide shows this as the proper HIRES options:
Quote:program --pass 2 --bitrate XXXX --stats ".stats" --keyint 240 --min-keyint 24 --ref 8 --mixed-refs --no-fast-pskip --bframes 6 --b-adapt 2 --b-pyramid --weightb --no-cabac --subme 7 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --ratetol 4.0 --qcomp 0.5 --me umh --merange 32 --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

The differences are in bold. Do I need to worry about this? How do I edit the command line options? When I paste something into the "custom command line" window under the Advanced tab, it just appends it to what's already shown in the command line. I don't see how to clear the command line, and/or type in my own. Nor can I get the right combination of checkbox options and drop down menu selections to give the EXACT command line that the OP suggests in the wiki guide.

Thanks for any help...

edit: Also what does *scratchpad* mean on some of the presets?
Reply
Well, I've tried to do everything by the book, and now MeGUI is giving me an error when I click on "Autoencode" in step 16.

The error is something about input and output audio files not being the same, even though they are (I quadruple checked).

Any ideas? I closed the error window and don't have time to run through again... I'll try to post the exact error text tomorrow.
Reply
Question 
JPSiemer .....Would it be easier and less time consuming to take a scene release as such and re-convert a already converted file?(Not sure if it's possible)

Example: Max.Payne.UNRATED.2008.BRRip.DTS.x264-SDxT

SiZE..........: 2.05
ViDEO CODEC...: x264,@ L3-2pass
FRAMERATE.....: 23.97 fps
BiTRATE.......: 1298 Kbps
RESOLUTiON....: 720x304
SUBTITLES.....: ass.Greek /By Doden-English[br]i
AUDiO.........: English DTS 5.1 1.5 mbit
SOURCE........: Max.Payne.UNRATED.2008.BLuray
Reply
Rookie Wrote:JPSiemer .....Would it be easier and less time consuming to take a scene release as such and re-convert a already converted file?(Not sure if it's possible)

Example: Max.Payne.UNRATED.2008.BRRip.DTS.x264-SDxT

SiZE..........: 2.05
ViDEO CODEC...: x264,@ L3-2pass
FRAMERATE.....: 23.97 fps
BiTRATE.......: 1298 Kbps
RESOLUTiON....: 720x304
SUBTITLES.....: ass.Greek /By Doden-English[br]i
AUDiO.........: English DTS 5.1 1.5 mbit
SOURCE........: Max.Payne.UNRATED.2008.BLuray

I think JPSiemer ponits to these in his very first post Huh
Reply
Geeba Wrote:I think JPSiemer ponits to these in his very first post Huh

No he is just saying the better the source the better the picture.Nothing to do with a file already converted.
Reply
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 25

Logout Mark Read Team Forum Stats Members Help
[XBOX] HOW-TO encode videos in H.264 to be able to achieve playback on the Xbox10