Log in

View Full Version : TUTORIAL: Quick and dirty m2ts and mkv to Xbox 360 playable mp4


Deathbliss
21st February 2012, 02:03
Moderators
Please feel free to move this thread as needed!

About
This is a little guide detailing how to convert most m2ts and mkv movie files to mp4 for the Xbox 360. This is roughly the equivalent of using multiAVCHD to create an AVCHD playable file on the PS3. I mention this because there are many similarities. Both processes work well with standardized video inside the movie file. Both work quickly, giving you equivalent picture and sound to the source with little or no transcoding.

However there are differences... Namely that the resulting mp4 movie you create for the Xbox 360 may be a little buggy. If the sounds drops out, or the picture starts to fast forward or rewind, you need to stop and the resume playback.

So far however I am pleased with the results, having full 1080p or 720p movies files with 5.1 or higher sound playing on my Xbox 360 without spending a week transcoding everything, assuming I can even find a program that gives me the right options and that I can find what those right options are.

Requirements
You will need FFDshow and Haali Media Splitter installed to run HDConvertToX. There may be other programs it requires like AVI Synth, Xvid, and the free Nero AAC encoder.

Follow this guide before you install HDConvertToX:
http://adubvideo.net/how-to/setup-proper-playback-chain-windows

You also need a standardized m2ts or mkv file. I believe it's AVC video in either case, audio is typically AC3. This is hard to explain but what I mean by this is that it is a normal, average, AVC video file without a bunch of excessive settings.

You can download legal torrents of HD videos in mkv format from here:
http://vodo.net/

These should be good examples of standardized video, and you should be able to compare them to other videos with Media Info to determine any differences.

Finally you should have Media Info or your preference of an equivalent program:
http://mediainfo.sourceforge.net/en

Process
Let me apologize ahead of time for not providing pictures. I have no server to upload to and I'm not willing to spend the time making them just yet. I may update this with an attachment of pictures later, or a document such as doc or pdf.

1. Download and extract HDConvertToX, and its updates, from this forums:
http://forum.doom9.org/showthread.php?t=145577

2. Click on the "Open File" button, top left, and select your video file.

3. You must wait a few moments, always clicking "No" when it asks "Assume settings from previus file?" (the author of the program misspelled this :D) There should be some loading activity, a window pop up, and the program may shift in location slightly.

4. If you go to the "Save File" button next you run into a problem, so ignore that for now. Instead go to the "Crop & Resize" tab, which should already be open by default. Place a check in "No Resize & Crop" to keep the original resolution of your file.

5. Now click on the "Video" tab and in the "Encode Video" dropdown box select "x264 in MP4." In the "Encoding Mode" dropdown box just under it select "Copy Video." In the "Final MB Size" enter a rough size for your video. For example, if its just over a gig use "2000." In the Speed/Quality graph move the pointer all the way to Quality. Using Media Info or whatever equivalent program you prefer, enter a rough number for "Manually Set Bitrate." For example, if it's a 4240 bitrate file, use "5000." In the "Filters" section set "De-Noise Filters" to "Off." In the "Hardware Compatibility" section click on the empty radio button next to "Network Media Tank Compatibility" and place a check next to "Strict."

What HDConvertToX will do, as far as I have been able to infer, is it will try to copy the video over into the MP4 container for you, but if the video is not standardized it will not pass the Network Tank and Strict tests, so the process will fail. That means you would have to transcode the video stream, and that would require another tutorial. I have no idea how the functions of bitrate, speed/quality and size all work together.

6. Click on the "Audio" tab and under the "Encode Using" dropdown choose "Copy Audio."

7. Click on the "Audio & Subs Selection" tab and make sure the audio track and subs you want have a check next to them.

8. Click on the "Advanced Options" tab, the the "Utilities" subtab. In the bottom right corner under is the "Priority" dropdown box. Keep it at "idle", or speed things up to "belownormal." Unless you have a CIA supercomputer I don't recommend going higher than that.

9. Click on the "Muxing" subtab and again in the bottom right enter 4000 for "Split every MBytes." Remember that your 360 can only read Fat 32 drives, and Fat 32 can only handle files up to 4 gigs in size.

10. Click on the "Load & Save Settings" subtab and click on the "Save Settings" button. This will save these settings you have set as the defaults, although you should go over with each new file you add to be sure.

11. Now you can click on the "Save File" button. Leave the extension off! Just enter the name of your file, and HDConvertToX will add a .MP4 to it. Why it's upper-case I have no idea...

12. Want to add more files? Cool! Click on the "Add To Queue" button to save this file into the queue. Select another file, do not assume same properties (click on "No"), wait for the new file to be analyzed, reload it if it doesn't seem like it has been analyzed or click the "Analyze file" button. Once the file is loaded up and ready to go check your settings, add the proper video size and bitrate numbers, and if everything is ready click on "Add To Queue."

13. When you have all your files added to the queue click on "Start Queue." Dunno what "General Encode" is.

14. If you can contribute to this tutorial, making it better, more accurate, etc. within the realm of getting file that can be played directly on the Xbox 360, not streamed to it but played on it, then please by all means post! This tutorial especially needs a second transcoding part to cover either transcoding a non-standard AVC video stream or standardizing it, with the goal to have the same or better quality as the original m2ts or mkv file, in the same amount or less time it would take to play said file (this is the goal.)

I hope you find the tutorial helpful! I intend to update this as I learn more -
- Deathbliss

Deathbliss
1st March 2012, 05:23
A couple of updates here...

First off you should know you can also use Xvid4PSP to do the same thing as HDConvertToX:
http://www.videohelp.com/tools/XviD4PSP

In this case, before you load your file, select PS3 Xbox 360 from the top dropdown menu, leave the next two at disabled, then set the audio and video both to copy. Now import your video file(s). The program will tell you if there are any problems. I actually am using this one more now because it seems more stable.

Neither program allows DTS pass through. You can copy the audio, which is basically the same thing, but you are told that you can't have DTS in an mp4 file. I need to work on this more to find a solution. Xvid4PSP will warn you and then do it anyway, but it failed at 99% when I did that.

You can pass through Dolby Digital 5.1 and play it on your Xbox 360. So you can have an mp4 file with 5.1 sound inside, and play it in all its HD audio/video glory on your Xbox 360, as long as you have a receiver with Dolby Digital 5.1/DTS support. This is probably the most important trick I have discovered so far.

If you need to split a mkv or m2ts file you can use MKVmerge. Use the time option, something like 01:00:00 (1 hour) or 00:45:00 (45 minutes.) Then you can mux each chunk and play them one after the other. I'll try to provide detailed instructions later.

One last thing... Test your muxed files on your intended device and PC! If you try to skip ahead and it pauses, or on the Xbox 360, stops or restarts, you have a seeking problem caused by some numbskull using something called "Open GOPs" in the file. There is, at present, no fix for this, although I am researching it. You need "Closed GOPs" to prevent this seeking issue. So for now, test the muxed mp4 file, and if you can skip ahead and go back without issue then you will have no problems. I have encountered a file once that simply stopped and gave me an "Unsupported Format Error", but I don't know what caused this yet.

More to come!
- Deathbliss

Guest
1st March 2012, 05:41
the resulting mp4 movie you create for the Xbox 360 may be a little buggy. If the sounds drops out, or the picture starts to fast forward or rewind, you need to stop and the resume playback.

So far however I am pleased with the results :confused: :o

Thanks for the warning!

Moving to Development forum.

mpucoder
1st March 2012, 16:20
Nothing like showing a complete lack of understanding of something and calling those who do "numbskulls". Open GOPs squeeze a little more out of the available bitrate.
Now the problem with seeking may appear to be caused by open GOPs, but DVD players work with them all the time. The real problem is the decoder in the XBox not knowing how to resync on an open GOP.

Maybe the real numbskulls are the engineers at Microsoft. Or maybe it's deliberate to discourage people from doing what you are trying to do.

some numbskull using something called "Open GOPs

Deathbliss
16th March 2012, 20:04
Open GOPs squeeze a little more out of the available bitrate.

Not enough to be worth the lack of standardization and player compatibility. Many people use 360s and PS3s as their media players. I am not arguing the fact that Microcrap is partially at fault here. However, creating a file that works on the 360 and DVD players is far better than creating a file that plays on DVD players only, out of some grudge against M$, and for a slight increase in bitrate. If you hate Microsoft that's between you and them. Please do not punish me simply because I have a 360 under my TV!

There are two sources for .m2ts files I get. Both come in under 4 gigs for a movie file. Both have equivalent AC3 6 channel sound. Most importantly, both have 1920x1080 picture. There is no difference in quality of picture between the two. However one uses closed GOPs, so it will play, using the method outlined in this tutorial, on the Xbox 360. The other will not.

I could understand if the video quality were somehow noticeably better, or if the file-size was noticeably decreased, or anything. None of this is true. The advantages, if any, of open GOPs are so miniscule to be be completely ignorable. Only a "numbskull" would worry about them.

Compatibility, when quality is not seriously at stake, should always win out over quality. Nobody is pulling out a graph and noticing the 0.02% increase in this file with open GOP VS that on with closed. There is no contest to win here. Nobody even cares. But if they can't play the file on their 360, then they do care, that's why I created this thread.

It's really as simple as that. The proof is in the pudding. Both taste like chocolate, only one, open GOPs, gives you a stomach ache.
- Deathbliss

Guest
16th March 2012, 21:38
There are two sources for .m2ts files I get. Where are you getting these files?

Asmodian
17th March 2012, 01:25
Not enough to be worth the lack of standardization and player compatibility. Many people use 360s and PS3s as their media players. I am not arguing the fact that Microcrap is partially at fault here.

It seems like Microsoft is totally at fault here, open-gop is required by the bluray spec; see x264bluray (http://sites.google.com/site/x264bluray/home/1080i-p).

If I am making a bluray for a client I will encode with open-gop. I guess because the xbox cannot play blurays it doesn't care about the spec but I wouldn’t want to make an out of spec file just to support a broken player. Why create a m2ts unless it is bluray compatible?

hello_hello
17th March 2012, 08:57
It seems like Microsoft is totally at fault here, open-gop is required by the bluray spec; see x264bluray (http://sites.google.com/site/x264bluray/home/1080i-p).

I don't think "required" is quite the correct word. "Allowed" would probably be more accurate.

If I am making a bluray for a client I will encode with open-gop. I guess because the xbox cannot play blurays it doesn't care about the spec but I wouldn’t want to make an out of spec file just to support a broken player.

I also encode using open-gop as none of the players I use are bothered by it, but an encode using closed gop should be just as Bluray compliant, and possibly compatible with a wider range of devices. In fact if memory serves me correctly (don't quote me on this) I think there were some early model Panasonic Bluray players which didn't support open-gop properly, which along with other devices that don't (the xbox, apparently) probably explains why x264 doesn't enable open-gop by default.

open-gop is listed as an optional parameter for Bluray here:
http://forum.doom9.org/showthread.php?t=154533

Guest
17th March 2012, 13:56
Closed pending answer from OP to mod question. OP, please answer via PM.