[XBOX] HOW-TO encode videos in H.264 to be able to achieve playback on the Xbox

  Thread Rating:
  • 10 Votes - 4.6 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
sion28 Offline
Senior Member
Posts: 245
Joined: Jul 2008
Reputation: 0
Location: Northern California, USA
Post: #341
Question on encoding non-dvd video files (e.g. re-encoding 720p x264 mkv files)... how do I do audio pass-through in this case? By loading the video file directly in AVSynth (we don't use D2V creator in this case right?) there's no demuxing of the audio done... if I just select the video file as the audio source, then it will get re-encoded using whatever audio codec profile I choose. What if I don't want it re-encoded? I have a few mkv files with DTS audio, and I'd like to retain that original soundtrack.

Any ideas?

Thanks...
find quote
Jhcheslik Offline
Member
Posts: 63
Joined: Sep 2008
Reputation: 0
Location: Near a lake in US
Post: #342
I use MKVextract GUI.

But I didn't know that XBMC can play DTS...

P.S. My promised MeGUI guide isn't reasonable anymore because I discovered (as mentioned by JPS) RipBOT264 and found that it's very noob friendly. (Although I'll still try and finish it.) I will try and post some pictures on how to use RipBOT264 to create a playable h.264 video on XBMC for Xbox.
(This post was last modified: 2009-04-11 22:55 by Jhcheslik.)
find quote
Jhcheslik Offline
Member
Posts: 63
Joined: Sep 2008
Reputation: 0
Location: Near a lake in US
Post: #343
Okay, as mentioned by JPSiemer, RipBot264 is way much easier.

I did a test on two HD trailers downloaded from gametrailer.com

First one :
    Diablo 3 (Debut Teaser)
    Original size : 48.3 mb with about 3072 bitrate (not including audio's bitrate)
    Final size : 17.4 mb with about 1024 bitrate (not including audio's bitrate)
    Original resolution : 1280 x 720
    Final resolution : 704 x 396
    Video Length : 02m:12s
    Encoding Time : 05m:20s

Second one :
    StarCraft 2 (Cinematic Trailer )
    Original size : 105.7 mb with about 3072 bitrate (not including audio's bitrate)
    Final size : 35.7 mb with about 1024 bitrate (not including audio's bitrate)
    Original resolution : 1280 x 546
    Final resolution : 800 x 340
    Video Length : 04m:28s
    Encoding Time : 11m:33s

Important :
Encoding Time various depending on your OS and CPU speed!!
I am using WinXP 32 bit, 2.25 Ghz Intel Dual Core.
I'm sure the encoding will reach to real-time only if I have a Quad Core CPU.

I didn't experience any dropped frame while playing with MPlayer.
It was different case while playing with DVDPlayer though. In Diablo 3 test video, I experienced about 10 to 12 dropped frame.
Didn't bother testing it with StarCraft 2. It played flawless in MPlayer.
find quote
Jhcheslik Offline
Member
Posts: 63
Joined: Sep 2008
Reputation: 0
Location: Near a lake in US
Post: #344
Go to this website, http://forum.doom9.org/showthread.php?t=127611, and download the latest version.

Once unzipped, edit the RipBot264.ini, and replace the whole thing with this :
Code:
[settings]
// TEMP=uses System temp ; AUTO = selects the biggest partition ; C , D ... uses specific partition
StoreTempFilesin=AUTO
KeepJobsQueue=1
---------------------
DefaultProfile=XBOX HQ
DefaultEncodingMode=2-Pass
DefaultModeValue=1024
---------------------
//Directory must exists!!! D:\movies\ is correct but D:\movies is incorrect!
DefaultOutputPath=C:\temp\
---------------------
// allowed values are mp4, mkv or bluray
DefaultContainer=mkv
---------------------
// in GiB (1GiB=1024 MiB) , 0 = no splitting
SplitM2TS=0
---------------------
FastFirstPassin2passMode=1
---------------------
//AnyDVD DVD/HD-DVD/Blu-Ray decryptor will be automatically activated with RipBot264
ExecuteAnyDVD=0
---------------------
x264LowPriority=1
---------------------
//RipBot264 will check if AviSynth, FFDshow and Haali Media Spliter are installed
CheckRequiredSoftware=1
---------------------
// it will use 64bit version of x264 on 64bit Windows. Up to 10% faster encoding speed.
Usex264x64=1

Then go in Profiles folder and create new .txt, naming it 'XBOX HQ.txt'. Paste this code in the .txt :
Code:
--level 2.0 --no-cabac --filter 0,0 --ref 8 --mixed-refs --bframes 6 --b-adapt 2 --weightb --b-pyramid --direct auto --subme 7 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --threads auto --thread-input --progress --no-psnr --no-ssim

Once those two files are modified and added... Run the program!

You'll probably come up with this...

[INDENT][Image: screenshot1.jpg][/INDENT]

In my case, I didn't have the latest FFDshow, whoops. So I went and got the 'SVN builds by xxl' and installed it.

If everything went good, it'll look like this... so, go on and click the blue word, 'Add' at bottom...

[INDENT][Image: screenshot2.jpg][/INDENT]

And choose your video source, once loaded, you can pick any kind of audio format you want. If the original audio is in AC3 you can tell it to not re-encode it. Since the original audio of mine is in .wma, I'll have to convert it to 2 channel AAC or OOG, I choose OGG as in picture...

[INDENT][Image: screenshot6.jpg][/INDENT]

Now, to resize the video, click on the Properties right next to the bitrate number and click on Size drop down list.

I change it to 704 x 396 because I knew if I went with 720 x 405 I will have some dropped frames, so...

You want it to be under 280000 pixels at least. I can't really prove this yet. I will need to do more testing... but my 704 x 396 = 278784 for Diablo 3 proved that it is indeed fine. At least for now...

[INDENT][Image: screenshot9.jpg][/INDENT]

You can change any another setting by clicking on Right Arrow, I'm sure you guys can figure this one out.

Then once you are done adjusting the setting, click Ok, change the output somewhere else if you want... and then click Done...

[INDENT][Image: screenshot7.jpg][/INDENT]

And click Start!!! Once it is finished, you probably want to remove the job from the list, because I forgot to do that and they did another encode of the same video when I added several new jobs!! Oops.

Enjoy, and please post if you guys find something interesting!!

Edit : If you guys want to encode a DVD, just load the one piece .VOB that was ripped by DVD Decrypter or whatever. (I don't know if multiple pieces of VOBs work.... you guys try it.) BE PATIENCE, THE INDEXING WILL TAKE LONG TIME.
(This post was last modified: 2009-04-12 00:22 by Jhcheslik.)
find quote
sion28 Offline
Senior Member
Posts: 245
Joined: Jul 2008
Reputation: 0
Location: Northern California, USA
Post: #345
Jhcheslik Wrote:I use MKVextract GUI.

But I didn't know that XBMC can play DTS...

P.S. My promised MeGUI guide isn't reasonable anymore because I discovered (as mentioned by JPS) RipBOT264 and found that it's very noob friendly. (Although I'll still try and finish it.) I will try and post some pictures on how to use RipBOT264 to create a playable h.264 video on XBMC for Xbox.

The xbox/xbmc will pass-through DTS just as it does with AC3...
find quote
Jhcheslik Offline
Member
Posts: 63
Joined: Sep 2008
Reputation: 0
Location: Near a lake in US
Post: #346
I thought it was AC3 only.

I would rather to keep them in AC3 at 448 bitrate to keep video size down though.

So, like I say, you could use RipBot264 or MKVExtractGUI to extract those audio.
find quote
sion28 Offline
Senior Member
Posts: 245
Joined: Jul 2008
Reputation: 0
Location: Northern California, USA
Post: #347
I'll have to try MKVExtract then... RipBot doesn't do XviD that I could tell...

And yes, it does pass through on DTS... I've verified it.
find quote
Jhcheslik Offline
Member
Posts: 63
Joined: Sep 2008
Reputation: 0
Location: Near a lake in US
Post: #348
Oh.

XviD, lol. 720p, 24 frames... I understand...

Darn it. Another loss for h264 community!!! Sad

I just don't like big file size.

Although, you are using MeGUI? For XviD encoding? I THINK there is some way to extract audio. I'll have to poke around. Or are you using XVID4PSP?
find quote
sion28 Offline
Senior Member
Posts: 245
Joined: Jul 2008
Reputation: 0
Location: Northern California, USA
Post: #349
Nope, I use MeGUI (or prefer to anyway) that's why I posted here in this thread, even though I'm using the XviD codec. I'm not crazy about XviD4PSP... not yet anyway. I did a test encode of a x264 mkv clip from BOLT, and it had a couple anomalies in the video. Still testing though. I got a response to this question on doom9, and the guy said there are tools built in to MeGUI to do the audio extraction... in the tools menu. Don't remember the name of the tool, and now I can't get in to doom9.
find quote
Jhcheslik Offline
Member
Posts: 63
Joined: Sep 2008
Reputation: 0
Location: Near a lake in US
Post: #350
I just love MeGUI... who doesn't?? Smile (It's still my preferred choice no matter what...)

That's funny.

I have BOLT as well, and in dark scene or somewhat like that there would be a lot of anomalies in it, what I realized was that the TV's brightness was too high. So I turned it down and tweaked it until the picture looked VERY crispy and better!

It helps!

Take a look at two encoded video I made up above and tell me how it look on your TV. Cuz for me, it look just fine!

Edit : Hey, try the HD Streams Extractor... I'm at my girlfriend's house, using her laptop... cannot test.
(This post was last modified: 2009-04-12 06:04 by Jhcheslik.)
find quote
Post Reply