Guide to create H264 + AC3 for the PS3 with DVDFab 5.0.2.0

In my quest to get the best possible quality files that can be streamed to the PS3 I wanted to try H264 and see if it was worth the CPU cycles for DVD source material. Since this is not an easy task with DVDFab, I thought I would share how to do it. The default PS3 profile is limited to stereo AAC which isn’t well suited for home theater use.

The short version:

[ul]
[li]Use custom profile in DVDFab to make AVI with H264 + AC3[/li][li]Use mkvmerge to create mkv file.[/li][li]Use mkv2vob to create non-standard vob file that plays on PS3[/li][/ul]
Lets start with the obvious questions:

Why not just skip a step and use the generic H264 profile for MKV with audiocopy?

[ul]
[li]The existing profile only allows maximum of 5000 bitrate while the PS3 profile allows a maximum of 10000.[/li][li]The MKV profiles in DVDFab use the wrong fourcc value for H264 content making the file unreadable by mkv2vob.[/li][/ul]
Why not just modify the MKV profile?

[ul]
[li]Tried that, the fourcc=“H264” required to make a compliant file works when creating an AVI but does not work when creating an MKV for some reason (bug?).[/li][/ul]
Couldn’t you just make a profile that creates the vob file directly so we can skip all these steps.

[ul]
[li]Tried that too, but it doesn’t result in a playable file.[/li][li]Maybe DVDFab will able to create the special vob file for the PS3 directly some day. My understanding is that mkv2vob is simply creating a m2ts file and renaming it to vob.[/li][/ul]
Won’t all these steps take a lot of time?

[ul]
[li]Actually no, only the first step is time consuming depending upon how fast your PC processor is. The other steps are simply file copies.[/li][/ul]

Setup

[ul]
[li]Create a new file under Program Files/DVDFab 5/Profiles and name it something like “ps3.avi.h264.audiocopy.480p.xml”[/li][li]Edit the file and put the following:[/li][/ul]

<profile name="PlayStation 3 - AVI" version="200" device="ps3" tag="dvdfab" description="The profile is used to create avi(h264 + audiocopy) file, which can be played in Playstation 3.">
<common>
<file format="avi" mode="0" number="1" />
<audio copy="1" />
<video>
<size list=""/>
<subtitle mode="0" />
<outfps mode="3" value="29.97" list="23.976,24,25,29.97,30" />
<encode codec="h264" fourcc="H264" bitrate_kbps="5000" maxbitrate_kbps="10000" >
<mode value="real_time" list="real_time, high_quality" />
</encode>
</video>
</common>
<vcodec name="h264">
<generic profile="0" level="30" />
</vcodec>
</profile>

[ul]
[li]Restart DVDFab if it was running[/li][li]Download and install MKVtoolnix (http://www.videohelp.com/tools/MKVtoolnix)[/li][li]Download and install mkv2vob (http://www.videohelp.com/tools/mkv2vob)[/li][/ul]
Step 1:

[ul]
[li]Select PS3 under DVD to Mobile[/li][li]Select the source content[/li][li]Click Conversion settings and select the “Playstation 3 - AVI” profile[/li][li]Encode as usual[/li][/ul]
Step 2:

[ul]
[li]Open mkvmerge GUI from MKVtoolnix[/li][li]Select the avi file you just created[/li][li]Click Start Muxing[/li][/ul]
Step 3:

[ul]
[li]Open mkv2vob[/li][li]Click on Configuration tab[/li][LIST]
[li]Set Video Transcoding to Never (ignore the warning, we know what kind of files we have)[/li][/ul]

[ul]
[li]Set Output File Extension to vob[/li][/ul]

[ul]
[li]Set Transcoding Codec to x264[/li][/ul]

[li]Click on Add File tab[/li][li]Choose mkv file created in previous step[/li][li]Choose destination (can be your streaming server location)[/li][li]Click Add File button[/li][/LIST]
The result is a perfectly playable H264 file for the PS3 with the original AC3 Dolby 5.1 audio.

In the end, re-encoding to H264 did not keep the quality I was looking for. If you are a quality junky like me and aren’t afraid of the command line then you’ll find instructions to make a high quality MPEG2 file from DVD Film content here:

http://club.cdfreaks.com/f116/high-quality-options-streaming-ps3-244789/#post2057122

I found that you can get a little better quality by raising the H264 level to 4.1. Here is the changed line from the file above:

<generic profile=“0” level=“41” />
Also, it is better to save the file under application data so that it will survive after a new version of DVDFab is install. The directory is something like:

C:\Documents and Settings&lt;Your Login>\Application Data\DVDFab\profiles

FYI, retested direct MKV creation in 5.0.2.2 and it is still ignoring the fourcc=“H264” in the encode portion of the profile. The fourcc of an MKV created with DVDFab is coming up as “V_MPEG4/ISO/AVC” in MKVmerge which both mkv2vob and the PS3 reject.

Does the resulting file stream OK?

I tried a similar thing using DVDFab, Handbrake and then mkv2vob to see if I could get rid of the NTSC judder whilst retaining 5.1 audio. The resulting file would play but it wouldn’t stream smoothly (even through the bitrate was less than required for a vob/mpg which stream fine).

[quote=SkinnyLatte;2064108]Does the resulting file stream OK?

I tried a similar thing using DVDFab, Handbrake and then mkv2vob to see if I could get rid of the NTSC judder whilst retaining 5.1 audio. The resulting file would play but it wouldn’t stream smoothly (even through the bitrate was less than required for a vob/mpg which stream fine).[/quote]

This seems to be dependent on your streaming server and the bitrate. I’ve been doing experiments with 1 chapter of a movie at various bitrates to compare quality. They all play fine, but lower bitrates tend to fast-forward and rewind more smoothly. I am streaming them from my NAS, a Synology Cubestation with only 64MB of RAM.

The lower the bitrate setting, the smaller the files and the more need for 2-pass encoding. If you use 2-pass on DVDFab then you just have to put up with part of it crashing at the end. It still creates a good AVI file. The key to the profile above for Film content is the forced 23.976fps setting.