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 Redlum » Wed Jun 08, 2011 1:51 pm

Awesome, thanks :) I'll test it this weekend.
Redlum
Project Member
 
Posts: 371
Joined: Mon Jan 12, 2009 9:13 pm

Re: Compiling PS3 Media Server on OSX

Postby chocolateboy » Wed Jun 08, 2011 5:17 pm

Raptor399 wrote:This means the patch needs rewriting


Since this is a workaround for an MEncoder issue that might affect any platform using the same version(s) of MEncoder, IMO this would be better implemented as an MEncoder option in the GUI/profile e.g. "Use AC3 fixed" (localizable)/mencoder_ac3_fixed. The default value could then be set to true for the Mac build. e.g.

PmsConfiguration.java

Code: Select all
    private static final String KEY_MENCODER_AC3_FIXED = "mencoder_ac3_fixed";

    public boolean isMencoderAc3Fixed() {
        return configuration.getBoolean(KEY_MENCODER_AC3_FIXED, Platform.isMac());
    }


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

* Well, ideally, ffmpeg and mencoder should just work :-)
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Compiling PS3 Media Server on OSX

Postby Raptor399 » Wed Jun 08, 2011 10:18 pm

chocolateboy wrote:* Well, ideally, ffmpeg and mencoder should just work :-)


Made me chuckle! :lol:

Agreed, your suggestion is better and will still set the default correctly (for people scared of the gazillion options that already plagued poor PMS ;-)).
Last edited by Raptor399 on Thu Jun 09, 2011 7:15 am, edited 1 time in total.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Compiling PS3 Media Server on OSX

Postby SubJunk » Wed Jun 08, 2011 10:42 pm

chocolateboy wrote:Since this is a workaround for an MEncoder issue that might affect any platform using the same version(s) of MEncoder, IMO this would be better implemented as an MEncoder option in the GUI/profile e.g. "Use AC3 fixed" (localizable)/mencoder_ac3_fixed.
If that's true, we can just detect the version of MEncoder and choose the correct option automatically. We already get the version info so it wouldn't be hard
SubJunk
 
Posts: 1212
Joined: Fri Mar 27, 2009 5:25 am

Re: Compiling PS3 Media Server on OSX

Postby chocolateboy » Wed Jun 08, 2011 11:47 pm

Although the garbled MEncoder message makes it sound like a fix (and it may well be in buggy MEncoder versions), the ffmpeg documentation indicates that it's a preference with different tradeoffs on different platforms/hardware:

ffmpeg wrote:AC-3 audio encoders.

These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as the undocumented RealAudio 3 (a.k.a. dnet).

The ac3 encoder uses floating-point math, while the ac3_fixed encoder only uses fixed-point integer math. This does not mean that one is always faster, just that one or the other may be better suited to a particular system. The floating-point encoder will generally produce better quality audio for a given bitrate. The ac3_fixed encoder is not the default codec for any of the output formats, so it must be specified explicitly using the option -acodec ac3_fixed in order to use it.


Also: parsing MEncoder versions could get messy. Not all builds report the SVN revision:

Code: Select all
$ mencoder
MEncoder 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Compiling PS3 Media Server on OSX

Postby SubJunk » Thu Jun 09, 2011 12:05 am

I'm a big fan of programs just working with minimal configuration, so IMO it's better to have a bit of code mess to grab the revision/version numbers than to offer users that option.
Of course we can just do both things: try to be automatic but allow the user to override with an option
SubJunk
 
Posts: 1212
Joined: Fri Mar 27, 2009 5:25 am

Re: Compiling PS3 Media Server on OSX

Postby BEEware » Thu Jun 09, 2011 7:44 pm

First i have to say, i love ps3mediacenter and the community seems to be awesome.

@Raptor399: I'm on an iMac mid 2010 with Core i5 3,6 GHz running Mac Os X 10.6.7 with Xcode 3.2.6. I tried your version v1.8 of your build script, but getting an syntax error -> build-pms-osx.sh: line 1291: syntax error: unexpected end of file

Any ideas?

I also tried TARGET_ARCHITECTURE="x86_64"
BEEware
 
Posts: 3
Joined: Thu Jun 09, 2011 7:34 pm

Re: Compiling PS3 Media Server on OSX

Postby Raptor399 » Thu Jun 09, 2011 11:18 pm

BEEware wrote:@Raptor399: I'm on an iMac mid 2010 with Core i5 3,6 GHz running Mac Os X 10.6.7 with Xcode 3.2.6. I tried your version v1.8 of your build script, but getting an syntax error -> build-pms-osx.sh: line 1291: syntax error: unexpected end of file

Any ideas?


Line 1291 would be exactly the last line of the script.
I think the error means that the script expected to find a newline to complete that last line, but there is none.
You can probably solve this by adding a couple of empty lines to the bottom of the script, under the line that reads "build_ps3mediaserver".

Does that help?
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Compiling PS3 Media Server on OSX

Postby BEEware » Fri Jun 10, 2011 12:48 am

My fault. It helped to create the script inside of Xcode and not an external editor :) Thanks for reply.
BEEware
 
Posts: 3
Joined: Thu Jun 09, 2011 7:34 pm

Re: Compiling PS3 Media Server on OSX

Postby Raptor399 » Fri Jun 10, 2011 6:24 am

BEEware wrote:My fault. It helped to create the script inside of Xcode and not an external editor :) Thanks for reply.


Hehe... Glad you found a way out. To be honest I never touched Xcode itself, to me it's just a set of installed binaries that I can use from the shell. I work purely in Terminal and use "vi" to edit. Old unix folks are old. :oops:
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

PreviousNext

Return to Mac OS X Support

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests