Page 3 of 3: Appendix A: MP4 to M2TS Conversion

Appendix A: MP4 to M2TS Conversion

As mentioned previously, this method allows you to use a M2TS container to hold your H.264 file, and allows for increased file size supports (MP4 playback on the PS3 is limited to 4 GB, which is pretty useless for HD video files). M2TS also allows you to have AC3 5.1 audio, but you will have to separately convert the 5.1 channel AAC encoded audio we've created using this guide into an AC3 file. This section of the guide is for more advanced users though, so beware. Xbox 360 owners should be skipping this page since the 360 cannot play M2TS files.

The process is as follows: first, we extract the H.264 and AAC track from the MP4 file created using the earlier parts of this guide using YAMB. Then if the audio is 5.1 channels, we convert the AAC audio to AC3 using MeGUI. Next, we use tsMuxeR to create our M2TS file.

We will first use YAMB to extract the H.264 (.h264) and AAC streams from our newly created MP4 file. Yes I do know that the temp folder that RipBot264 creates will already contain these two files, if you don't close RipBot264 that is (it will then delete the temp files), but hunting around for temp files and possibly accidentally closing RipBot264 is not a great all around solution. So YAMB it is. Download YAMB and install it. Start it up and click on the "Editing" button on the left hand side, select the "Click to extract streams ..." option (demuxing).

YAMB: Demuxing


From the Input box, load in your MP4 file. The info box below will now list all the streams found in this file, which should be a H.264 stream and an AAC stream. Select the H.264 stream first, with the option down below set to "Extract to Raw Format" and then click on the "Next" button to extract out this stream from the MP4 file (the MP4 file will be untouched). Then select the AAC file and repeat the same step. After YAMB processes both streams, you should now have two additional files - one .h264 and one .aac in the same folder as your original MP4 file.

YAMB: File Extraction


Now if your AAC file was 5.1 channels, we will now have to convert that to AC3 so the PS3 can decode it properly (the PS3 cannot decode AAC 5.1 at time of publishing). I've searched around for a good tool to do it, and ffmpeg is the best but it is a command line tool. None of the GUIs I tried supported AAC input, so basically I'm going to use MeGUI. It's not my ideal choice because I would rather have a simple tool that does the encoding, but alas, I could not find one (I know VideoLAN does it, but it doesn't support 384 Kbps encoding for some reason). Luckily, MeGUI shares the same set of pre-requisites as RipBot264, so you should already have .NET framework 2.0 and AviSynth installed. So go on and download MeGUI.

Install MeGUI. Start it up and most likely, it will prompt you to update the software used by MeGUI - click "Yes" to launch the update Manager.

MeGUI: Update Prompt


MeGUI: Updater


Press the "Update" button to start the update process - MeGUI will automatically download and launch the install for the required software. When all the updates are completed, you can now close the MeGUI updater.

In the Audio section of MeGUI, load in the AAC file that YAMB extracted. Select an output location/filename. From the "Codec" section, select "FFMPEG AC-3" and press the "Config" button. The codec configuration window should show up.

MeGUI: FFMPEG AC-3 Config


Ensure "Output Channels" is set to use "Keep Original Channels". You can adjust the bitrate to use - 384 kbps is the minimum used by commercial DVD AC3 5.1 tracks, while many use 448 kbps for extra quality. You can press the "New" button and save the current profile (eg. name it "AC3 5.1, 384 kbps") for future use if you wish. Press "OK" to close the codec configuration window.

MeGUI: FFMPEG AC-3 Config - Save Profile


Press the "Enqueue" button at the bottom of the "Audio" section to queue the encoding job. Click on the "Queue" tab at the top and then click on the "Start" button to start the encoding. Once it is done, you will now have a new 5.1 channel AC3 file. You don't need the original AAC file anymore, but better keep it around until we've finished everything.

Now we should have an .h264 file and either an .aac or .ac3 file. We will now recombine these two files into a M2TS file using tsMuxeR.

Download and extract the tsMuxeR ZIP file to a folder on your hard-drive, and run the "tsMuxerGUI" executable file to start tsMuxeR. In the "Input files" section, first use the "add" button to load in your .h264 file, and then to load in the .aac/ac3 file (in this order, .h264 first and then the .aac/ac3 file). In the "Output" section below, select "M2TS muxing" and use the "Browse" button to select an output filename/location. Press the "Start muxing" button at the bottom to beging the muxing process.

tsMuxeR


After tsMuxeR finishes process (it should say "Done!" in the text log area), we should now have a .m2ts file. You can delete all the other files, other than this .m2ts file. In order for TVersity to function, the .m2ts file must be renamed to have a .m2t extension (basically get rid of the last 's' in the extension). For playback from a USB/CD/DVD, the renaming is not necessary. You can now use the TVersity instructions in my original PS3 H.264 guide to get TVersity to stream this .m2ts file to your PS3. We're done!

 

 


  1   2   3