FAQ  •  Register  •  Login

Media Formats & Serviio-TV DLNA dialog

<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Oct 19, 2011 5:50 pm

Media Formats & Serviio-TV DLNA dialog

I'm trying to understand the DLNA dialog between Serviio and my Samsung TV as shown in the Serviio log.

Using Device Spy, I can list the protocols that my Device (Samsung TV), and Serviio support.
eg: http-xget:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=01500000000000000000000000000000,
and I can see that the Serviio list matches the formats defined in the Serviio Profile, and that the TV has protocols not in the Serviio list and vice versa.

In the Serviio log, I can also see a conversation between Serviio and the device that identifies the formats that can be used for a given file, as follows:

  Code:
2011-10-10 22:24:45,614 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.64
2011-10-10 22:24:45,616 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.1.64, Profile=Samsung TV / player (C/D-series)'
2011-10-10 22:24:45,618 DEBUG [ResourceTransportRequestHandler] Request for resource 1000000000290001 and type 'MEDIA_ITEM' received
2011-10-10 22:24:45,618 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 1000000000290001 (online)
2011-10-10 22:24:45,620 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 1000000000290001, format MPEG_TS_SD_KO_ISO and profile Samsung TV / player (C/D-series)
2011-10-10 22:24:45,621 DEBUG [AbstractTranscodingDeliveryEngine] Getting media info for transcoded version of file http://dig.abclocal.go.com/kgo/video/2011/10/10/kgo-101011-br-6pm-occupy.flv
2011-10-10 22:24:45,622 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file http://dig.abclocal.go.com/kgo/video/2011/10/10/kgo-101011-br-6pm-occupy.flv: MPEG_TS_SD_EU_ISO
2011-10-10 22:24:45,622 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file http://dig.abclocal.go.com/kgo/video/2011/10/10/kgo-101011-br-6pm-occupy.flv: MPEG_TS_SD_NA_ISO
2011-10-10 22:24:45,622 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file http://dig.abclocal.go.com/kgo/video/2011/10/10/kgo-101011-br-6pm-occupy.flv: MPEG_TS_SD_KO_ISO
2011-10-10 22:24:45,624 DEBUG [ResourceTransportRequestHandler] Sending HEAD response back
2011-10-10 22:24:45,624 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/mpeg,Content-Length: 50000000000,Date: Tue, 11 Oct 2011 02:24:45 GMT,Server: Windows 7, UPnP/1.0 DLNADOC/1.50, Serviio/0.6.0.1,Cache-control: no-cache,contentFeatures.dlna.org: DLNA.ORG_PN=MPEG_TS_SD_KO_ISO;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000,transferMode.dlna.org: Streaming]]
2011-10-10 22:24:45,634 DEBUG [WebServer] Incoming connection from /192.168.1.64:48083
2011-10-10 22:24:45,635 DEBUG [ResourceTransportRequestHandler] GET /resource/1000000000290001/MEDIA_ITEM/MPEG_TS_SD_KO_ISO$0 HTTP/1.0, headers = [getcontentFeatures.dlna.org: 1,transferMode.dlna.org: Streaming,getMediaInfo.sec: 1,TimeSeekRange.dlna.org: npt=0-,Host: 192.168.1.10:8895]]

This leaves me with the following questions, that I hope someone can answer:

1. Where do I find a definition of what the various DLNA.ORG_PN's mean. My Samsung TV, protocols include items not in the Serviio list like AVC_TS_BL_CIF30_MPEG1_L3 and AVC_TS_MP_HD_AAC_LTP_MULT5. How do I find out the file formats they support?

2. Similarly what do the bits in DLNA.ORG_FLAGS mean eg:01500000000000000000000000000000

3. When a file is selected for playback from the TV menu, who determines the format to be used by that file. eg: format MPEG_TS_SD_KO_ISO in the above conversation, and how is that determination made. I see nothing in the profile that would allow Serviio to determine the format required by a specific file.

4. If Serviio decides the format, how does it know the TV will accept it?

5. When multiple Format profiles are found for a given file (See EU, NA & KO above), how is the determination made as to which one is used. All my files are using the KO Profiles, but I don't understand why. The only KO is the TV.

6. The above log shows Serviio communicating with the TV using HTTP/1.1 formatted messages. Where are these message parameters defined, and how do I determine what the TV does with them?

7. Who is issuing the GET message in the above log? Is this the TV confirming and requesting/confirming it can accept the file in that KO format, followed by serviio saying it will stream the file and will Timebased seeking?

My purpose in understanding these dialogs is to determine why my Samsung TV is unable to play or skip transcoded files. I really need to better understand whats going on between the TV and Serviio. Thanks for any help you can give me. The web yields nothing.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Oct 19, 2011 9:41 pm

Re: Media Formats & Serviio-TV DLNA dialog

1. Where do I find a definition of what the various DLNA.ORG_PN's mean. My Samsung TV, protocols include items not in the Serviio list like AVC_TS_BL_CIF30_MPEG1_L3 and AVC_TS_MP_HD_AAC_LTP_MULT5. How do I find out the file formats they support?

DLNA spec, paid, $500

2. Similarly what do the bits in DLNA.ORG_FLAGS mean eg:01500000000000000000000000000000

define device capabilities and/or file type, more in DLNA spec

3. When a file is selected for playback from the TV menu, who determines the format to be used by that file. eg: format MPEG_TS_SD_KO_ISO in the above conversation, and how is that determination made. I see nothing in the profile that would allow Serviio to determine the format required by a specific file.

The TV

5. When multiple Format profiles are found for a given file (See EU, NA & KO above), how is the determination made as to which one is used. All my files are using the KO Profiles, but I don't understand why. The only KO is the TV.

The TV's business, I guess a US model will use _US profile, but they are basically the same

6. The above log shows Serviio communicating with the TV using HTTP/1.1 formatted messages. Where are these message parameters defined, and how do I determine what the TV does with them?

UPnP spec (free to download)

7. Who is issuing the GET message in the above log? Is this the TV confirming and requesting/confirming it can accept the file in that KO format, followed by serviio saying it will stream the file and will Timebased seeking?

TV makes the GET http request, Serviio responds with stream of the requested file
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Oct 20, 2011 2:54 am

Re: Media Formats & Serviio-TV DLNA dialog

Thanks Zip, that helps a lot.

Just 3 more questions.

1. How does the TV determine the format to be used at the point in the log where the file has just been selected from the menu? ie: " Retrieving resource information for item 1000000000290001, format MPEG_TS_SD_KO_ISO " Does the menu entry sent by Serviio already contain enough info about the file so the TV can do that?

2. Does the presence of a format in the protocol dump for a device mean the device can play that combination of codecs represented by that format natively, or do some of those formats represent other things than valid codec combinations? For my TV there are a lot more formats in the protocol list than in the Serviio media format profiles and I'm wondering why?

3. I was hopeful that a dump of the All-Share protocols would closely match the TV protocols, but the list is minimal as I've formated it as follows.
What do the entries that are just mime-type:* mean? eg: http-get:*:video/avi:* The list does not even include the manditory formats.
  Code:
http-get:*:image/jpeg:      DLNA.ORG_PN=JPEG_SM;         DLNA.ORG_OP=01;   DLNA.ORG_FLAGS=00f00000000000000000000000000000,  Required image
http-get:*:audio/mpeg:      DLNA.ORG_PN=MP3;         DLNA.ORG_OP=01;   DLNA.ORG_FLAGS=01700000000000000000000000000000,  Required mobile audio
http-get:*:audio/mp4:      DLNA.ORG_PN=AAC_ISO_320;      DLNA.ORG_OP=01;   DLNA.ORG_FLAGS=01700000000000000000000000000000,  Required mobile audio
http-get:*:audio/3gpp:      DLNA.ORG_PN=AAC_ISO_320;      DLNA.ORG_OP=01;   DLNA.ORG_FLAGS=01700000000000000000000000000000,  Required mobile audio
http-get:*:audio/vnd.dlna.adts:   DLNA.ORG_PN=AAC_ADTS_320;      DLNA.ORG_OP=01;   DLNA.ORG_FLAGS=01700000000000000000000000000000,
http-get:*:video/mp4:      DLNA.ORG_PN=AVC_MP4_BL_CIF15_AAC_520;   DLNA.ORG_OP=01;   DLNA.ORG_FLAGS=01700000000000000000000000000000,  Required mobile A/v
http-get:*:video/mp4:      DLNA.ORG_PN=AVC_MP4_BL_L2_CIF30_AAC;   DLNA.ORG_OP=01;   DLNA.ORG_FLAGS=01700000000000000000000000000000,

http-get:*:audio/mpeg:*,
http-get:*:audio/x-ms-wma:*,
http-get:*:audio/wav:*,
http-get:*:audio/mp4:*,
http-get:*:application/ogg:*,
http-get:*:image/jpeg:*,
http-get:*:image/gif:*,
http-get:*:video/mpeg:*,
http-get:*:video/x-msvideo:*,
http-get:*:video/avi:*,
http-get:*:video/MP4V-ES:*,
http-get:*:video/x-ms-wmv:*
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Oct 20, 2011 8:21 am

Re: Media Formats & Serviio-TV DLNA dialog

1. How does the TV determine the format to be used at the point in the log where the file has just been selected from the menu? ie: " Retrieving resource information for item 1000000000290001, format MPEG_TS_SD_KO_ISO " Does the menu entry sent by Serviio already contain enough info about the file so the TV can do that?

No idea, it's the TV's business. SOme players (eg Sony BDP) is region specific so that will always pick the _US profile for US players, the Sammy is not that picky.

2. Does the presence of a format in the protocol dump for a device mean the device can play that combination of codecs represented by that format natively, or do some of those formats represent other things than valid codec combinations? For my TV there are a lot more formats in the protocol list than in the Serviio media format profiles and I'm wondering why?

It means the TV can play a file like that - no matter whether the server actually transcodes another format into this one. It's common the TV has more, some of those that Serviio doesn't have are mobile formats (3gp, small res ,ect), but those are kind of subsets of the full-res profiles, so there is no real need. Serviio will send a file using a profile, the TV supports it and that what matters.

3. I was hopeful that a dump of the All-Share protocols would closely match the TV protocols, but the list is minimal as I've formated it as follows.
What do the entries that are just mime-type:* mean? eg: http-get:*:video/avi:* The list does not even include the manditory formats.

Up to them, I guess. The formats not using the DLNA attributes but * instead are UPnP version, some players/servers that are not DLNA compatible will still play a file like that.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Oct 20, 2011 2:59 pm

Re: Media Formats & Serviio-TV DLNA dialog

1. How does the TV determine the format to be used at the point in the log where the file has just been selected from the menu? ie: " Retrieving resource information for item 1000000000290001, format MPEG_TS_SD_KO_ISO " Does the menu entry sent by Serviio already contain enough info about the file so the TV can do that?

No idea, it's the TV's business. SOme players (eg Sony BDP) is region specific so that will always pick the _US profile for US players, the Sammy is not that picky.


I was not clear with this question. The TV determines the profile to be used, in this case "KO", but it must know something about the file that is on the server that it has been asked to play in order to do this. Has that file info already been sent to the TV as part of the Menu creation dialog? In the log I don't see the TV asking for file info after the file has been selected from the menu so I'm assuming that Serviio has already provided that info. Is that correct?
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Thu Oct 20, 2011 3:14 pm

Re: Media Formats & Serviio-TV DLNA dialog

Using Device Spy, you will see that serviio provides mutiple ressources (same file with different profile name and mime-type):
MPEG_TS_SD_EU_ISO
MPEG_TS_SD_NA_ISO
MPEG_TS_SD_KO_ISO


And TV response "HTTP/1.1 200 OK, headers" with MPEG_TS_SD_KO_ISO selected
Then TV ask serviio for file delivering with "GET /resource/1000000000290001/MEDIA_ITEM/MPEG_TS_SD_KO_ISO$0 HTTP/1.0, headers"

How TV make the profile chose? --> Don't know.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Oct 20, 2011 3:26 pm

Re: Media Formats & Serviio-TV DLNA dialog

In the log I don't see the TV asking for file info after the file has been selected from the menu so I'm assuming that Serviio has already provided that info. Is that correct?

It's a part of the Browse() call from the device. Serviio resturns list of items incl. their resources, as Illico pointed out above.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Oct 20, 2011 6:08 pm

Re: Media Formats & Serviio-TV DLNA dialog

OK, based on my understanding from the previous responses and the log, here is the dialog. I may totally misunderstand so please review and confirm:

1. User clicks on "Folders"
2. TV sends request to Serviio for list of "Shared Directories"
3. Serviio sends list of Shared Directories to TV
4 .TV displays them in a menu
5. User Clicks on a Shared Directory
6. TV sends request to Serviio for Directory Contents
7. Serviio sends a list of files and their attributes and thumbnails (as stored in its database when the files were added to the serviio library) to the TV
8. TV displays the menu of files and their thumbnails
9. User highlights a file (assume it is a .mkv) and selects "Tools/Detailed information".
10. TV responds with the mime-type that will be played, either "video/x-mkv" if it will be played natively or "video/mpg" if it will be transcoded because Serviio already provided that information in step 7.
11. User clicks a file to play it.
12. TV utilizes the info provided by Serviio in step 7 to request a file in a preferred format eg: MPEG_TS_SD_KO_ISO although all I see in the log is "Request for resource 1000000000290001 and type 'MEDIA_ITEM' received"
13. Serviio looks to see if it can satisfy this request: "Retrieving resource information for item 1000000000290001, format MPEG_TS_SD_KO_ISO and profile Samsung TV / player (C/D-series)"
14. Serviio determines it can send these formats: Found Format profile MPEG_TS_SD_EU_ISO/MPEG_TS_SD_NA_ISO/
MPEG_TS_SD_KO_ISO
15. Serviio tells TV it can deliver formatit requested in step 12 using:
  Code:
HTTP/1.1 200 OK, headers = [[Content-Type: video/mpeg,Content-Length: 50000000000,Date: Tue, 11 Oct 2011 02:24:45 GMT,Server: Windows 7, UPnP/1.0 DLNADOC/1.50, Serviio/0.6.0.1,Cache-control: no-cache,contentFeatures.dlna.org: DLNA.ORG_PN=MPEG_TS_SD_KO_ISO;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000,transferMode.dlna.org: Streaming]]

16. TV then asks Serviio to send the file in that format:
  Code:
GET /resource/1000000000290001/MEDIA_ITEM/MPEG_TS_SD_KO_ISO$0 HTTP/1.0, headers = [getcontentFeatures.dlna.org: 1,transferMode.dlna.org: Streaming,getMediaInfo.sec: 1,TimeSeekRange.dlna.org: npt=0-,Host: 192.168.1.10:8895]]

17. Serviio sends the file.

Questions: Why is Serviio sending "DLNA.ORG_OP=10" in step 15 which I understand means "Relative byte" skipping, when Serviio supports "Time based" = 01 for transcoded files which this example is.
Also why does the TV response say "TimeSeekRange.dlna.org" in step 16.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Oct 20, 2011 10:36 pm

Re: Media Formats & Serviio-TV DLNA dialog

You got it mostly right.

Questions: Why is Serviio sending "DLNA.ORG_OP=10" in step 15 which I understand means "Relative byte" skipping, when Serviio supports "Time based" = 01 for transcoded files which this example is.

It's the other way around, the first byte is time based seek, second is byte range seek.
Also why does the TV response say "TimeSeekRange.dlna.org" in step 16.

Because Serviio says it supports time based seek so the TV is requesting (in this case) the whole file.

Return to General discussion

Who is online

Users browsing this forum: No registered users and 23 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.