PS3 Media Server Tutorial/FAQ

For help and support with PS3 Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Re: PS3 Media Server Tutorial/FAQ

Postby Raptor399 » Sun Oct 02, 2011 3:45 pm

Problem: My device is not supported by PMS. How can I create a custom renderer.conf to make PMS recognize my device?

PMS contains a directory "renderers" which contains the renderer configuration profiles for all devices that are supported. Every configuration profile serves two purposes:

  • Allow PMS to recognize a specific renderer when it tries to connect
  • Define the possibilities of that renderer

When PMS does not recognize your device properly, it means none of the renderer configuration profiles (or the wrong one) matches your device.
The result is that PMS displays an "Unknown Renderer" or an unrelated device, and since it does not know the possibilities of your renderer, it cannot provide optimized output for your device.

Solution:
You can try creating your own renderer configuration file. For a detailed description of all available options in a configuration file, examine the file "PS3.conf".
The steps below explain how to create a basic .conf file.

1. Shut down PMS.

2. Create a directory named "backup" and copy all .conf files to it.

3. Remove all .conf files from the "renderers" directory.

4. Choose the .conf file that matches your device most. For example, if your Samsung TV is not recognized, "Samsung.conf" might be a good place to start from. If you do not know which one to choose, pick "PS3.conf" as starting point.

5. Copy the chosen .conf file to the "renderers" directory and rename it as your device.

You now have created a setup where PMS cannot be distracted by settings in other configuration files, ideal for experimentation.

Now it is time to figure out how PMS can recognize your renderer. When your device tries to connect to PMS or tries to play a file, it sends identifying information to PMS. You need to know this information and use it in your .conf file. To intercept the information you need to dumb down PMS and crank up its logging information temporarily:

6. Open your .conf file with your favorite text editor. Look for the line that defines "UserAgentSearch" and change it to:

Code: Select all
UserAgentSearch = This should not match anything

7. Look for "UserAgentAdditionalHeader" and "UserAgentAdditionalHeaderSearch" as well, make sure they are empty:

Code: Select all
UserAgentAdditionalHeader =
UserAgentAdditionalHeaderSearch =

PMS has now been prepared to not recognize your device at all and it will log debug information to the "Traces" tab and the "debug.log" logfile.

8. Start up PMS.

9. Connect your device to PMS. If possible, try to browse PMS and play some media as well. Chances are it does not work at all. This is fine, since we are only after logging information.

10. Switch to the "Traces" tab in PMS and examine the output.

Look for lines containing the text "Media renderer was not recognized. Possible identifying HTTP headers:", for example:

Code: Select all
INFO  11:05:50.702 [New I/O server worker #1-1] Media renderer was not recognized. Possible identifying HTTP headers: User-Agent: UPnP/1.0, X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment Inc."; mn="PLAYSTATION 3"; mv="1.0";

This line was captured from a PlayStation 3 trying to connect to PMS and play some media file.
It is interesting because it contains a comma separated list of information that can identify the device to PMS. The information is logged in the form of "header: value, header: value", so the line above logs two headers ("User-Agent" and "X-AV-Client-Info") and their values.

When you search the output of the "Traces" tab, you might find that the identifying information is not always the same for each request.

For example (edited for readability):
Code: Select all
Possible identifying HTTP headers: User-Agent: PLAYSTATION 3
...
Possible identifying HTTP headers: User-Agent: UPnP/1.0, X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment Inc."; mn="PLAYSTATION 3"; mv="1.0";
...   
Possible identifying HTTP headers: User-Agent: UPnP/1.0 DLNADOC/1.50, X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment Inc."; mn="PLAYSTATION 3"; mv="1.0";

As you can see, the device does not always send the same "User-Agent" information.
Now you need to integrate this knowledge into your .conf file:

11. Extract all different possible identifying HTTP header snippets from the "debug.log" and copy them into your .conf file as a mental note. For example:

Code: Select all
# ============================================================================
# PlayStation 3 uses the following strings:
#
# User-Agent: PLAYSTATION 3
# ---
# User-Agent: UPnP/1.0
# X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment Inc."; mn="PLAYSTATION 3"; mv="1.0";
# ---
# User-Agent: UPnP/1.0 DLNADOC/1.50
# X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment Inc."; mn="PLAYSTATION 3"; mv="1.0";
# ============================================================================

12. Edit the "UserAgentSearch" so it matches the headers that you discovered. If there are extra headers that can help with identification, use the "UserAgentAdditionalHeader" and "UserAgendAdditionalHeaderSearch" settings as well. For the PS3, this results in:

Code: Select all
UserAgentSearch = PLAYSTATION
UserAgentAdditionalHeader = X-AV-Client-Info
UserAgentAdditionalHeaderSearch = PLAYSTATION

These lines should be interpreted as "if the 'User-Agent' header contains 'PLAYSTATION' or if the 'X-AV-Client-Info' header contains 'PLAYSTATION' we have a certain match with the PS3".

Note that we did not try to match "UPnP/1.0" or "DLNADOC/1.50". That string is too generic; another device might use the same string and PMS would wrongly identify it as a PS3. Hence the match for 'PLAYSTATION', which is very specific for the PS3 and no other device. Be sure to look for a specific match for your device as well.

Now PMS will be able to positively match your device to your .conf file. From now on, it will use your .conf file to determine what the device is capable of. Try to determine what formats your device supports, using its manual or Google.

13. Configure the .conf file for your device. Refer to "PS3.conf" for a detailed description of each option. At the very least, make sure you configure these settings:

Code: Select all
Video
Audio
Image
MediaInfo
TranscodeVideo
TranscodeAudio

You can uncomment other settings if you are not sure they would work for your device.

Tip: If you define "MediaInfo = true" and do not define any "Supported" lines, PMS is forced to transcode everything. This is the best way to find out the correct values for "TranscodeVideo" and "TranscodeAudio" for your device.

14. Shut down PMS.

15. Start PMS and connect your device to it. PMS should recognize it now. If your device is not recognized, return to step 12.

16. Try to open media. If it does not work, try different settings for the "TranscodeVideo" and "TranscodeAudio" options in your .conf file. See "PS3.conf" for a detailed description of the options.

Restart PMS every time you want to view the results.

From there on, you can tune your .conf file by adding "Supported" lines and configuring more options. Use the backup .conf files of similar devices for inspiration.

Finally, don't forget to:

17. Backup your custom .conf file to another directory, so you still have the file somewhere when PMS is reinstalled (which cleans out the "renderers" directory).

Be sure to share your working results on the Alternative Media Renderers forum.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am
Top

Re: PS3 Media Server Tutorial/FAQ

Postby thoren » Mon Oct 03, 2011 9:44 am

Problem: You have a black screen on PS3 when playing some video files but not others.
(PMS could print "The video will not play or show a black screen on the ps3..." on the "debug.log")


Solution: The PS3 can playback at the maximum for H.264 : AVC [email protected].

The "black screen" is due to TSmuxer trying to re-header H.264 MKVs with higher profiles (eg 5.1) into 4.1, but it can't change the reference frames so the PS3 can't process the video if the ref frames is too high.

For example, in a 1920x1080 video, the max value for "reframes" is 4. More informations about which max reference frames must be used : http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels

Changing the reference frames can only be done by transcoding. It's now handled in current versions of PMS due to the detection capabilities of MediaInfo.
PMS : 1.40 with only TsMuxer engine enabled
OS/Hardware : Linux Ubuntu 10.04 on a "weak" but very useful "MSI Wind U100" netbook !
thoren
 
Posts: 38
Joined: Fri Sep 30, 2011 4:18 pm
Top

Re: PS3 Media Server Tutorial/FAQ

Postby Ice.Polar » Tue Jan 10, 2012 11:28 pm

as posted some days ago:
"Problem: Movie picture gets stretched!, instead you want 16:9 with borders."

Solution: Note: this goes for transcoding with MEncoder only.
1. In PMS gui, go to transcoding tab
2. Select the mencoder settings
3. Click the button: "Expert Settings : Codec-specific parameters"
4. In the bottom inputfield insert following:

…i got a proper aspect one some more movies with:

(width/height < 1.25 && height < 576) :: -vf softskip,expand=::::0:16/9:1
Ice.Polar
 
Posts: 2
Joined: Tue Jan 10, 2012 11:20 pm
Top

Re: Tutorial/FAQ

Postby chocolateboy » Sun Jan 29, 2012 2:13 pm

Problem: The Web folder does not appear on my renderer.

Solution:

The Web folder is enabled by placing a WEB.conf file in the profile directory. The sample WEB.conf bundled with PMS documents the options (it can also be found here).

For a list of feeds and streams, see here and here.

For issues with web video streaming, see FAQ: How do I get web video feeds/streams to work?
chocolateboy
Project Member
 
Posts: 2581
Joined: Wed Sep 16, 2009 10:05 am
Top

Re: PS3 Media Server Tutorial/FAQ

Postby Raptor399 » Wed Mar 14, 2012 9:01 pm

Problem: I am on Mac OS X 10.5 (Leopard) or older and I always get "Data corrupted".

Solution:
For cutting edge playback PMS is shipped with the latest versions of binaries like FFmpeg and MEncoder. These binaries are being compiled under the latest version of Mac OS X, which Apple distributes with a limited set of libraries to link against. At the same time the newer libraries that Apple distributes are incompatible with the older ones. This makes that the binaries shipped with PMS are only compatible with Mac OS X 10.6 (Snow Leopard) or higher.

There are four ways to solve the problem, choose the one that fits you best:

  • Upgrade to a more recent version of Mac OS X.
    Upgrades can be bought in the Apple Store. After the upgrade you will be able to run the shipped version of PMS.
  • Install an older version of PMS
    Download and install PMS 1.30.1. It may be older, but it may still work fine for you.
  • Replace the binaries that were shipped with PMS with binaries from an older version of PMS.
    The latest version of PMS that was still compatible with Mac OS X 10.5 is PMS 1.30.1. You can download its binaries here by clicking on a file and on the resulting page save the link "View raw file" to your Downloads folder. Do this for the files "dcraw", "ffmpeg", "flac", "mencoder" and "mplayer". Open the hidden folder "/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/" with the "Go to Folder" command (CMD + SHIFT + G in Finder) and copy the downloaded files there. You should now get better results from PMS even though you are using outdated binaries.
  • Compile your own binaries
    The scripts that are used to compile the binaries are publicly available on GitHub. The "build-pms-binaries.sh" script defines the minimum OS X version, be sure to change that to "OSX_VERSION=10.5". If everything works well for you, you can copy the newly compiled binaries "dcraw", "ffmpeg", "flac", "mencoder" and "mplayer" from "../target/bin-tools/target/bin/" to "/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/". With the newly compiled binaries PMS will now be on par with its shipped counterpart.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am
Top

Re: Tutorial/FAQ

Postby chocolateboy » Mon May 07, 2012 8:14 pm

Question: How can I tweak video playback options such as audio/video delay, volume, brightness &c.?

Answer:

These (and hundreds of other customisations) can be enabled by setting MEncoder options.

Note:

  • You'll need to force PMS to use MEncoder via the #--TRANSCODE--# folder for files that don't already use it.
  • These options only work with the MEncoder engine i.e. not with MPlayer, MEncoder Web or PMSEncoder.

There are two ways of setting MEncoder options (don't forget to reset the other settings if you switch):

Globally:

Global MEncoder options can be set in the GUI via: Transcoder Settings -> MEncoder -> Custom options. The corresponding PMS.conf option (e.g. for headless servers) is mencoder_decode.

Options added here are read each time a file is streamed, so it can be used to experiment with different settings by stopping playback, adjusting the settings and restarting playback. This is a global option (i.e. it applies to all renderers). If you only have one renderer, or have an issue that affects multiple renderers (e.g a dark TV display), then this is the quickest and easiest solution.

To reset/clear global custom MEncoder options, remove them from the text box or shut down PMS and reset mencoder_decode to its default blank value:

Code: Select all
mencoder_decode =


Per-renderer:

Alternatively, custom MEncoder options can be set on a per-renderer basis by setting the CustomMencoderOptions option in the renderer's config file e.g.:

Code: Select all
CustomMencoderOptions = -delay -0.5


This requires a PMS restart to take effect. Make sure the current CustomMencoderOptions line is modified, if one exists, otherwise the default setting:

Code: Select all
CustomMencoderOptions =


- will override it and disable options added before it.

To reset/clear custom renderer MEncoder options, restore the CustomMencoderOptions setting to its default blank value:

Code: Select all
CustomMencoderOptions =


Examples:

Delay audio relative to video by 0.5 seconds:

Code: Select all
-delay -0.5


Delay video relative to audio by 0.5 seconds:

Code: Select all
-delay 0.5


Increase video brightness (e.g. for a dark TV/monitor):

Code: Select all
-vf eq2=1.0:1.0:0.1


Multiple options can be set by separating them with spaces e.g.:

Code: Select all
-delay -0.5 -vf eq2=1.0:1.0:0.1
chocolateboy
Project Member
 
Posts: 2581
Joined: Wed Sep 16, 2009 10:05 am
Top

Re: PS3 Media Server Tutorial/FAQ

Postby Raptor399 » Wed Jul 04, 2012 6:02 pm

Question: PMS refuses to use the settings on Linux!
You made settings in PMS and these appear in the PMS.conf, but PMS does not seem to use them at all.

Answer:
Your Linux daemon is started under "root" privileges, that is why it ignores your user configuration.

Restart your PC, then
Code: Select all
sudo stop ps3mediaserver
and proceed with following guide:

How to run PS3 Media Server in headless mode as service or daemon (easy guide)
1. Configure PS3 Media Service in GUI mode as normal user, save and quit.
2. Edit "/etc/default/ps3mediaserver"
Code: Select all
sudo gedit /etc/default/ps3mediaserver

  • Change PMS_START to "yes"
  • Change PMS_USER to your login name
  • Change PMS_PROFILE to "/home/YOUR_LOGIN/.config/ps3mediaserver"
3. Start server
Code: Select all
sudo start ps3mediaserver

Now PS3 Media Server will run automatically during system startup. Remember to stop it with
Code: Select all
sudo stop ps3mediaserver
if you want to start it in GUI mode later to prevent network conflicts.

This is the easiest way to run PS3 Media Server on headless server:
Configure PS3 Media Server locally in GUI mode then copy the "~/.config/ps3mediaserver" folder to server to "/home" folder of the appropriate user. Then edit "/etc/default/ps3mediaserver" (see above) and start server.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am
Top

Re: PS3 Media Server Tutorial/FAQ

Postby taconaut » Wed Aug 01, 2012 9:32 pm

Problem: When opening PMS for the first time after installation on Mac OS X this message shows up:

"PS3 Media Server.app" can't be opened because it is from an unidentified developer.

Solution:
Do this once:
  • Open Applications folder in finder (right-click Applications folder and select Open "Applications")
  • Find PS3 Media Server.app -> right-click -> open -> open
This happens because of the Gatekeeper having been added to OS X with the Mountain Lion update.
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 1112
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland
Top

Re: PS3 Media Server Tutorial/FAQ

Postby meskibob » Mon Sep 03, 2012 2:41 pm

Problem: My external HDD or NAS is not visible on Mac OSX when adding shared folders to PMS.

Solution:
External HDDs and NASs (once mapped) are available through the "/Volumes" folder.
I provide NO application support via PM or email, so please post your question to the forum per the Forum Rules.
meskibob
Moderator
 
Posts: 4803
Joined: Mon Jan 19, 2009 4:11 pm
Top

Re: PS3 Media Server Tutorial/FAQ

Postby someitalian123 » Wed Mar 06, 2013 8:28 pm

Question:

How can I watch 4:3 content on a wide screen (16:9) with minimal distortion?

Answer:

viewtopic.php?f=6&t=16424
someitalian123
 
Posts: 7
Joined: Mon Apr 30, 2012 1:18 am
Top

PreviousNext

Return to General Help and Support

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 14 guests