Jump to content

DLNA profiles do not apply


pietera

Recommended Posts

pietera

Emby server is configured as DLNA server with one library (/red/test) which contains 3 files:
- A.Beautiful.Day.in.the.Neighborhood.2019.2160p.UHD.BluRay.HDR.DTS-X.x265-MiM.mkv
- Feast.2014.PROPER.1080p.BluRay.x264-HANDJOB.mkv
- When.Harry.Met.Sally.1989.REMASTERED.1080p.BluRay.X264-AMIABLE.mkv

I've created a custom DLNA profile for my TV but regardless of what I fill in under "Identification", it never gets applied. I have the correct identification parameters by looking at the TVs device description document (http://192.168.0.141:55000/dmr/ddd.xml). I've tried all the different possible Identification parameters but regardless of which ones I specify, the profile never applies.
Log file never has any indication of which profile it is using so I'm setting a different Friendly name in the DLNA profile as in the global config (Friendly server name) => that way the TV should show the friendly name in the DLNA profile if it gets applied => but it only ever shows the server name instead

The attached log file was generated by doing the following steps:
- start emby-server
- use TV to connect to Emby DLNA server
- use TV to browse to Movies > Movies
- play "When.Harry.Met.Sally.1989.REMASTERED.1080p.BluRay.X264-AMIABLE.mkv" for 10 seconds
=> movie will successfully play but without audio as it has a DTS track which does not get transcoded by Emby (TV can't decode DTS) because it does not want to apply the custom DLNA profile (see attached Panasonic GX800.xml)

Logfile does not show anything about:
- which DLNA profile it is using
- which source file it is using to create a media-stream

Platform:
emby-server 4.7.5.0 on Ubuntu 20.04.4 LTS

ddd.xml embyserver.txt hardware_detection-63794530392.txt Panasonic GX800.xml

Edited by pietera
Link to comment
Share on other sites

pietera

I used the web-interface to make a copy of the Generic Profile and save that as "Panasonic GX800"
Then I tried using different settings for identification but none seems to work for me. The file attached above doesn't have any Identification parameters set but I've tried for example by only setting the manufacturer. Setting that in the web-ui results in the following addition to the Panasonic GX800.xml file:

...
  <Identification>
    <FriendlyName />
    <ModelNumber />
    <SerialNumber />
    <ModelName />
    <DeviceDescription />
    <ModelUrl />
    <Manufacturer>Panasonic</Manufacturer>
    <ManufacturerUrl />
    <Headers />
  </Identification>
...

 

Link to comment
Share on other sites

You need to fill out at least one identification criteria for the play to feature, and then at least one http header in order to browse from the Panasonic and have the custom profile applied. So it's two different forms of identification, one for each of the two ways to play media on it.

Link to comment
Share on other sites

pietera

According to packet capture, the TV identifies itself with "Linux/4.0 UPnP/1.0 Panasonic-MIL-DLNA-SV/1.0\r\n" => I can't get exact matching to work but substring matching the HTTP User-Agent with "Panasonic" seems to work fine - thanks for your quick help!

For others: after this fix, the only other thing which I had to change to get it to work on Panasonic GX800 series, is to set the transcoding container to MKV - choosing the default MPEG-TS should also work in theory but only resulted in "Cannot read this file" errors

Luke, one more question: How do I get Emby to NOT transcode HEVC (TV can decode it)? For AVC it works as long as I specify "h264" under Direct Play. But for HEVC, neither "h265" nor "hevc" seem to work. In both cases I get following FFMPEG output (it wants to transcode the video stream to h264):

22:07:47.964 Stream mapping:
22:07:47.964   Stream #0:0 (hevc) -> format:default (graph 0)
22:07:47.964   format:default (graph 0) -> Stream #0:0 (libx264)
22:07:47.964   Stream #0:1 -> #0:1 (dts (dca) -> ac3 (native))

 

Link to comment
Share on other sites

pietera

Found solution for above problem:
Specify both video codecs "hevc,h264" in both the Direct Play as in the Transcoding profile. By appying these settings, in the example above, only the audio will be transcoded and the video stream will be copied as-is

However, playback for above example still doesn't work so I did some testing.
Playback works in following cases:
- h264 video + any Direct Play compatible audio stream (ac3 and aac tested) => Direct Play, no transcoding
- hevc video + any Direct Play compatible audio stream (ac3 and aac tested) => Direct Play, no transcoding
- h264 video + non-Direct Play compatible audio (dts and flac tested) => FFMPEG copies video stream and transcodes audio stream

Playback doesn't work:
- hevc video  + non-Direct Play compatible audio (dts and flac tested) => FFMPEG copies video stream and transcodes audio stream

No errors to be found in log. FFMPEG does report that it is doing what it should but the resulting stream will not play on the TV. TV doesn't reports any error either, simply a black screen.

Edited by pietera
Link to comment
Share on other sites

pietera

I can't get TS files to play over DLNA (the TV  does support it tho)

Not sure what's going wrong with DLNA streaming in the example in the previous post. I've tried directly copying the ffmpeg output (as the file is being streamed) from /var/lib/emby/transcoding-temp/ to a USB drive => When playing that file directly from the USB drive on the TV, it works fine. However if I copy that file back to my emby library and try to play it over DLNA (DirectPlay as it has already been transcoded), I get exactly the same problem as when it is being trancoded on-the-fly: the TV simply displays a black screen until I cancel playback.

To recap: original file = mkv with hevc video + dts audio. Transcoded file = mkv with hevc video + ac3 audio. Playing the transcoded file directly from a USB stick works fine. Playing the file over DLNA does not work and it doesn't matter if I transcode in advance or if I transcode it while streaming

Edited by pietera
Link to comment
Share on other sites

pietera

Log files attached

Actions taken:
1. Start emby-server
2. Use TV to browse to emby-server > Movies > Movies
3. Play "/red/test/Harry.Potter.And.The.Deathly.Hallows.Part.2.2011.2160p.UHD.BluRay.DTS-HD.MA.7.1.HDR.x265-CtrlHD.mkv"
4. Playback immediately fails with "File not supported!" message on TV => this is the first time I've ever seen this message when testing this exact scenario and I've used the same Harry Potter source file a lot for testing this => ffmpeg-remux-81c4f68b-8e4b-4509-9286-9877d2c44e76_1.txt
5. Trying again to play the same file on the TV
6. Black screen until I cancel playback (this is also what has happened all other times) => ffmpeg-remux-bfa16575-7486-4349-8e9d-38ef5004abb1_1.txt

again, should I copy the output from /var/lib/emby/transcoding-temp/12FA09/12FA09.mkv and try to play that on the TV by using a USB stick, it would work. Streaming doesn't however.

embyserver.txt ffmpeg-remux-81c4f68b-8e4b-4509-9286-9877d2c44e76_1.txt ffmpeg-remux-bfa16575-7486-4349-8e9d-38ef5004abb1_1.txt

Link to comment
Share on other sites

pietera

Attached also the log when doing:

1. Use TV to browse to emby-server > Movies > Movies
2. Play "/red/test/Harry.Potter.And.The.Deathly.Hallows.Part.2.2011.2160p.UHD.BluRay.DTS-HD.MA.7.1.HDR.x265-CtrlHD.mkv"
3. Copying the ffmpeg output from "/var/lib/emby/transcoding-temp/12FA09/12FA09.mkv" while is streaming and saving the result as "/red/test/test.mkv"
4. Re-scan media library in emby so that it finds "/red/test/test.mkv"
5. Play "/red/test/test.mkv" by selecting it on the TV (this time it can DirectPlay as it has already been transcoded)
6. Result is a black screen until I cancel playback again

Streaming the same file "/red/test/test.mkv" using minidlna works fine
The System.IO.FileNotFoundException in the log can be ignored as that is simply because I manually removed a different file (/red/test/test2.mkv) from the server

embyserver.txt

Link to comment
Share on other sites

  • 2 months later...

@pietera are you still running into this with Emby Server 4.7.8? If you're saying the same mkv plays with minidlna then we should be able to figure it out.

Link to comment
Share on other sites

pietera

Luke, I just installed emby-server-deb_4.7.8.0_amd64.deb and ran a few tests.
Exactly the same problem as in my last post from August. Also tested the same thing with a different source file (also HEVC video + DTS audio) but problem remains: black screen and nothing happens.
I tried again to capture the ffmpeg stream from Emby while it is being streamed and to save that as a separate file. Streaming that file over DLNA works with minidlna but not with Emby (Emby just gives me black screen on the TV again).
If you have any ideas about how to further troubleshoot this, let me know.

Link to comment
Share on other sites

Can you find out what the response headers are from minidlna? That's only thing that I can think of.

Link to comment
Share on other sites

pietera

Headers from the initial SSDP response to the M-SEARCH request (HTTP/1.1 200 OK) - both miniDLNA and Emby are running on the same server in the same environment

miniDLNA 1.3.0
CACHE-CONTROL: max-age=1800
DATE: Sat, 08 Oct 2022 22:17:07 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:4d696e69-444c-164e-9d41-1c697aa2aa72::urn:schemas-upnp-org:device:MediaServer:1
EXT:
SERVER: Ubuntu DLNADOC/1.50 UPnP/1.0 MiniDLNA/1.3.0
LOCATION: http://192.168.0.10:8200/rootDesc.xml
Content-Length: 0

Emby 4.7.8.0
CACHE-CONTROL: max-age=7200
DATE: Sat, 08 Oct 2022 22:17:08 GMT
ST: upnp:rootdevice
USN: uuid:62593b3a-9dfb-48b9-96b4-b78c6c114aab::upnp:rootdevice
EXT: 
SERVER: Windows/10.0 UPnP/1.0 EmbyServer/4.5
LOCATION: http://192.168.0.10:8096/dlna/62593b3a-9dfb-48b9-96b4-b78c6c114aab/description.xml
Content-Length: 0

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...