If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Writing profiles for DLNA devices...

1235713

Comments

  • jmckeejmckee Posts: 5,030Members, Plex Pass, Plex Ninja Plex Ninja

    /photo/:/transcode?chromaSubsampling=4%3A2%3A2&format=jpg&height=120&url=http%3A%2F%2F127%2E0%2E0%2E1%3A32400%2F%3A%2Fresources%2Fdlna-icon-260%2Ejpg&width=120

    This is the Plex Media Server Icon sent by the server.  On most devices its seen when browsing for servers.  But thinking more on it, this is also the same way you get thumbnails for movies as well.the only difference I see is the width and height.

    /:/timeline?ratingKey=585&key=%2Flibrary%2Fmetadata%2F585&state=playing&playQueueItemID=3363&time=0&duration=3410464:

    As for your time question, its going to be based on what command you are using to play the video. you would be taking the time value, in the example above 0 which is the start of the video, and passing that through the get command, but looking at the other get commands the usually look like byte-range requests

    DEBUG - GET for http://192.168.1.168:32469/object/37f857abd74b90ce01e5/file.mp4 : bytes=872742912-876209839

    Was one I had in my in DLNA log

  • awvc1@hotmail.comawvc1@hotmail.com Posts: 20Members
    jmckee wrote on August 24 2014, 1:24 AM: »

    /photo/:/transcode?chromaSubsampling=4%3A2%3A2&format=jpg&height=120&url=http%3A%2F%2F127%2E0%2E0%2E1%3A32400%2F%3A%2Fresources%2Fdlna-icon-260%2Ejpg&width=120

    This is the Plex Media Server Icon sent by the server.  On most devices its seen when browsing for servers.  But thinking more on it, this is also the same way you get thumbnails for movies as well.the only difference I see is the width and height.

    /:/timeline?ratingKey=585&key=%2Flibrary%2Fmetadata%2F585&state=playing&playQueueItemID=3363&time=0&duration=3410464:

    As for your time question, its going to be based on what command you are using to play the video. you would be taking the time value, in the example above 0 which is the start of the video, and passing that through the get command, but looking at the other get commands the usually look like byte-range requests

    DEBUG - GET for http://192.168.1.168:32469/object/37f857abd74b90ce01e5/file.mp4 : bytes=872742912-876209839

    Was one I had in my in DLNA log

    ah ok. well thanks for that info. Tbh I just pull the 'thumb' parameter from the xml for video item i want and retrieve that e.g. :

    http://XX.XX.XX.XX:32400/library/metadata/13340/thumb/1408657486?X-Plex-Token=XXXXX

     

    Is that bad practice for any reason?

     

     

    Regarding the timeline item - 

     

    so does the /:/timeline endpoint play a video from the specified point then?

     

    typically, example  endpoints for playing the way i have done it are either:

     

    http://XX.XX.XX.XX:32400/library/parts/12535/file.avi?X-Plex-Token=XXXXXX

     

    or

     

    http://XX.XX.XX.XX:32400/video/:/transcode/universal/start.m3u8?protocol=hls&videoResolution=576x320&directStream=1&maxVideoBitrate=720&subtitleSize=100&videoQuality=40&fastSeek=1&session=8a6402afca6ca303-com-plexapp-android&path=%2Flibrary%2Fmetadata%2F13340&audioBoost=100&directPlay=0&X-Plex-Platform-Version=4.3&X-Plex-Account=XXXXX&X-Plex-Product=Plex%20for%20Android&X-Plex-Version=3.4.8.177&X-Plex-Platform=Android&X-Plex-Device=Z30

  • webcajuwebcaju Posts: 53Members ✭✭
    I was testing on the Samsung TV and to my surprise there I can change the audio track. 
     
    QI received in that it connects through Samsung's AllShare to Plex, does it influence?
  • jmckeejmckee Posts: 5,030Members, Plex Pass, Plex Ninja Plex Ninja
    awvc1@hotmail.com wrote on August 24 2014, 1:34 PM: »

    Playing around with the URL commands I was able to have it report the options for time but it never started anywhere but the beginning.  I believe it has something to do with the playqueue as when I was checking with PHT when it would resume mid movie the command was changed to involve the playqueues.  I don't however know of a way to pull those values and test.

  • jmckeejmckee Posts: 5,030Members, Plex Pass, Plex Ninja Plex Ninja
    webcaju wrote on August 25 2014, 9:09 PM: »
    I was testing on the Samsung TV and to my surprise there I can change the audio track. 
     
    QI received in that it connects through Samsung's AllShare to Plex, does it influence?

    It could be a TV limitation for your LG. If it only supports one track over DLNA, then you would get only the one track.  From what I have seen, you have tried everything possible to get the 2nd track to be sent to the LG with no luck.

  • webcajuwebcaju Posts: 53Members ✭✭

    Actually try to search on the tv app to see if I have any idea how to get access both languages​​, thanks for the help ...

  • awvc1@hotmail.comawvc1@hotmail.com Posts: 20Members
    jmckee wrote on August 26 2014, 12:53 AM: »

    Playing around with the URL commands I was able to have it report the options for time but it never started anywhere but the beginning.  I believe it has something to do with the playqueue as when I was checking with PHT when it would resume mid movie the command was changed to involve the playqueues.  I don't however know of a way to pull those values and test.

    ah ok.  Well, if it helps you, i found that when transcoding, the offset parameter when used, in seconds, starts x number of seconds into the video. but only if you are doing a transcode. My problem is working out what the heck the timeline url actually does - does it start a vid playing or just update the viewoffset parameter in the metadata do you think?

  • webcajuwebcaju Posts: 53Members ✭✭
    So I did the next test, I installed the Plex app for LG and it could choose audio tracks. 
     
    Today I sent an email to LG reporting this bug native Plex, but I think it will solve nothing, then stay with the same Plex for LG...
  • jmckeejmckee Posts: 5,030Members, Plex Pass, Plex Ninja Plex Ninja
    awvc1@hotmail.com wrote on August 26 2014, 11:40 PM: »

    ah ok.  Well, if it helps you, i found that when transcoding, the offset parameter when used, in seconds, starts x number of seconds into the video. but only if you are doing a transcode. My problem is working out what the heck the timeline url actually does - does it start a vid playing or just update the viewoffset parameter in the metadata do you think?

    I believe the timeline state is just to update the metadata so you can attempt to resume later.

  • awvc1@hotmail.comawvc1@hotmail.com Posts: 20Members
    jmckee wrote on August 27 2014, 1:16 AM: »

    I believe the timeline state is just to update the metadata so you can attempt to resume later.

    thanks, i just got this endpoint to do exactly that:

    http://xx.xx.xx.xx:32400/:/timeline?containerKey=%2fplayQueues%2f40&duration=5485704&guid=com.plexapp.agents.imdb%3a%2f%2ftt0078869%3flang%3den&key=%2flibrary%2fmetadata%2f121&playQueueItemID=40&X-Plex-Client-Identifier=XXXXXXXXXXXXXXXXXXXXXXXXXX&ratingKey=121&state=stopped&time=120000

    this example successfully updates the media item in this case to say the viewoffset is 120000 ms. (2 mins)

    I don't suppose you know what the containerKey parameters reference to playqueues are all about though do you, or how to find the containerKey or the  playQueueItemID? 

    btw, I mentioned this url before - I also noticed in the last few days for me this stopped working:

    http://xx.xx.xx.xx:32400/:/progress?key=121&identifier=com.plexapp.plugins.library&time=5253

     

    i think somethign must have changed very recently for me, probably on a recent server update

  • ian78ian78 Posts: 262Members, Plex Pass Plex Pass
    Does anyone have a profile I can use for the Xbox one to force transcode of DTS audio?
  • Bigmonty69Bigmonty69 Posts: 72Members, Plex Pass Plex Pass
    ian78 wrote on September 11 2014, 9:48 PM: »

    Does anyone have a profile I can use for the Xbox one to force transcode of DTS audio?

    Yeah I would like this as well if anyone had prepared one themselves.

  • plexcabbplexcabb Posts: 104Members, Plex Pass Plex Pass

    Thank you sharing the information. I'm wondering if someone has tried creating DLNA profile(s) for Vizio TV.

    Per my understanding Vizio TV are not DLNA certified but they are DLNA enabled.  I'm not sure what's the difference it makes compared to DLNA certified device. 

    As it's now, the DLNA client on my Vizio TV seems limited in terms of codecs support.  Vizio has not provided Plex App on TV yet. 

    I'm going to follow this documentation and see if I can make use of it for playing videos on my TV.  

  • jmckeejmckee Posts: 5,030Members, Plex Pass, Plex Ninja Plex Ninja
    edited September 2014
    plexcabb wrote on September 21 2014, 5:23 AM: »

    Thank you sharing the information. I'm wondering if someone has tried creating DLNA profile(s) for Vizio TV.

    Per my understanding Vizio TV are not DLNA certified but they are DLNA enabled.  I'm not sure what's the difference it makes compared to DLNA certified device. 

    As it's now, the DLNA client on my Vizio TV seems limited in terms of codecs support.  Vizio has not provided Plex App on TV yet. 

    I'm going to follow this documentation and see if I can make use of it for playing videos on my TV.  

    From what I have seen the biggest challenge with the Vizio's is that most of them don't send a header when making requests and they don't show up in devicespy so trying to get a profile to match to them is pretty hard.

  • tyrsis00tyrsis00 Posts: 2Members, Plex Pass

    I'm new to DLNA.  I've been reading through the posts, but I'm still a bit vague on how to actually build a full profile.  I need what I think will be a fairly simple one.  My TV is a Sony Bravia KDL-52W5100, several years old.  It can only handle MPEG-2 PS (mpg) and MPEG-2 TS (mpg and m2t).  Here are a few lines from the log:

    Sep 21, 2014 19:36:37:159 [2156] DEBUG - OnGetProtocolInfo from xxx.xxx.xxx.xxx
    Sep 21, 2014 19:36:37:160 [2156] DEBUG - Mapped client to generic profile: X-AV-Physical-Unit-Info: pa="BRAVIA KDL-52W5100";; X-AV-Client-Info: av=5.0; cn="Sony Corporation"; mn="BRAVIA KDL-52W5100"; mv="1.7";; Host: xxx.xxx.xxx.xxx:32469; User-Agent: UPnP/1.0 DLNADOC/1.50; Content-Length: 273; Content-Type: text/xml; charset="utf-8"; SOAPACTION: "urn:schemas-upnp-org:service:ConnectionManager:1#GetProtocolInfo"
     
    Sorry, I had to mask out the IP addresses.
     
    Can anyone help me figure out a profile?
  • jmckeejmckee Posts: 5,030Members, Plex Pass, Plex Ninja Plex Ninja
    tyrsis00 wrote on October 1 2014, 3:50 AM: »

    I'm new to DLNA.  I've been reading through the posts, but I'm still a bit vague on how to actually build a full profile.  I need what I think will be a fairly simple one.  My TV is a Sony Bravia KDL-52W5100, several years old.  It can only handle MPEG-2 PS (mpg) and MPEG-2 TS (mpg and m2t).  Here are a few lines from the log:

    Sep 21, 2014 19:36:37:159 [2156] DEBUG - OnGetProtocolInfo from xxx.xxx.xxx.xxx
    Sep 21, 2014 19:36:37:160 [2156] DEBUG - Mapped client to generic profile: X-AV-Physical-Unit-Info: pa="BRAVIA KDL-52W5100";; X-AV-Client-Info: av=5.0; cn="Sony Corporation"; mn="BRAVIA KDL-52W5100"; mv="1.7";; Host: xxx.xxx.xxx.xxx:32469; User-Agent: UPnP/1.0 DLNADOC/1.50; Content-Length: 273; Content-Type: text/xml; charset="utf-8"; SOAPACTION: "urn:schemas-upnp-org:service:ConnectionManager:1#GetProtocolInfo"
     
    Sorry, I had to mask out the IP addresses.
     
    Can anyone help me figure out a profile?

    This is modified from the 2010 profile to match your device's name should have basic capabilities that semi match your requirements.  Only thing you might need to change are the audiocodecs.

  • net23net23 Posts: 27Members ✭✭
    edited October 2014
    mfeingol wrote on July 8 2013, 11:22 PM: »

    The initial release of Plex Media Server's DLNA support comes with profiles that support a few devices, including Xbox 360 and PlayStation 3. Over time new profiles will be added as we test new devices and as our friends in these forums post working profiles for us to use.

    {...}

    Failing that, you may be able to find information using a search engine, via the device's GetProtocolInfo method, or via ad-hoc experimentation. Other DLNA server products have put together similar profiles, and sometimes we reuse information from those, since we're all in this together. Such is the nature of DLNA. :)

    {...}

    One thing that's VERY IMPORTANT: when creating profiles for other people to use, you have to think about the device ecosystem in which your profile will be used. Most people using Plex Media Server won't have your device, but they may have a different device that sends vaguely similar headers. So when authoring this section, PLEASE make sure you're being as restrictive as possible when writing substrings or regular expressions for Header elements. Overly broad header elements can cause erroneous profiles matching, which people will find immensely confusing.

    A DeviceDescription element allows the profile to detect clients using the properties they advertise in their device XML when responding to a search request. This is useful when a device does not provide a distinctive HTTP header on each request. For performance reasons, the HTTP header mechanism is preferable, when possible.

    What happens when you have 2 devices from different manufacturers which send identical headers?  For example, I have a Panasonic Blu-Ray player which reports the following user agent:

    IPI/1.0 UPnP/1.0 DLNADOC/1.50

    Some other Panasonic models actually use the word "Panasonic" in the user-agent string, but my model does not.  I also know that some other TV's and Blu-Ray players report the same user-agent, but I am not sure what capabilities are being expressed in the user-agent string.

    Does Plex actually do something with the data in this user-agent that it would not do if the field was empty?

    Would the presence or absence of the information in this string affect what I should put in a custom profile?

    Since this string will match on devices from different manufacturers, does this mean that every device with the same user-agent will support the same codecs and containers which my Panasonic supports?

    If I am using a Plex server which does not support transcoding, is there any benefit in creating a separate profile for devices which have this same user-agent, or would the generic profile already address this?

    ________

    Some other ideas:

    It might be helpful if the server had a test function that would throw every media type at the client in sequence, so we could confirm that Plex is working with everything the manufacturer claims to support.  How can you inform the user when he should do something to make his device function better with Plex?  Would it make sense to create a profile-building application that lets you fill out a check-list of the media types which the device is known to support, and then it would generate a compatible profile?

    When I see that my player works correctly with some DLNA servers, but not with others, the DLNA certification seems meaningless to me unless the servers are "certified" too.

  • jmckeejmckee Posts: 5,030Members, Plex Pass, Plex Ninja Plex Ninja
    net23 wrote on October 7 2014, 5:46 AM: »

    Some other Panasonic models actually use the word "Panasonic" in the user-agent string, but my model does not.  I also know that some other TV's and Blu-Ray players report the same user-agent, but I am not sure what capabilities are being expressed in the user-agent string.

    Does Plex actually do something with the data in this user-agent that it would not do if the field was empty?

    Would the presence or absence of the information in this string affect what I should put in a custom profile?

    When you have a device that is matching to more than one profile you add in device identifiers with the devicedescription tags.  These are hardware identifiers that allow plex to still match the device if you have a user agent used by multiple profiles or no user agent at all.

    No capabilities are being sent through the user agent string. in your exact string it is reporting version numbers of various protocols.  For my LG it simply reports that it is an LG SDK.

    All Plex will do with the data is use it to match to a profile.  If it is empty Plex can't match it.  As mentioned a little bit up, if the device isn't reporting a user agent, you should be using devicedescription tags to get a match.

    net23 wrote on October 7 2014, 5:46 AM: »

    Since this string will match on devices from different manufacturers, does this mean that every device with the same user-agent will support the same codecs and containers which my Panasonic supports?

    No.  The user-agent has absolutely nothing to do with supported codecs or containers it is simply one of the ways a device identifies itself on the network.

    net23 wrote on October 7 2014, 5:46 AM: »

    If I am using a Plex server which does not support transcoding, is there any benefit in creating a separate profile for devices which have this same user-agent, or would the generic profile already address this?

    If you are using a server which does not support transcoding that best thing is to use the generic profile.  This simply sends the file as-is to the device for playback.  You will run into issues if the device does not support the container/codecs but since the server doesn't support transcoding anyway then the generic profile would be fine.  The only exception I could think of is some devices that need a small setting change to allow artwork to show or a problem with folders with additional information reported.  So if artwork isn't showing up or your can't browse the folders you could make a custom profile to try and get it to work.

  • net23net23 Posts: 27Members ✭✭
    J_McKee wrote on October 7 2014, 7:42 AM: »

    If you are using a server which does not support transcoding that best thing is to use the generic profile.  This simply sends the file as-is to the device for playback.  You will run into issues if the device does not support the container/codecs but since the server doesn't support transcoding anyway then the generic profile would be fine.

    Thanks for the detailed reply; I think it will help many others.  What I am most concerned with today are those cases where the client does support the container/codecs and the media still wont play with the generic profile:

    What about situations where a video plays in the Plex browser client, but does not play in the Plex native client, and it only plays on the DLNA TV from Serviio or Universal Media Server (not from PMS) ?  Should I presume that Plex needs custom profiles for the TV and the native Plex client, or should I conclude that the server is buggy and wait for an update?

    If Plex has a bug, where should I report it?  (I cannot find the bug tracker system).

    Why do software DLNA clients such as VLC and Windows Media Player not work with the Plex DLNA server, but do work with other media servers?  Is this a known issue?  Does it affect all Plex servers, or just some particular hardware & OS platforms?

    If the generic profile causes the server to send everything, but media which my device can play is not being played, I am a little confused now about whether I should be trying to create a custom profile if it will not enable playback of media that already works on my clients when it comes from other media servers.  Is there a comprehensive guide to configuring other server settings which might explain how to resolve these client compatibility issues?

     

  • jmckeejmckee Posts: 5,030Members, Plex Pass, Plex Ninja Plex Ninja
    net23 wrote on October 8 2014, 1:35 AM: »

    Thanks for the detailed reply; I think it will help many others.  What I am most concerned with today are those cases where the client does support the container/codecs and the media still wont play with the generic profile:

    Unless there is some other problem with the video file, that should not happen.  If your device can play the media files then it can, if it can't play that file it can't.  It is the equivalent of double clicking your file to play it in windows. Having a profile isn't going to change that.  All a profile is going to do is change what the server thinks your device can play, and from that if your profile can't play it then the server will try and transcode it to something that can.  Adding a profile will not give your device extra capabilities, rather it is there to limit what gets sent to the device.

    net23 wrote on October 8 2014, 1:35 AM: »

    What about situations where a video plays in the Plex browser client, but does not play in the Plex native client, and it only plays on the DLNA TV from Serviio or Universal Media Server (not from PMS) ?  Should I presume that Plex needs custom profiles for the TV and the native Plex client, or should I conclude that the server is buggy and wait for an update?

    This has a lot so I will try not to jump around too much in a response.

    The web manager already has profiles setup for browsers and for the most part is pretty limited to what can actually be directplayed.

    Which Plex native client are you referring to as that makes a big difference? The client on LG's is "supported" (I believe it hit EoL as they no longer use it on new models) by LG directly, the new LG app for newer models is developed by a forum user, the Samsung App was started by a forum user and is maintained by him (I believe it hit its last update for older models recently), And all of those will behave differently from clients on the Android or Plex Home Theater.  

    Why it plays on one server vs another comes down to a lot.  The most common difference I have seen is subtitles.  Over DLNA the only way plex handles external srt files is by transcoding so if you try and enable the subtitles the server must transcode the file and if your on the generic profile the file gets sent without subtiles, if you have a custom profile the subtitles are sent burned into the video stream, if you have a custom profile that doesn't work correctly you get errors.  The only difference I have seen has been with transcoded streams and in those I found UMS/Serviio to have extra options in their profiles that let me create profile that would transcode.  Not that it was any easier, but the extra options did make it work.  I actually had both a Plex and UMS server running side by side just to play transcoded streams to my LG until I bought a FireTV.  After that I only run the Plex server because my PS3 works fine over DLNA, the FireTV uses the Android App, and on our PC's I use Plex Home Theater.  But more specifically, you would have to start looking at the logs to figure out if it is a bug in the server or something else causing faulty playback.  Just "It wont play" won't be enough for anyone to try and recreate or debug the issue.

    net23 wrote on October 8 2014, 1:35 AM: »

    If Plex has a bug, where should I report it?  (I cannot find the bug tracker system).
     

    This is going to vary.  Since you keep mentioning the Native Plex App if it is a bug in the client (Which is more likely) it would be in the respective forum to that app, if it is in the server you can usually post in the server board for the OS you are using.  Plex Ninja's will normally read the posts try some troubleshooting with you/request logs before sending the information to the developers.  If you get a PlexPass there is also additional boards you could post on or check.

    net23 wrote on October 8 2014, 1:35 AM: »

    Why do software DLNA clients such as VLC and Windows Media Player not work with the Plex DLNA server, but do work with other media servers?  Is this a known issue?  Does it affect all Plex servers, or just some particular hardware & OS platforms?

    Working with other media servers is relative.  When I tried using WMP with my Twonky server it just gave me a list of every single video file on the drive.  If I tried to select by folder it just called it a video folder and threw them all in there.  Trying to find a specific video file in a list of 8,000 isn't working well in my opinion.  I tried it with UMS and got the same thing as Plex "No files have been found on this remote library".  Personally, I believe that if you want to use Plex I would look at Plex Home Theater or XBMC with PleXBMC add-on over VLC/WMP for DLNA content playback.  Either option will give you full playback along with the all the artwork and structure that Plex provides.

    net23 wrote on October 8 2014, 1:35 AM: »

    If the generic profile causes the server to send everything, but media which my device can play is not being played, I am a little confused now about whether I should be trying to create a custom profile if it will not enable playback of media that already works on my clients when it comes from other media servers.  Is there a comprehensive guide to configuring other server settings which might explain how to resolve these client compatibility issues?

    You are going to be more specific.  If you're using a Plex client (TV app or something) then it is already using it's own form of profile, most of which are built into the app itself.  If your just using a DLNA browser from a TV and it is not playing, I would look at what profile your TV is using on the other server and see if it is indeed remuxing audio/container or something else which should also be visible in the logs.

    But the it works on one thing but not another is not enough to try and diagnose the problem.  If it is working on one server we would need to know what profile/settings/logs from the other server is using, the mediainfo for the file, how you are trying to play the file from plex (App/Dlna), and a log after trying to play the file from Plex where it isn't working.

Sign In or Register to comment.