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.