Writing profiles for DLNA devices

Rename your custom profile to something like MyChromcast.xml. This will allow you to identify the profile being used. Remember to restart PMS.

Open your web manager to view your library.

Then try to play some music on a chromcast device.

Whilst your attempting to play the file you should see in the web manager under Status|Playing Now the file being played. You should see the profile name inside the image of the file being played.

If you can’t do this, simply download and view your logs to check for same.

If the profile name is your custom profile then your profile needs tweeking.

But that asside, your real problem is to find out what changed on your system to prevent your files from playing. I am assuming of course that the files have played in the past and for some reason they stopped playing.

Assuming your files did play, then what did you change on the server? What did you play with on the server? did you do an upgrade?

Regards

Fred

Sorry, Ive put you wrong.
You need to change the Client name string in your custom profile to something unique so you can identify it in the web manager. You only need to change the file name if your searching your logs.

Regards

Fred

@BambiSlayer said:
Rename your custom profile to something like MyChromcast.xml. This will allow you to identify the profile being used. Remember to restart PMS.

The Chromecast profile isn’t a DLNA profile it is a profile accessed by the mini app ran on Chromecasts so changing the file name/client name won’t do anything except possibly break playing things via the app on the Chromecast.

@BambiSlayer said:

Rename your custom profile to something like MyChromcast.xml. This will allow you to identify the profile being used. Remember to restart PMS.

Open your web manager to view your library.

Then try to play some music on a chromcast device.

Whilst your attempting to play the file you should see in the web manager under Status|Playing Now the file being played. You should see the profile name inside the image of the file being played.

If you can’t do this, simply download and view your logs to check for same.

If the profile name is your custom profile then your profile needs tweeking.

But that asside, your real problem is to find out what changed on your system to prevent your files from playing. I am assuming of course that the files have played in the past and for some reason they stopped playing.

Assuming your files did play, then what did you change on the server? What did you play with on the server? did you do an upgrade?

Regards

Fred

Firstly, thanks for getting in touch! :slight_smile:

To address your fist suggestion: I will not be changing the name of the Chromecast profile, since I more or less agree with @jmckee’s follow up post in that it would only break things.

Reiterating what I wrote in my initial post, I can in fact stream/transcode to the Chromecast unit just fine - I hope that’s quite clear :slight_smile:
The problem that has arisen is that ALAC files are no longer being transcoded to FLAC-format, as defined in the Chromecast device profile, but instead to lossy (default?) AAC format.

It seems that my custom Chromecast profile is being recognised (and put into use) without issues since, after restarting the plex server daemon on my linux box, I get the following output in the Plex DLNA-server log:

Apr 14, 2018 15:46:53.105 [0x7f1db42ea800] DEBUG - DLNA server port: 32469
Apr 14, 2018 15:46:53.105 [0x7f1db42ea800] DEBUG - PMS: http://127.0.0.1:32400/
Apr 14, 2018 15:46:53.105 [0x7f1db42ea800] DEBUG - MyPlex: https://plex.tv/
Apr 14, 2018 15:46:55.172 [0x7f1db42ea800] DEBUG - Reading system DLNA client profiles
Apr 14, 2018 15:46:55.193 [0x7f1db42ea800] DEBUG - Overriding “Chromecast” profile with user client profile
Apr 14, 2018 15:46:55.202 [0x7f1db42ea800] DEBUG - Read 22 DLNA client profiles
Apr 14, 2018 15:46:55.209 [0x7f1db42ea800] DEBUG - DLNA device discovery enabled every 60 seconds
Apr 14, 2018 15:46:55.209 [0x7f1db42ea800] DEBUG - Initialization complete

So, judging from all this, the problem must be with the way the custom profile itself has been written… or what do you guys think?

I have changed a few things on my server since the time when I had the custom Chromecast profile working, but not anything which I can really link to this transcode problem.

I’ll add to my previous post that I’ve also tried changing the profile xml as per all suggestions made in these threads:

Nothing has done the trick though :confused:

“Jun 22, 2018 15:33:27.660 [0x7f62cbbff700] DEBUG - The Lorax - video.profile limitation applies: high 10 != baseline|constrained baseline|main|high [list]”

Does anyone know the proper syntax to add an upperBound limitation for video.profile? I’ve tried this, it doesn’t work.

“UpperBound name"video.profile” value=“high 10”"

Would this work instead??:

"VideoProfile container=“mp4” codec=“h264,mpeg4” audioCodec=“aac,he-aac,ac3,mp3,pcm” subtitleFormat=“srt,smi” profile=“baseline,main,high,high10”

I have written a custom XML for my Shield TV that works well for my use case, wherein I have a playbar so I need to not send the shield DTS. Problem is I have two shields, the other one can play DTS.

So I was wondering if I can somehow use the identification section to differentiate between the two and have two different profiles for them?

Just a pity that DLNA is now broken in latest Plex updates: Plex not marking viewed items as watched anymore

You have to wonder if it’s worth spending the time to learn DLNA if all you want to do is get video from your PMS to your TV. Much easier to get yourself an Amazon Fire TV Stick for 30 bucks and grab the app from the Amazon App Store.

I had the same problem - Chromecast 2 and Chromecast Ultra. When I enabled the VERBOSE and DEBUG log and I can see that both these devices send the same headers except only one “X-Plex-Client-Identifier”.

Chromecast:

Jan 17, 2019 20:16:04.422 [0x7f26eec47700] VERBOSE -  * Host => 192-168-1-101.8ca83c50229c440387bffefa3990bcf4.plex.direct:32400
Jan 17, 2019 20:16:04.422 [0x7f26eec47700] VERBOSE -  * Connection => keep-alive
Jan 17, 2019 20:16:04.422 [0x7f26eec47700] VERBOSE -  * X-Plex-Version => 3.81.1
Jan 17, 2019 20:16:04.422 [0x7f26eec47700] VERBOSE -  * X-Plex-Platform-Version => 70.0
Jan 17, 2019 20:16:04.422 [0x7f26eec47700] VERBOSE -  * Origin => https://app.plex.tv
Jan 17, 2019 20:16:04.422 [0x7f26eec47700] VERBOSE -  * X-Plex-Client-Identifier => 0yom34ii0hhjajc81t1j4oh8
Jan 17, 2019 20:16:04.422 [0x7f26eec47700] VERBOSE -  * X-Plex-Device-Name => Chromecast
Jan 17, 2019 20:16:04.422 [0x7f26eec47700] VERBOSE -  * X-Plex-Platform => Chromecast
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * X-Plex-Product => Plex Cast
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * Accept => text/plain
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * X-Plex-Token => xxxxxxxxxxxxxxxxxxxx651-4289-9b88-a6ad56b0ab12
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * User-Agent => Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.47 Safari/537.36 CrKey/1.36.140318
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * X-Plex-Device-Screen-Resolution => 1280x720,1280x720
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * X-Plex-Device => Linux
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * X-Plex-Text-Format => plain
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * Referer => https://app.plex.tv/
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * Accept-Encoding => gzip, deflate
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * Accept-Language => en-GB,en-US;q=0.9,en;q=0.8
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * CAST-DEVICE-CAPABILITIES => {"bluetooth_supported":true,"display_supported":true,"hi_res_audio_supported":false,"remote_control_input_supported":false,"touch_input_supported":false}
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * repeat => 0
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * own => 1
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * includeChapters => 1
Jan 17, 2019 20:16:04.423 [0x7f26eec47700] VERBOSE -  * includeGeolocation => 1

Chromecast ultra:

Jan 17, 2019 20:15:53.550 [0x7f26ee959700] DEBUG - Request: [192.168.1.52:57601 (Subnet)] GET /playQueues/101?repeat=0&own=1&includeChapters=1&includeGeolocation=1 (12 live) TLS GZIP Signed-in Token (roland.divin)
Jan 17, 2019 20:15:53.550 [0x7f26ee959700] VERBOSE -  * Host => 192-168-1-101.8ca83c50229c440387bffefa3990bcf4.plex.direct:32400
Jan 17, 2019 20:15:53.550 [0x7f26ee959700] VERBOSE -  * Connection => keep-alive
Jan 17, 2019 20:15:53.550 [0x7f26ee959700] VERBOSE -  * X-Plex-Version => 3.81.1
Jan 17, 2019 20:15:53.550 [0x7f26ee959700] VERBOSE -  * X-Plex-Platform-Version => 70.0
Jan 17, 2019 20:15:53.550 [0x7f26ee959700] VERBOSE -  * Origin => https://app.plex.tv
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * X-Plex-Client-Identifier => 9ru11vako96pactyddnwrnhq
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * X-Plex-Device-Name => Chromecast
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * X-Plex-Platform => Chromecast
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * X-Plex-Product => Plex Cast
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * Accept => text/plain
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * X-Plex-Token => xxxxxxxxxxxxxxxxxxxx25f-4b2f-b631-32b0b7170271
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * User-Agent => Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.47 Safari/537.36 CrKey/1.36.141427
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * X-Plex-Device-Screen-Resolution => 1280x720,1280x720
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * X-Plex-Device => Linux
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * X-Plex-Text-Format => plain
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * Referer => https://app.plex.tv/
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * Accept-Encoding => gzip, deflate
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * Accept-Language => en-GB,en-US;q=0.9,en;q=0.8
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * CAST-DEVICE-CAPABILITIES => {"bluetooth_supported":true,"display_supported":true,"hi_res_audio_supported":false,"remote_control_input_supported":false,"touch_input_supported":false}
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * repeat => 0
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * own => 1
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * includeChapters => 1
Jan 17, 2019 20:15:53.551 [0x7f26ee959700] VERBOSE -  * includeGeolocation => 1

So I’ve put two files into Plex Media Server/Resources/Profiles folder. Profile gets used based on client identifier.

Chromecast.xml

<?xml version="1.0" encoding="utf-8"?>
<Client name="Chromecast">
    <!-- Author: Plex Inc. -->
    <Identification>
        <Header name="X-Plex-Client-Identifier" regex="0yom34ii0hhjajc81t1j4oh8"/>
    </Identification>
    <TranscodeTargets>
        <VideoProfile protocol="http" container="mkv" codec="h264" audioCodec="aac,mp3" context="streaming"/>
        <MusicProfile container="mkv" codec="opus"/>
        <PhotoProfile container="jpeg"/>
        <SubtitleProfile container="ass" codec="ass"/>
    </TranscodeTargets>
    <CodecProfiles>
        <VideoCodec name="*">
            <Limitations>
                <UpperBound name="video.width" value="1920" isRequired="true"/>
                <UpperBound name="video.height" value="1080" isRequired="true"/>
            </Limitations>
        </VideoCodec>
        <VideoCodec name="h264">
            <Limitations>
                <UpperBound name="video.bitDepth" value="8"/>
                <UpperBound name="video.level" value="42"/>
            </Limitations>
        </VideoCodec>
        <VideoAudioCodec name="aac,mp3">
            <Limitations>
                <UpperBound name="audio.channels" value="2"/>
            </Limitations>
        </VideoAudioCodec>
    </CodecProfiles>
</Client>

Chromecast-Ultra.xml

<?xml version="1.0" encoding="utf-8"?>
<Client name="Chromecast">
    <!-- Author: xtrap225 -->
    <Identification>
        <Header name="X-Plex-Client-Identifier" regex="9ru11vako96pactyddnwrnhq"/>
    </Identification>
    <TranscodeTargets>
        <VideoProfile protocol="http" container="mkv" codec="h264" audioCodec="aac,mp3" context="streaming"/>
        <MusicProfile container="mkv" codec="opus"/>
        <PhotoProfile container="jpeg"/>
        <SubtitleProfile container="ass" codec="ass"/>
    </TranscodeTargets>
    <DirectPlayProfiles>
        <VideoProfile container="mp4" codec="Hevc,h265,mpeg1video,mpeg2video,h264,mpeg4" audioCodec="aac,mp3,mp2"/>
        <VideoProfile container="mkv" codec="vp9,Hevc,h265,mpeg1video,mpeg2video,h264,mpeg4"
                      audioCodec="aac,mp3,mp2,pcm,flac,alac" subtitleFormat="srt,ass"/>
        <MusicProfile container="mp3" codec="mp2,mp3"/>
        <MusicProfile container="mp4" codec="aac"/>
        <MusicProfile container="flac" codec="flac"/>
        <MusicProfile container="wav" codec="pcm"/>
        <PhotoProfile container="jpeg,png,gif"/>
    </DirectPlayProfiles>
    <CodecProfiles>
        <VideoCodec name="h265,Hevc,vp9">
            <Limitations>
                <UpperBound name="video.width" value="3840"/>
                <UpperBound name="video.height" value="2176"/>
                <UpperBound name="video.bitrate" value="75000"/>
            </Limitations>
        </VideoCodec>
        <VideoCodec name="h264,mpeg4">
            <Limitations>
                <UpperBound name="video.width" value="3840"/>
                <UpperBound name="video.height" value="2176"/>
                <UpperBound name="video.bitrate" value="75000"/>
                <UpperBound name="video.bitDepth" value="10"/>
                <UpperBound name="video.level" value="42"/>
            </Limitations>
        </VideoCodec>
        <VideoAudioCodec name="aac,mp3">
            <Limitations>
                <UpperBound name="audio.channels" value="2"/>
            </Limitations>
        </VideoAudioCodec>
    </CodecProfiles>
</Client>

I’m able to play to both Chromecast devices (one is transcoding and the oher is not).
image

This thread is very old but still contains good information so will be maintained as Library reference.

The most important change since this thread last updated; The location of where Profiles are placed.

Under your metadata (Library/Application Support/Plex Media Server), create Profiles.
You place your customized profiles here now.

Copy the original / master copy here and edit appropriately or author fresh.
The files must be owned by plex.
Any changes you make require a restart to become active (Plex reads into memory at first use).

4 Likes