About DLNA.ORG_PN attribute / protocolInfo

Discuss issues related to PS3 Media Server development (only for programmers)

About DLNA.ORG_PN attribute / protocolInfo

Postby jesk » Wed May 05, 2010 12:22 pm

Hello,

first of all I want to thanks for that great piece of software.

Now to my issue:

I'am trying to stream PCM audio when playing my FLAC media. My TV (Panasonic TXP-50GW20) gets the following
protocolInfo from the PS3 Media Server for the flac file

protocolInfo="http-get:*:audio/l16:DLNA.ORG_OP=01"


which seems to be insufficient for my TV to recognize the PCM content.
When using MP3 as transcoding audio format instead of PCM it starts working. ProtocolInfo header looks in this case as follows

protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01".

So for PCM the "DLNA.ORG_PN" attribute is missing which could be a reason for the problem.
Quoting the datasheet of my TV the following audio codecs should be supported which includes LPCM:
"DivX/DivXHD/MPEG2/HD-JPEG/AVCHD/MP3/AAC/LPCM".

Does anyone know how this attribute is set and how one can influence this? Any other ideas are highly
welcome!

Thanks.

regards,
jesk

Following one TCP stream between PS3 Media Server and my Panasonic Panel when PCM is used for transcoding
(sniffed with wireshark):
Code: Select all
POST /upnp/control/content_directory HTTP/1.1

User-Agent: Panasonic MIL DLNA CP UPnP/1.0 DLNADOC/1.50

Host: 10.10.10.1:5001

Content-Type: text/xml; charset="utf-8"

SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"

X-PANASONIC-Registration: VklFUkEAAAAAAAAAAAAAAAAAAAAAAAAAAAA=

X-PANASONIC-DMP-Profile: MPEG_PS_PAL JPEG_SM PV_DIVX_DIV3 PV_DIVX_DIV4 PV_DIVX_DIVX PV_DIVX_DX50 PV_DRM_DIVX_DIV3 PV_DRM_DIVX_DIV4 PV_DRM_DIVX_DIVX PV_DRM_DIVX_DX50

Content-Length: 671



<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
 <s:Body>
  <u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
   <ObjectID>0$0</ObjectID>
   <BrowseFlag>BrowseDirectChildren</BrowseFlag>
   <Filter>dc:title,dc:date,res,res@protocolInfo,res@size,res@duration,res@resolution,res@dlna:ifoFileURI,res@pv:subtitleFileType,res@pv:subtitleFileUri,upnp:albumArtURI,upnp:album,upnp:artist</Filter>
   <StartingIndex>0</StartingIndex>
   <RequestedCount>20</RequestedCount>
   <SortCriteria></SortCriteria>
  </u:Browse>
 </s:Body>
</s:Envelope>
HTTP/1.1 200 OK

CONTENT-TYPE: text/xml; charset="utf-8"

Server: Windows_Vista-x86-6.0, UPnP/1.0, PMS/1.20.409

Content-Length: 2909



<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<s:Body>

<u:BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">

<Result>&lt;DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"&gt;&lt;item id="0$0$0" parentID="0$0" restricted="true" &gt;&lt;dc:title&gt;My Friend Fats [MPlayer Audio]&lt;/dc:title&gt;&lt;upnp:album&gt;Animals Should Not Try to Act Like People&lt;/upnp:album&gt;&lt;upnp:artist&gt;Primus&lt;/upnp:artist&gt;&lt;dc:creator&gt;Primus&lt;/dc:creator&gt;&lt;upnp:genre&gt;Primus&lt;/upnp:genre&gt;&lt;upnp:originalTrackNumber&gt;5&lt;/upnp:originalTrackNumber&gt;&lt;res xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" protocolInfo="http-get:*:audio/l16:DLNA.ORG_OP=01" bitrate="976" duration="00:07:55.00" sampleFrequency="44100" nrAudioChannels="2" size="83790000" &gt;http://10.10.10.1:5001/get/0$0$0/Fats.flac&lt;/res&gt;&lt;dc:date&gt;2010-04-24T09:36:35&lt;/dc:date&gt;&lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt;&lt;/item&gt;&lt;item id="0$0$1" parentID="0$0" restricted="true" &gt;&lt;dc:title&gt;My Friend Fats [Audio High Fidelity]&lt;/dc:title&gt;&lt;upnp:album&gt;Animals Should Not Try to Act Like People&lt;/upnp:album&gt;&lt;upnp:artist&gt;Primus&lt;/upnp:artist&gt;&lt;dc:creator&gt;Primus&lt;/dc:creator&gt;&lt;upnp:genre&gt;Primus&lt;/upnp:genre&gt;&lt;upnp:originalTrackNumber&gt;5&lt;/upnp:originalTrackNumber&gt;&lt;res xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" protocolInfo="http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=01" duration="00:07:55.00" bitrate="122" nrAudioChannels="2" sampleFrequency="44100" &gt;http://10.10.10.1:5001/get/0$0$1/Fats.flac&lt;/res&gt;&lt;upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_TN" &gt;http://10.10.10.1:5001/get/0$0$1/thumbnail0000Fats.flac&lt;/upnp:albumArtURI&gt;&lt;dc:date&gt;2010-04-24T09:36:35&lt;/dc:date&gt;&lt;upnp:class&gt;dummy&lt;/upnp:class&gt;&lt;/item&gt;&lt;item id="0$0$2" parentID="0$0" restricted="true" &gt;&lt;dc:title&gt;Fats.flac.wav&lt;/dc:title&gt;&lt;upnp:originalTrackNumber&gt;1&lt;/upnp:originalTrackNumber&gt;&lt;res xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" protocolInfo="http-get:*:audio/l16:DLNA.ORG_OP=01" bitrate="1411" duration="00:07:55.00" sampleFrequency="44100" nrAudioChannels="2" size="83848844" &gt;http://10.10.10.1:5001/get/0$0$2/Fats.flac.wav&lt;/res&gt;&lt;dc:date&gt;2010-05-05T07:11:58&lt;/dc:date&gt;&lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;</Result>

<NumberReturned>3</NumberReturned>

<TotalMatches>3</TotalMatches>

<UpdateID>1</UpdateID>

</u:BrowseResponse>

</s:Body>

</s:Envelope>
jesk
 
Posts: 5
Joined: Wed May 05, 2010 7:44 am
Location: Frankfurt, Germany

Re: About DLNA.ORG_PN attribute / protocolInfo

Postby jesk » Wed May 05, 2010 2:33 pm

Searching through the sourcecode I have just found in "net/pms/dlna/DLNAResource.java" this condition:

Code: Select all
                       else
                           dlnaspec = "DLNA.ORG_PN=" + getMPEG_PS_PALLocalizedValue(c);
                                } else if (mime.equals("image/jpeg"))
                                        dlnaspec = "DLNA.ORG_PN=JPEG_LRG";
                                else if (mime.equals("audio/mpeg"))
                                        dlnaspec = "DLNA.ORG_PN=MP3";
                                else if (mime.equals("audio/L16") || mime.equals("audio/wav"))
                                        dlnaspec = "DLNA.ORG_PN=LPCM";
                        }



It seems that the appropriate "DLNA.ORG_PN" type case for LPCM is already programmed in. But as the "protocolInfo"
attribute set by the PMS contains "l16" and not "L16" one could fear that that mime.equals() function is maybe case-sensitive
and doesn't recognise the LPCM type and leave the "protocolInfo" header attribute without setting "DLNA.ORG_PN".

As I don't have the faintest idea about Java this is just a presumption while trying to figure out what's going on...
Should I maybe cross-post to the developer forum?
jesk
 
Posts: 5
Joined: Wed May 05, 2010 7:44 am
Location: Frankfurt, Germany

Re: About DLNA.ORG_PN attribute / protocolInfo

Postby meskibob » Wed May 05, 2010 2:43 pm

Thread moved.
I provide NO application support via PM or email, so please post your question to the forum per the Forum Rules.
meskibob
Moderator
 
Posts: 4739
Joined: Mon Jan 19, 2009 4:11 pm

Re: About DLNA.ORG_PN attribute / protocolInfo

Postby jesk » Wed May 05, 2010 4:19 pm

I would like to test some changes on myself. Unfortunately I have never compiled Java files on my own.
Some suggestions would be nice, maybe I can help on the long run a bit (OS Windows and Linux). :-)

Will try to find some Java compiling howtos meanwhile ...
jesk
 
Posts: 5
Joined: Wed May 05, 2010 7:44 am
Location: Frankfurt, Germany

Re: About DLNA.ORG_PN attribute / protocolInfo

Postby taconaut » Wed May 05, 2010 4:28 pm

Try importing the project into eclipse and start by pressing the green play button. The main class is located in PMS. That should be enough info to start with :)
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: 1059
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

Re: About DLNA.ORG_PN attribute / protocolInfo

Postby jesk » Wed May 05, 2010 7:13 pm

Ok, got it running (Eclipse) and tested all kind of values with modifying the code.
PSM now succesfully sets LPCM in DLNA.ORG_PN, but unfortunately the TV still says "unsupported".

Maybe its because of the lower case "l" in "l16". Will try to find out where its set to test it with
upper case "L" -> "L16".
jesk
 
Posts: 5
Joined: Wed May 05, 2010 7:44 am
Location: Frankfurt, Germany

Re: About DLNA.ORG_PN attribute / protocolInfo

Postby tomeko » Thu May 06, 2010 9:20 pm

PS3MS can't stream LPCM streams. PS3MS stream wav as lpcm.
Only ffmpeg can produce real LPCM (s16be) audio stream (mplayer can't produce s16be, only s16le).
Read this: http://code.google.com/p/ps3mediaserver/issues/detail?id=457
tomeko
Project Member
 
Posts: 154
Joined: Sat Jun 06, 2009 11:02 am

Re: About DLNA.ORG_PN attribute / protocolInfo

Postby jesk » Fri May 07, 2010 6:51 am

Oh, thats a shame...

Is it architectural a bigger thing to implement it? If not I would like to give it a try...
jesk
 
Posts: 5
Joined: Wed May 05, 2010 7:44 am
Location: Frankfurt, Germany


Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests