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...

145791012

Comments

  • jmckeejmckee Posts: 5,012Members, Plex Pass, Plex Ninja Plex Ninja
    asai wrote on December 27 2014, 1:38 PM: »

    So if I remove the line with mpegts from the directplay section, this could be the solution?

    Or is there anything else I need to do?

    If you removed mpegts from the directplay section because the TV doesn't support mpegts, then you'll need to pick another target to transcode into with your transcode targetsection. The most common used are: mpeg (which is mpegps), mpegts (which you said doesn't work), but you could also try mkv,avi, or asf

    Checking your latest log, while the profile is now being read, it still isn't being used as the device looks like it is mapping to the generic profile still.  You can try adding an addition header into the identification section to see if it helps (the following is just the user-agent I saw in the file):

    <Identification>
       <Header name="User-Agent" substring="IPI/1.0 UPnP/1.0" />

       <DeviceDescription type="urn:schemas-upnp-org:device:MediaRenderer:1">
          <FriendlyName substring="TV-120"/>
          <ModelName substring="NFLC SDK v1.5"/>
          <ModelNumber substring="1.0"/>
          <ModelUrl substring="http://www.access-company.com/"/>
          <ModelDescription substring="IPI Media Renderer"/>
          <Manufacturer substring="ACCESS CO.,LTD."/>
          <ManufacturerUrl substring="http://www.access-company.com/"/>
       </DeviceDescription>

    </Identification>

  • asaiasai Posts: 15Members ✭✭

    Getting closer.

    Dec 27, 2014 15:29:07:681 [7292] ERROR - ClientProfileReader::readTranscodeTargets - ambiguous video transcode target
    Dec 27, 2014 15:29:07:681 [7292] ERROR - ClientProfileReader::readProfile - unable to read TranscodeTargets element
    Dec 27, 2014 15:29:07:681 [7292] ERROR - Unable to read client profile file: C:\Users\Terje\AppData\Local\Plex Media Server\Profiles\TV-120.xml
    
    

    However some errors. What could do this?

  • jmckeejmckee Posts: 5,012Members, Plex Pass, Plex Ninja Plex Ninja
    asai wrote on December 27 2014, 2:31 PM: »

    Getting closer.

    Dec 27, 2014 15:29:07:681 [7292] ERROR - ClientProfileReader::readTranscodeTargets - ambiguous video transcode target
    Dec 27, 2014 15:29:07:681 [7292] ERROR - ClientProfileReader::readProfile - unable to read TranscodeTargets element
    Dec 27, 2014 15:29:07:681 [7292] ERROR - Unable to read client profile file: C:\Users\Terje\AppData\Local\Plex Media Server\Profiles\TV-120.xml
    
    

    However some errors. What could do this?

    Did you try and add more than one of the containers to the transcode target?  Unfortunately, you can only test that out one at a time.  If you have more than one it causes errors.

  • asaiasai Posts: 15Members ✭✭
    edited December 2014
    J_McKee wrote on December 27 2014, 2:45 PM: »

    Did you try and add more than one of the containers to the transcode target?  Unfortunately, you can only test that out one at a time.  If you have more than one it causes errors.

    I have tried that, and now theres no error. The profile seems to work, however it doesn't transcode correctly.

    Line from the profile:

    <VideoProfile container="mpegts" codec="avi" audioCodec="mp3" />
    

    Lines from the log file:

    Dec 27, 2014 15:45:48:470 [1800] DEBUG - MDE: analyzing media 0
    Dec 27, 2014 15:45:48:470 [1800] DEBUG - MDE: analyzing photo part 0: jpeg
    Dec 27, 2014 15:45:48:470 [1800] DEBUG - MDE: Album Art: jpeg is not a directplay photo profile
    Dec 27, 2014 15:45:48:474 [1800] DEBUG - OnBrowseDirectChildren returning success with 26 objects of 26 total
    Dec 27, 2014 15:45:48:729 [8632] DEBUG - PlexMediaConnectDelegate::OnBrowseDirectChildren for 'bd913ca400b4e984128f' with filter 'dc:date,res,res@resolution,res@protocolInfo,res@size,res@bitrate,res@sampleFrequency,res@bitsPerSample,res@nrAudioChannels,res@duration,res@colorDepth' and sort '', paged as 0 + 30
    Dec 27, 2014 15:45:48:729 [8632] DEBUG - Mapped client to profile TV-120 using header User-Agent: IPI/1.0 UPnP/1.0 DLNADOC/1.50
    Dec 27, 2014 15:45:48:729 [8632] DEBUG - Mapped object bd913ca400b4e984128f to /library/metadata/63896/children part 0 on server http://127.0.0.1:32400/
    Dec 27, 2014 15:45:48:729 [8632] DEBUG - Downloading document http://127.0.0.1:32400/library/metadata/63896/children
    Dec 27, 2014 15:45:48:729 [8632] DEBUG - Cache hit for document http://127.0.0.1:32400/library/metadata/63896/children
    Dec 27, 2014 15:45:48:730 [8632] DEBUG - Downloading document http://127.0.0.1:32400/library/metadata/63897,63908,63916,63917,63918,63919,63920,63921,63922,63898,63899,63900,63901,63902,63903,63904,63905,63906,63907,63909,63910,63911,63912,63913,63914,63915
    Dec 27, 2014 15:45:48:730 [8632] DEBUG - Cache hit for document http://127.0.0.1:32400/library/metadata/63897,63908,63916,63917,63918,63919,63920,63921,63922,63898,63899,63900,63901,63902,63903,63904,63905,63906,63907,63909,63910,63911,63912,63913,63914,63915
    Dec 27, 2014 15:45:48:733 [8632] DEBUG - MDE: analyzing media 0
    Dec 27, 2014 15:45:48:733 [8632] DEBUG - MDE: analyzing video part 61890: mp4/h264/aac/
    Dec 27, 2014 15:45:48:733 [8632] DEBUG - MDE: selected video transcode profile: http - mpegts/avi/mp3/
    Dec 27, 2014 15:45:48:733 [8632] DEBUG - MDE: S01E01 - Episode 1: mp4/h264/aac is not a directplay video profile
     
    Looks like I am getting closer, but not completly there yet.  :rolleyes:
  • jmckeejmckee Posts: 5,012Members, Plex Pass, Plex Ninja Plex Ninja
    edited December 2014
    asai wrote on December 27 2014, 2:56 PM: »
    <VideoProfile container="mpegts" codec="avi" audioCodec="mp3" />

    AVI is a container not a codec ;)

    This would be a pretty basic start:

    <VideoProfile container="avi" codec="h264" audioCodec="mp3" />

    After you start getting it working you can try and change the audiocodec to ac3 if you want:

    <VideoProfile container="avi" codec="h264" audioCodec="ac3" />

    I am basing the codecs off of what is in the original profile you linked to, so I don't know if they are actually working just for a heads up.

  • asaiasai Posts: 15Members ✭✭
    edited December 2014

    Sorry... very happy for all the good help.  :)

    When I try to play the file in VLC I get this info:

    Codec: H264 - MPEG-4 AVC (part 10) (avc1)
    

    The strange thing is that when I look at a MKV file that plays perfect from my TV, it has the same line.

    And the line in my profile looks like this:

    <VideoProfile container="mpegts" codec="mpeg4" audioCodec="ac3" />
    

    But no success yet.  :(

    What does this mean:

    Dec 27, 2014 17:14:23:993 [7132] DEBUG - MDE: analyzing video part 334: avi/mpeg4/mp3/
    Dec 27, 2014 17:14:23:993 [7132] DEBUG - MDE: selected video transcode profile: http - mpegts/mpeg4/ac3/
    Dec 27, 2014 17:14:23:993 [7132] DEBUG - MDE: The China Syndrome (1979): avi/mpeg4/mp3 is not a directplay video profile
    Dec 27, 2014 17:14:23:993 [7132] DEBUG - MDE: avoiding remux of avi/mpeg4
    
    
  • jmckeejmckee Posts: 5,012Members, Plex Pass, Plex Ninja Plex Ninja
    asai wrote on December 27 2014, 3:47 PM: »

    What does this mean:

    Dec 27, 2014 17:14:23:993 [7132] DEBUG - MDE: analyzing video part 334: avi/mpeg4/mp3/
    Dec 27, 2014 17:14:23:993 [7132] DEBUG - MDE: selected video transcode profile: http - mpegts/mpeg4/ac3/
    Dec 27, 2014 17:14:23:993 [7132] DEBUG - MDE: The China Syndrome (1979): avi/mpeg4/mp3 is not a directplay video profile
    Dec 27, 2014 17:14:23:993 [7132] DEBUG - MDE: avoiding remux of avi/mpeg4
    
    

    The avoiding remux usually means that the server has to transcode the video rather then remuxing (changing container).

    Unfortunately, you're at the stage where now it is trial and error until you find a format your TV likes to play.

  • asaiasai Posts: 15Members ✭✭

    You have been very helpful.

    Is there a list of different settings I can try out in my profile?

    <VideoProfile container="mp4" codec="h264" audioCodec="ac3" />
    
  • jmckeejmckee Posts: 5,012Members, Plex Pass, Plex Ninja Plex Ninja
    asai wrote on December 28 2014, 8:37 AM: »

    You have been very helpful.

    Is there a list of different settings I can try out in my profile?

    <VideoProfile container="mp4" codec="h264" audioCodec="ac3" />
    

    Settings wise, I would look at the Playstation 3/Xbox 360 profiles.  You may not be able to use a lot of them, but they give you a template of available options.  Looking at the device desciption I am actually not too sure what kind of TV you have.

    If you're still trying to get a Transcode Target that works what I normally do is try the DirectPlay Profile one by one.  For example with the asf line:

    <VideoProfile container="asf" codec="h264,mpeg4,mjpeg" audioCodec="mp3,ac3,wmav2,wmapro,wmavoice"/>

    I would try the following one at a time:

    <VideoProfile container="asf" codec="h264" audioCodec="mp3,ac3"/>

    If that one didn't work I would try the following:

    <VideoProfile container="asf" codec="mpeg4" audioCodec="mp3,ac3"/>

    And if neither of those worked I would move on to avi and try the same thing.

    With transcode targets you can leave in more than one audio format, what it tells the server is if the original file was ac3 keep it, otherwise transcode it to mp3.  It has been hit or miss on how well it works, but it won't cause any glaring errors.

    Now if you're looking for more DirectPlay options, normally you would look at the manufacturers list of codecs and if you don't have that you basically have to try it and see if it works with a test video.  I use a 30 second Dolby Clip I have converted in to a few different combinations for a quick reference.

  • asaiasai Posts: 15Members ✭✭

    Thanks for all help, but I give up. Have now tried out most options I think, but no success.  :unsure:

    Instead I found a nice app for my phone where I can connect to my Plex server and display it on my smart tv.

    Works great. Even better would be if the Plex app could do the same, but that's a question for another forum thread.  :)

  • JosePiratillaJosePiratilla Posts: 15Members, Plex Pass Plex Pass

    Starting to write a profile for the PLAYz application for LG Smart TV's.

    Using the generic profile it works well for me, except when having DTS audio with MKV files. I contacted the LG support service and they provided me this compatibility chart:
    CODECS_NETCAST_4_5_2014_3.jpg
    imagen jpg
    So, it seems that the combination is not supported. I want to create a profile that converts DTS audio to AC3. I tried to create an always transcode profile, but seems that it is ignoring it (but the client is correctly mapped to the profile). ¿Can the client override the DLNA profile settings?

    <?xml version="1.0" encoding="utf-8"?>
    <Client name="LG">
    	<Identification>
    		<Header name="User-Agent" substring="55UB820V" />
    	</Identification>
    	<TranscodeTargets>
    		<VideoProfile container="mkv" codec="h264" audioCodec="ac3" />
    	</TranscodeTargets>
    </Client>
    
    
  • jmckeejmckee Posts: 5,012Members, Plex Pass, Plex Ninja Plex Ninja
    JosePiratilla wrote on December 31 2014, 8:59 AM: »

    Starting to write a profile for the PLAYz application for LG Smart TV's.

    This isn't going to work.  Client's don't use DLNA profiles and typically will do the Media Decision(decision to direct play/direct stream/transcode) on the app itself.  Its been awhile since I looked at the Playz app, but last I remember it specifically requested streams and things that weren't compatible requested transcodes automatically without referencing anything external.

    The profile snipped you have will only match if the TV is sending a user-agent with 55UB820V when making contact with the server.  Because you have no directplay section that profile will tell the server to transcode everything to mkv/h264/ac3 (And transcoding to mkv isn't normally recommended, but might be better now than it was originally)

  • JosePiratillaJosePiratilla Posts: 15Members, Plex Pass Plex Pass
    J_McKee wrote on December 31 2014, 9:33 AM: »

    This isn't going to work.  Client's don't use DLNA profiles and typically will do the Media Decision(decision to direct play/direct stream/transcode) on the app itself.  Its been awhile since I looked at the Playz app, but last I remember it specifically requested streams and things that weren't compatible requested transcodes automatically without referencing anything external.

    The profile snipped you have will only match if the TV is sending a user-agent with 55UB820V when making contact with the server.  Because you have no directplay section that profile will tell the server to transcode everything to mkv/h264/ac3 (And transcoding to mkv isn't normally recommended, but might be better now than it was originally)

    Thanks for the answer. It was a proof of concept. But as you pointed it seems that the client is not applying any DLNA profile. Maybe the TV is also connecting by itself through the medialink and thats the decive and client I see on the DLNA logs. Thanks for the answer.

  • czukowskiczukowski Posts: 154Members ✭✭✭
    edited January 2015

    Maybe it's mentioned somewhere already, but I've had to found out myself, so anyway:

    Perhaps it's worth pointing out in the How do I know if my user profiles are being used section that the 'Reading user client' log lines will list the XML filename (for example Samsung Smart TV Copy.xml, just without the extension) and not the value from the <Client name="Samsung RM48D">:

    Jan 12, 2015 20:30:07:836 [6580] DEBUG - Reading system DLNA client profiles
    Jan 12, 2015 20:30:07:867 [6580] DEBUG - Reading user client profile Samsung Smart TV Copy

    At the same time the 'device will use' log will output the value of the <Client name="Samsung RM48D">

    Jan 12, 2015 20:30:09:517 [6280] DEBUG - Device [Signage]RM48D at 192.168.0.165 will use Samsung RM48D profile
  • ZenoxioZenoxio Posts: 32Members ✭✭

    Can anyone explain where dlnaclientprofiles.xml is located? I have nothing Plex related on my C drive, I did not pick that drive during install. I picked my G drive (a SSD).

  • jmckeejmckee Posts: 5,012Members, Plex Pass, Plex Ninja Plex Ninja
    Zenoxio wrote on February 26 2015, 12:53 AM: »

    Can anyone explain where dlnaclientprofiles.xml is located? I have nothing Plex related on my C drive, I did not pick that drive during install. I picked my G drive (a SSD).

    DLNAclientprofiles is no longer used.  You need to edit the profile for the exact device you want to modify.

    If you installed in your G Drive it will looks something like:

    G:\Plex Media Server\Resources\Profiles

    *From your previous post it will be the Playstation 3.xml file that needs to be modified

  • ZenoxioZenoxio Posts: 32Members ✭✭

    I have this on my G drive: G:\TempPlexCache\Plex Media Server\

    But there's no Profiles folder. I did create one, but no Playstation3 XML showed up.

  • keithsuddickkeithsuddick Posts: 10Members ✭✭

    Every so often I get annoyed about the fact my Humax HD-Fox-T2 and PMS refuse to work with each other and I trawl the Internet looking for fresh inspiration on how I might make them work.  It's one of those times again.

    One of the problems is that the Humax box does not seem to clearly or consistently identify itself to PMS - when it browses a folder, say, it sends a string that I can use to select a specific profile, but, when it requests a file it doesn't seem to send anything in terms of identification so PMS reverts to the generic profile.  So, I've been tinkering with a generic profile but still haven't gotten anywhere useful and I'm wondering if it's because it's switching between the 2 profiles.

    On re-reading this topic I noticed the opening post includes the statement:

    Two different identification mechanisms are used by the server: incoming HTTP header recognition, and IP address matching based on a-priori network discovery.

    Can someone explain the "IP address matching" part or tell me how to make it happen - that would certainly solve one of my problems, I can easily arrange for the Humax box to have a known IP address.

    I've also noticed much of the advice on writing profiles seems to be "go look at other profiles".  As a coder I can appreciate that approach but is there not a definitive, comprehensive list of all the tags and elements and so on that are valid within a profile's xml?

    - jarsudsco

  • jmckeejmckee Posts: 5,012Members, Plex Pass, Plex Ninja Plex Ninja
    Jarsudsco wrote on March 12 2015, 12:45 PM: »

    Can someone explain the "IP address matching" part or tell me how to make it happen - that would certainly solve one of my problems, I can easily arrange for the Humax box to have a known IP address.

    I've also noticed much of the advice on writing profiles seems to be "go look at other profiles".  As a coder I can appreciate that approach but is there not a definitive, comprehensive list of all the tags and elements and so on that are valid within a profile's xml?

    - jarsudsco

    Never seen it work that way.  I only know of two ways for matching to work: Matching the HTTP header and matching the Device Description markers that the device reports when connecting.  The 2nd way is normally what you have to do when no HTTP headers are sent or the device switches between the two modes when connecting.  The only way I know to access these is using Device Spy from UPNP development tools.  There may be another way but, I haven't seen one and don't know it.

    There is also not a comprehensive list of all tags and elements listed, at least not one I have ever seen.  I normally reference the Android, Xbox 360, and Playstation 3 profiles to get the best mix of available options.  For the most part limitations can be anything you can pull from an individual items xml from the web manager.

  • jmckeejmckee Posts: 5,012Members, Plex Pass, Plex Ninja Plex Ninja
    Zenoxio wrote on February 26 2015, 3:17 AM: »

    I have this on my G drive: G:\TempPlexCache\Plex Media Server\

    But there's no Profiles folder. I did create one, but no Playstation3 XML showed up.

    You only create a profiles directory if you're making a new profile or trying to override one of Plex's profiles.

    You need to locate the profile that came with the server to modify that one.  It is normally installed in the directory you installed plex media server into/resources/profiles

    So on a default windows install it would be similar to:

    C:\Program Files(x86)\Plex Media Server\Resources\Profiles\Playstation 3.xml

145791012
Sign In or Register to comment.