Compiling PS3 Media Server on OSX

For help and support with issues specific to Mac OS X
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Re: Compiling PS3 Media Server on OSX

Postby MKUltra » Sun Jun 12, 2011 4:04 am

Raptor399 thanx for the effort in creating the "soup-to-nuts" build script. What is the difference if I use the build script versus the svn checkout from the project hosting site?
Mac Mini 2.26 GHz Intel Core 2 Duo 4 GB RAM OS 10.7.2/Airport Extreme Basestation (Early 2009) Wireless N/PS3-Fatboy 40GB/1Gibps via Cat 6 LAN connection w/ Airport Extreme/PS3 connected via HDMI to Denon AVR-3808CI
MKUltra
 
Posts: 75
Joined: Sun Aug 30, 2009 10:41 pm

Re: Compiling PS3 Media Server on OSX

Postby Raptor399 » Sun Jun 12, 2011 3:45 pm

MKUltra wrote:Raptor399 thanx for the effort in creating the "soup-to-nuts" build script. What is the difference if I use the build script versus the svn checkout from the project hosting site?


You're welcome!

SVN on the project hosting site contains the newest source for PMS. At the same time it contains very old precompiled libraries and tools for OSX, compared to the same for Windows and Linux. So when you build from SVN on OSX, you get a brand spanking new PMS but with limited support for different formats and options.

In contrast, the script ignores the old precompiled libraries and tools. It first retrieves and compiles all the latest libraries and tools. And only then it compiles PMS. This means you get an OSX build that closes the gap with the Windows and Linux builds from a technical perspective. It supports more formats and options and you will experience the same issues as elsewhere on the forum.

TL;DR: SVN = new PMS + old tools. Script = new PMS + new tools. ;-)

Note: currently SVN contains old tools because there is no alternative. Somewhere in the future, when the script is production ready, the newest tools can be built and checked into SVN accordingly. From then on, building from SVN will give the same result as building from the script, and the script will probably only be used by people who want to experiment with different versions of tools.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Compiling PS3 Media Server on OSX

Postby chocolateboy » Sun Jun 12, 2011 4:10 pm

Raptor399 wrote:it contains very old precompiled libraries and tools for OSX, compared to the same for Windows and Linux.


Just to clarify one point, the Linux build bundles tsMuxeR and nothing else. MEncoder, MPlayer, ffmpeg &c. are provided by the distro, and, although the Windows build bundles multiple versions of MEncoder to provide a convenient workaround for MEncoder bugs on the most widely-used platform, these are a refinement rather than a requirement for all platforms.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Compiling PS3 Media Server on OSX

Postby MKUltra » Sun Jun 12, 2011 5:04 pm

Thanx Chocolateboy and Raptor399 for clarifying the differences. I'm looking forward to when the script is production ready!
Mac Mini 2.26 GHz Intel Core 2 Duo 4 GB RAM OS 10.7.2/Airport Extreme Basestation (Early 2009) Wireless N/PS3-Fatboy 40GB/1Gibps via Cat 6 LAN connection w/ Airport Extreme/PS3 connected via HDMI to Denon AVR-3808CI
MKUltra
 
Posts: 75
Joined: Sun Aug 30, 2009 10:41 pm

Re: Compiling PS3 Media Server on OSX

Postby Raptor399 » Sun Jun 12, 2011 8:38 pm

The discussion on how to implement the patch seems to have died down, so I have rewritten the patch as chocolateboy suggested. The setting can now be configured by adding "mencoder_ac3_fixed = true" or "mencoder_ac3_fixed = false" to the configuration file. If it is not configured, it will take the default value "true" on OSX, "false" on the other systems.

Works on my machine, patch is attached.
Attachments
ac3_fixed.patch.zip
Patch to use "ac3_fixed" instead of "ac3" based on the configuration.
(2.49 KiB) Downloaded 64 times
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Compiling PS3 Media Server on OSX

Postby Raptor399 » Sun Jun 12, 2011 8:59 pm

chocolateboy wrote:Ideally*, the same should also be done for ffmpeg.


Ideally yes, but the code for "args()" in "FFMpegVideo.java" puzzles me enough to not attempt a change. Or maybe it is the way "defaut" is spelled in that method. ;-)

Anyway, it would probably end up looking something like this in "PmsConfiguration.java":
Code: Select all
private static final String KEY_FFMPEG_AC3_FIXED = "ffmpeg_ac3_fixed";

public boolean isFFMpegAc3Fixed() {
    return configuration.getBoolean(KEY_FFMPEG_AC3_FIXED, Platform.isMac());
}


And like this in "FFMpegVideo.java":
Code: Select all
protected String [] getDefaultArgs() {
   return new String [] { "-vcodec", "mpeg2video", "-f", "vob", "-acodec", (PMS.getConfiguration().isFFMpegAc3Fixed ? "ac3_fixed" : "ac3") }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
}
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Compiling PS3 Media Server on OSX

Postby chocolateboy » Sun Jun 12, 2011 9:53 pm

Raptor399 wrote:patch is attached.


Thanks. Applied in r617.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Compiling PS3 Media Server on OSX

Postby chocolateboy » Sun Jun 12, 2011 10:30 pm

Raptor399 wrote:Note: web video will still get distorted and skewed audio if you use chocolateboy's PMSencoder plugin, because that still calls mencoder with "acodec=ac3" instead of "acodec=ac3_fixed".


You can customize this. Save this as INIT.groovy in the PMSEncoder script directory.

Code: Select all
init {
    def acodec = $PMS.getConfiguration().isMencoderAc3Fixed() ? 'ac3_fixed' : 'ac3'
    def threads = $PMS.getConfiguration().getMencoderMaxThreads()

    $MENCODER = [
        'MENCODER',
        '-msglevel', 'all=2',
        '-quiet',
        '-prefer-ipv4',
        '-oac', 'lavc',
        '-of', 'lavf',
        '-lavfopts', 'format=dvd',
        '-ovc', 'lavc',
        '-lavcopts', "vcodec=mpeg2video:vbitrate=4096:threads=${threads}:acodec=${acodec}:abitrate=128",
        '-ofps', '25',
        '-cache', '16384', // default cache size; default minimum percentage is 20%
        '-vf', 'harddup'
    ]
}


Note: the script won't work and should be removed once the next version of PMSEncoder is released.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Compiling PS3 Media Server on OSX

Postby MKUltra » Mon Jun 13, 2011 3:15 am

Is there a patch for the ASS and VOBSUB subtitles that is broken in the newer MEncoder builds?
Mac Mini 2.26 GHz Intel Core 2 Duo 4 GB RAM OS 10.7.2/Airport Extreme Basestation (Early 2009) Wireless N/PS3-Fatboy 40GB/1Gibps via Cat 6 LAN connection w/ Airport Extreme/PS3 connected via HDMI to Denon AVR-3808CI
MKUltra
 
Posts: 75
Joined: Sun Aug 30, 2009 10:41 pm

Re: Compiling PS3 Media Server on OSX

Postby SubJunk » Mon Jun 13, 2011 3:41 am

MKUltra wrote:Is there a patch for the ASS and VOBSUB subtitles that is broken in the newer MEncoder builds?
The patch is to use the older builds ;)
SubJunk
 
Posts: 1210
Joined: Fri Mar 27, 2009 5:25 am

PreviousNext

Return to Mac OS X Support

Who is online

Users browsing this forum: No registered users and 6 guests