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

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
--- Thread: [XBOX] HOW-TO encode videos in H.264 to be able to achieve playback on the Xbox (/showthread.php?tid=33429)

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


garbage out, dunno why - sion28 - 2009-02-26

So after a few weeks away from this thread and away from compressing my movies, I setup to compress one of my DVDs last night. Today I come home to check the results, and the .mkv video looks like total garbage. No surprise... the final file size is only about 700MB. The AC3 audio file alone was about 600MB. Needless to say the picture is unwatchable.

I've looked through the settings and I can't figure out why this happened. All of the command line switches are exactly as described for the large size / high quality method in the wiki guide.

Any ideas as to what might have caused this? I set the bitrate to 1270, and the resolution to 720x384. I've used these settings before and got great results.

Help? Ideas? Where to look?


- sion28 - 2009-02-26

Here's the contents of the command line options window from this encode...
Quote:program --pass 2 --bitrate 1270 --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"



- Jhcheslik - 2009-02-26

I have no idea why your come out with only 100 mb for video stream... Must be bad update on MeGUI?

Sometimes the x264 update turns out to be bad. That happened to me once, and everything was fine after updating to proper release of x264. Check that.


- sion28 - 2009-02-26

Thanks for the tips. How do I check if I have a bad x264 update? What do I do if I do have a bad x264 update?


- Jhcheslik - 2009-02-26

Use this version for now. Its the working one.

Just go to MeGUI direction and replace the x264.exe with the link I provided.

http://kurtnoise.free.fr/index.php?dir=MeGUI/&file=x264-1069.zip

Test, and post back if it work. (with short clip of course)


- sion28 - 2009-02-27

Will do, thanks. Won't get to this for a few days though.


- punkjumper1 - 2009-02-28

I've followed the wiki and the files play great on my xbox but the ac3 sound is only encoding to 2 channel. When played on the xbox in the audio settings it shows "ac3 mono" as the audio source. I have digital sound selected in the xbmc settings.

I'm starting with a 6 channel scene rip and following the settings from the wiki I choose "Aften AC3" (I've also tried FFmpeg ac3) and in the config box I use "keep original channels".

I verified the source as 6 channel with MediaInfo.
any ideas on what I might be doing wrong with MeGUI?


- sion28 - 2009-03-01

punkjumper1 Wrote:I've followed the wiki and the files play great on my xbox but the ac3 sound is only encoding to 2 channel. When played on the xbox in the audio settings it shows "ac3 mono" as the audio source. I have digital sound selected in the xbmc settings.

I'm starting with a 6 channel scene rip and following the settings from the wiki I choose "Aften AC3" (I've also tried FFmpeg ac3) and in the config box I use "keep original channels".

I verified the source as 6 channel with MediaInfo.
any ideas on what I might be doing wrong with MeGUI?

Is there any reason you WANT to re-encode the audio? If what you want is AC-3, then just keep the original AC3 audio and re-mux it with the re-encoded video. I asked how to do this a few pages back and got this good answer:
http://forum.xbmc.org/showpost.php?p=272717&postcount=260


- sion28 - 2009-03-01

fuggin Wrote:This is easy to do in MeGUI. Assuming you've ripped the DVD and created the d2v file and AviSynth script.
1. From the MeGUI tools menu select AVS Cutter. Select your avs file.
2. Select approx. 2000 frame range. Click: Add.
3. Click: Do all and close. This adds a trim section to your avs and creates a cut file.
4. Load the avs into the MeGUI Video encoding section. Load the audio into the MeGUI Audio section.
5. In the Audio - Cuts section, browse for the created cut file (.clt extension)
6. Now you can AutoEncode with no target size and you'll have a small clip in around 5 mins.
To revert your avs just remove the trim section which is usually the last three lines.

Thanks for this guide (long over due).

Is there a way to do this and not re-encode the audio (e.g. just apply the cut file to the original AC3 audio file, then remux?)

Thanks...


- sion28 - 2009-03-01

Jhcheslik Wrote:Use this version for now. Its the working one.

Just go to MeGUI direction and replace the x264.exe with the link I provided.

http://kurtnoise.free.fr/index.php?dir=MeGUI/&file=x264-1069.zip

Test, and post back if it work. (with short clip of course)

So I just ran a test encode. When I opened up MeGUI, it had an update for x264 (again). So I accepted it. The encode came out great. So there probably was a problem with x264, and they fixed it. At least that's what it seems like.

Thanks for the help...


- punkjumper1 - 2009-03-01

sion28 Wrote:Is there any reason you WANT to re-encode the audio? If what you want is AC-3, then just keep the original AC3 audio and re-mux it with the re-encoded video. I asked how to do this a few pages back and got this good answer:
http://forum.xbmc.org/showpost.php?p=272717&postcount=260

I did finally see that page and have used that as a solution. I still don't know why it wouldn't work without the extra step but at least I got it figured out doing that. Thanks! I would think that would/should be part of the wiki.


- punkjumper1 - 2009-03-01

I think I'm still missing something. I click the "X" button in the audio section and then "auto Encode" and "add additional content" then use the original mp4 file for the audio (which was originally encoded with ac3 audio) but then the output file ends up being AAC audio. The file then misses frames while playing on the xbox. Do I have to rip the audio from the mp4 file first?

I'm guessing from my reading of this thread, that its because AAC audio takes cpu power that should be used to play the video. ( the same video settings play fine with the aac mono sound that I was getting when I was rencoding the audio)

thanks for any help.


Tried everything - rashid420 - 2009-03-01

I have given up on all the free tools. Trying VideoFab now. Will use the recommended resolution settings.

And one more thing, I'm not going to create file just for XBox. MKV is fine, but all devices do not play it. I'm going avi with H264. Let's see how it goes. It's really painless with VideoFab. A monkey could do it.

Currently converting a 1280 x 544 file into 704 x 304 using 128-bit MP3 audio. Will report back here.


- sion28 - 2009-03-01

Yeah, I still don't see what's so great about using the mkv container. I know it CAN hold lots of great things... but if all I want is a movie to play on my xbox, then what do I care so long as it has good video quality (that's where x264 comes in) and good audio (use original ac3 stream).

Seriously, is there something I'm missing? Is there any reason that the SAME video encode would be better in mkv than in avi or mp4 containers?


- Jhcheslik - 2009-03-02

@sion28 - I don't know of any way to cut .ac3... I will research and see what I can come up with!!

@punkjumper1 - The reason why it came out as AAC is because that is what it was encoded in first place. The "auto Encode" and "add additional content" is exactly the same audio format from the .mp4. You can either keep it as that way if you keep it at 2 channel or you can re-encode it to ac3. Just make sure the ac3 setting is to 5.1. Most of the time it was set at 2 channels.

@rashid420 - I would like to hear if you were successful with VideoFab. I have a doubt that it'll work because any h264 video encoder out there usually doesn't work with Xbox because of their h264 settings. (Too complex/powerful for Xbox to run.) But I may be wrong... Smile

And now about .mkv. The only reason why it is very popular is because of its flexible with anything you throw in. I use it because it work very well with .idx and .sub for subtitling purpose whereas .avi and .mp4 does not. Same with chapters setting, and multiple audio tracks. It seems to work better with any h264 codecs too. (In my opinion)

Both .avi and .mp4 can work with h264, but .avi is only limited to video and audio track. That's it. .mp4 can do chapters and some cool metadatas. (As far as I think) Feel free to put them in whatever container you want it to be. Just don't come here and complain if it doesn't work because the guide is mostly about .mkv container. Go to Doom9 forum and ask why it doesn't work.

So, do a test, if it work for you, great. If not, use different container.


This forum uses Lukasz Tkacz MyBB addons.