Writing profiles for DLNA devices

Without checking a new DLNA log, can't say for sure what is happening.  But on all your old log all of your files appeared to be "mpegts/h264/aac/" which is also listed in your directplay section which means the server won't be trying to transcode them as the profile says your TV can you play them.

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?

EDIT: New log file: http://81.166.3.217/download/Plex%20DLNA%20Server.log

XML info from TV: http://81.166.3.217/download/dmr.xml

Updated profile: http://81.166.3.217/download/TV-120.xml

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):


   

   
     
     
     
     
     
     
     
   

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?

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.

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:


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:

AVI is a container not a codec ;)

This would be a pretty basic start:

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

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.

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:


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

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.

You have been very helpful.

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


You have been very helpful.

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


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:

I would try the following one at a time:

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

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.

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

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"?>

	
		
	
	
		
	

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)

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.

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

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

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

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.

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

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.