Kodi Community Forum

Full Version: [XBOX] HOW-TO encode videos in H.264 to be able to achieve playback on the Xbox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
JPSiemer Wrote:For XviD, I used Jarod71's settings.
What are those? Are they posted somewhere?
sion28 Wrote:What are those? Are they posted somewhere?

Well, I sort of already posted this when I linked to the 720P discussion thread. It's not exactly entirely his settings but he did make some contributions.

Again, its at: http://forum.xbmc.org/showthread.php?tid=46732

Let's keep that thread to 720P XviD and this thread to 480P H.264. No point in confusing the newbs.
Thanks.
JPSiemer Wrote:Well, I sort of already posted this when I linked to the 720P discussion thread. It's not exactly entirely his settings but he did make some contributions.

Again, its at: http://forum.xbmc.org/showthread.php?tid=46732

Let's keep that thread to 720P XviD and this thread to 480P H.264. No point in confusing the newbs.

Yes, that's a good idea. I have been guilty of mixing posts on both threads as well.

So then, as I mentioned earlier on this thread, MeGUI never worked for me. VideoFab is easy to use for someone like me. Here are my approximate settings : For a 2 hour movie, bitrate of 2000 yields a file of size 2GB, with 192 kbps for MP3 with 720 x 480 resolution.

VideoFab does not do AC3. It does AAC which my Xbox will not play (why?). Anyways, I looked at the thread on XBMC which suggests not to go over 832 on the width of the resolution. Needless to say if my resolution is larger, I have to drop my bitrate. I have found my settings for resolution and bitrate work best with VideoFab.

I have tried MeGUI and have simply given up. It either stutters, or I get no sound or I get awful picture or it takes gazillion hours!!! Video fab never gets more than 4 hours total on a Dual Core with 1GB of RAM running in Virtual PC, approximately 2 hours per each of the two passes.

Just my 2 cents. Especially if your TV is like 40 inches, maybe people wanna give VideoFab a shot - if you are tech challenged like me and cannot MeGUI to work right.
rashid420 Wrote:Yes, that's a good idea. I have been guilty of mixing posts on both threads as well.

So then, as I mentioned earlier on this thread, MeGUI never worked for me. VideoFab is easy to use for someone like me. Here are my approximate settings : For a 2 hour movie, bitrate of 2000 yields a file of size 2GB, with 192 kbps for MP3 with 720 x 480 resolution.

VideoFab does not do AC3. It does AAC which my Xbox will not play (why?). Anyways, I looked at the thread on XBMC which suggests not to go over 832 on the width of the resolution. Needless to say if my resolution is larger, I have to drop my bitrate. I have found my settings for resolution and bitrate work best with VideoFab.

I have tried MeGUI and have simply given up. It either stutters, or I get no sound or I get awful picture or it takes gazillion hours!!! Video fab never gets more than 4 hours total on a Dual Core with 1GB of RAM running in Virtual PC, approximately 2 hours per each of the two passes.

Just my 2 cents. Especially if your TV is like 40 inches, maybe people wanna give VideoFab a shot - if you are tech challenged like me and cannot MeGUI to work right.

I think you are mistaken. The Xbox has never been able to handle a 720x480 H.264 video encoded at 2000 Kbps. Open your video in MediaInfo and tell us what it says. Since your encodes only take 4 hours, I am going to assume you are encoding XviD and not H.264. If so, why not use VirtualDubMod or XviD4PSP for your XviD encodes.

Also, I've said this before... you can run into a bunch of problems if your encoding software is running on a virtual machine. The most obvious problem is that virtual machines are essentially emulators, and virtual machine software does not fully emulate every single SSE4 / SSE3 / SSE2 instruction. Also, I don't think VirtualPC emulates more than one core on a Guest OS, so you are technically cutting your encode speeds in half... If you need multi-core support use VMWare. And last, while virtual machines can be used for a wide variety of operations, gaming and video encoding are two that are just not recommended.

If you are looking for a MeGUI replacement that is user friendly, there is always RipBot264 or Handbrake. These programs have been mentioned here several times and provide great video quality. I would recommend RipBot264 as a permanent MeGUI replacement, but it doesn't do OGG or AC3 encoding yet (it does have pass-thru though, so you can keep your original AC3 tracks). And if you are a Mac user, then Handbrake is the way to go. Bottom Line: Stay away from closed-source video encoding programs that you have to pay for such as VideoFab -- they are updated less frequently and are less superior.

Also, the Xbox supports AAC natively, so I'm not sure why you would be having that problem -- make sure you are using T3CH builds. He just released a new build today. Anyways, I actually wouldn't suggest using AAC due to the higher processing power it requires. Instead, stick with AC3, OGG, or MP3 (in that order).
JPSiemer Wrote:make sure you are using T3CH builds. He just released a new build today.

I think T3CH is a she... Smile (just FYI) Laugh
sion28 Wrote:I think T3CH is a she... Smile (just FYI) Laugh

Wow, never knew that one! That's kinda cool...
BTW, I just found out over at the RipBot264 forum that OGG and AC3 are supported by the program, but are only available to you when you have selected MKV as the container. Apparently OGG isn't supported in MP4? (On a side note, I'm glad to see that MP3 is not being offered at all! -- I think people are starting to realize that OGG is better.)

So, anyways, I officially condone and promote the use of RipBot as a user-friendly MeGUI replacement. It basically has the same features, it is up-to-date, and is a lot easier for newbs!
Hey JPS,

Just curious, what is it about handbrake and SUPER that you don't like, vs. meGUI and RipBot?

I just noticed the latest version of handbrake for Ubuntu has a window for command line mencoder switches, so it seems in theory at least that you should be able to do everything with handbrake that you could do with meGUI...? I'm way less than a power user when it comes to encoding software though (e.g. what the heck's a b-frame? LOL), so just wondering what you think, since you've obviously spent a lot of time with this stuff...
sion28 Wrote:Hey JPS,

Just curious, what is it about handbrake and SUPER that you don't like, vs. meGUI and RipBot?

I just noticed the latest version of handbrake for Ubuntu has a window for command line mencoder switches, so it seems in theory at least that you should be able to do everything with handbrake that you could do with meGUI...? I'm way less than a power user when it comes to encoding software though (e.g. what the heck's a b-frame? LOL), so just wondering what you think, since you've obviously spent a lot of time with this stuff...

I like MeGUI and RipBot264 because they are supported by the Doom9 video gurus and they require you to have certain prerequisites for the programs to work (such as AviSynth). This standardizes results, whereas with other programs, it could vary do to the different ways they serve frames to the encoder.

I like Handbrake... and I recommend it for Mac and Linux users. I do not recommend it for Windows users because it isn't as frequently updated, isn't supported by Doom9, and was a little buggy last time I tried it. However, it does work, and it does it's job most of the time, so if you are comfortable using it, then by all means, use it!

I used SUPER once a long time ago, and I just remember not liking it from the get-go. But I can't base my opinion off of one use so I just downloaded it again, and all I have to say is: "Usability Nightmare!". Too many options is not always better. If you actually needed to convert to all of those formats, then yes, I would recommend SUPER, but we're encoding H264 for the XBox, so you only need one codec. Anyways, have you even looked at SUPER? -- I looked for five minutes and was unable to locate any dialog for the advanced x264 options, which leads me to believe that there isn't one... which ultimately means it is not compatible with the xBox264 profile.
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...
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.
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.
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...

Image

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...

Image

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...

Image

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...

Image

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...

Image

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.
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...
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25