Kodi Community Forum
Improved UPnP serving and client - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: GSoC (https://forum.kodi.tv/forumdisplay.php?fid=299)
+----- Forum: GSoC 2012 (https://forum.kodi.tv/forumdisplay.php?fid=161)
+----- Thread: Improved UPnP serving and client (/showthread.php?tid=127949)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


RE: Improved UPnP serving and client - sialivi - 2012-10-23

(2012-10-23, 12:08)alcoheca Wrote: When xbmc crashes on windows a .dmp file should be created in the same location as the log file. If you post that somewhere, I can ask a windows dev to take a look at it.

http://dl.dropbox.com/u/41720073/xbmc/xbmc_crashlog-12.0-ALPHA7%20Git_20121022-7a766f7-20121023-121131.dmp


RE: Improved UPnP serving and client - alcoheca - 2012-10-23

(2012-10-21, 15:39)sialivi Wrote: [Sorting]
As I mentioned in a previous post, when browsing Music by Genre on my Pioneer AVR the listing isn't sorted.

I now noticed that browsing TV shows by Title on my Panasonic TV or the Nexus 7 isn't sorted either. Log: http://xbmclogs.com/show.php?id=11099

If this is caused by the devices not requesting a sort order, would it be possible to default to sorting by sorttitle? I don't really see a UPnP scenario where an unsorted list would be more useful than a sorted one.

Edit: Hmm, maybe they are sorted after all, but by date which doesn't seem very useful.

The issue is the sort criteria being requested in that log is +dc:date, so sort by date increasing. We never used to respect the sort criteria being passed, and we also never sorted the items. Currently if there is no sort criteria passed we sort correctly. I'm wondering about whether we just ignore the sort criteria, as clients seem to stick with one for the whole library. Is there an option on the Panasonic or Nexus to alter the sorting in the client's user interface?



RE: Improved UPnP serving and client - alcoheca - 2012-10-23

(2012-10-21, 15:02)edrikk Wrote: Hi,

Tried the 20121020-a6c2d72 Windows build on an iPad running MLPlayer light. A couple of observations:

1) if a movie is a part of added to XBMC and is a part of a set, the the whole set (folder) shows up in recently added. Not sure if that's intended behaviour or not.

2) I don't think the sorting code is merged in yet right? "A" "an" the" etc are still taken into account

3). Going into 'video' then 'files' lists all files, not just video files (so my .nfo, -fanart.jpg, etc). Is this intended behaviour? Seems a little strange/off in UPnP given the branch we're in....


Gotta say the UPnP is already MILES better than before!

Will try with other clients when I have a moment.

thanks -

2) there's something strange happening with the sorting, am working on a fix.

3) agreed, I need to figure out a way of removing those




RE: Improved UPnP serving and client - sialivi - 2012-10-23

(2012-10-23, 12:13)alcoheca Wrote: The issue is the sort criteria being requested in that log is +dc:date, so sort by date increasing. We never used to respect the sort criteria being passed, and we also never sorted the items. Currently if there is no sort criteria passed we sort correctly. I'm wondering about whether we just ignore the sort criteria, as clients seem to stick with one for the whole library. Is there an option on the Panasonic or Nexus to alter the sorting in the client's user interface?

Unfortunately not. Ignoring the sort criteria is probably not a good idea if other devices do offer that functionality. Wasn't there talk about adding functionality to xbmc to allow for having a configuration file per-device? If that is ever implemented, it might be good to allow defining the sort order there.


RE: Improved UPnP serving and client - alcoheca - 2012-10-23

(2012-10-20, 17:14)sialivi Wrote: [Client Freezing]
Just played around with another piece of UPnP client software for android called Skifta and encountered an issue. While browsing the XBMC library, the UPnP client would freeze after a while. I could repeat it multiple times. Often the freeze would happen when navigating back to the XBMC root where you only see the "Music" and "Videos" nodes.

I have no idea if this is a bug in the client or in XBMC.

Here's the log: http://xbmclogs.com/show.php?id=11028

Edit: By "freeze" I mean the client would get stuck with a "retrieving media" message and a spinning activity indicator, but it would never complete.

This is pretty weird, it's spinning trying to request the addons node (which we refuse to return), I thought I'd fixed that by returning the correct number of items - 1. Obviously not. I'll download Skifta and play with it.


RE: Improved UPnP serving and client - alcoheca - 2012-10-23

(2012-10-23, 12:22)sialivi Wrote:
(2012-10-23, 12:13)alcoheca Wrote: The issue is the sort criteria being requested in that log is +dc:date, so sort by date increasing. We never used to respect the sort criteria being passed, and we also never sorted the items. Currently if there is no sort criteria passed we sort correctly. I'm wondering about whether we just ignore the sort criteria, as clients seem to stick with one for the whole library. Is there an option on the Panasonic or Nexus to alter the sorting in the client's user interface?

Unfortunately not. Ignoring the sort criteria is probably not a good idea if other devices do offer that functionality. Wasn't there talk about adding functionality to xbmc to allow for having a configuration file per-device? If that is ever implemented, it might be good to allow defining the sort order there.

I think in terms of getting something in soon which is stable across clients, then ignoring the sort criteria is the only option. A client doesn't know that Recently Added should be sorted by date.

Doing this by device is also possible, but it's likely we'd inverse the behaviour and only respect the criteria passed when we know the client is smart enough to request the correct order.

So I'm still leaning towards just ignoring it for this release of XBMC.




RE: Improved UPnP serving and client - alcoheca - 2012-10-23

(2012-10-20, 17:05)da-anda Wrote: alcoheca - any Idea why XBMC won't show up on Sony Bravia TVs as UPNP source? Is there anything I can provide for debugging? Not sure if a XBMC log will help as TV is not showing XBMC at all.

I've read that Bravia's are particularly fussy. The issue is even if they showed up, the protocol info needs modified before they'd play anything. If I can, I'll try and get them at least showing up in time. We can modify platinum to get this happening the issue is just the ability to debug this in time.


RE: Improved UPnP serving and client - alcoheca - 2012-10-23

(2012-10-23, 12:26)alcoheca Wrote:
(2012-10-20, 17:14)sialivi Wrote: [Client Freezing]
Just played around with another piece of UPnP client software for android called Skifta and encountered an issue. While browsing the XBMC library, the UPnP client would freeze after a while. I could repeat it multiple times. Often the freeze would happen when navigating back to the XBMC root where you only see the "Music" and "Videos" nodes.

I have no idea if this is a bug in the client or in XBMC.

Here's the log: http://xbmclogs.com/show.php?id=11028

Edit: By "freeze" I mean the client would get stuck with a "retrieving media" message and a spinning activity indicator, but it would never complete.

This is pretty weird, it's spinning trying to request the addons node (which we refuse to return), I thought I'd fixed that by returning the correct number of items - 1. Obviously not. I'll download Skifta and play with it.

OK I just recreated this, it's only when you return to the video listing. Congratulations, you just found another bug..



RE: Improved UPnP serving and client - sialivi - 2012-10-23

(2012-10-23, 12:29)alcoheca Wrote: I think in terms of getting something in soon which is stable across clients, then ignoring the sort criteria is the only option. A client doesn't know that Recently Added should be sorted by date.

Doing this by device is also possible, but it's likely we'd inverse the behaviour and only respect the criteria passed when we know the client is smart enough to request the correct order.

So I'm still leaning towards just ignoring it for this release of XBMC.

Makes sense. Looks like none of my 3 devices allow me to change sort order. I would rather have xbmc pick a suitable order than the device if it doesn't allow me to change it.


RE: Improved UPnP serving and client - edrikk - 2012-10-23

(2012-08-01, 16:58)kricker Wrote: Oh you mean because the user would have to set an advanced setting to get the old behavior...gotcha. Let them cry if they will (...and some will), but the new default IMHO is far better. Even if I rip an old movie to add to my collection, the file gets the current date and shows up properly using the default behavior.

(2012-10-23, 12:13)alcoheca Wrote:
(2012-10-21, 15:39)sialivi Wrote: [Sorting]
As I mentioned in a previous post, when browsing Music by Genre on my Pioneer AVR the listing isn't sorted.

I now noticed that browsing TV shows by Title on my Panasonic TV or the Nexus 7 isn't sorted either. Log: http://xbmclogs.com/show.php?id=11099

If this is caused by the devices not requesting a sort order, would it be possible to default to sorting by sorttitle? I don't really see a UPnP scenario where an unsorted list would be more useful than a sorted one.

Edit: Hmm, maybe they are sorted after all, but by date which doesn't seem very useful.

The issue is the sort criteria being requested in that log is +dc:date, so sort by date increasing. We never used to respect the sort criteria being passed, and we also never sorted the items. Currently if there is no sort criteria passed we sort correctly. I'm wondering about whether we just ignore the sort criteria, as clients seem to stick with one for the whole library. Is there an option on the Panasonic or Nexus to alter the sorting in the client's user interface?

Hi,

I'm not sure if I understood the bolded sentence correctly or not... Would that not result in breaking of (for example): recently added which must be sorted by most recent first vs. by title?

Or that simply XMBC pre-sorts as it sees fit? (I assume it's this behaviour)... Smile


RE: Improved UPnP serving and client - alcoheca - 2012-10-23

XBMC will sort correctly if the client doesn't specify a sort method. I'm just suggesting ignoring any requests and always doing it correctly for this release.


RE: Improved UPnP serving and client - edrikk - 2012-10-23

Makes sense.


RE: Improved UPnP serving and client - da-anda - 2012-10-23

(2012-10-23, 12:32)alcoheca Wrote:
(2012-10-20, 17:05)da-anda Wrote: alcoheca - any Idea why XBMC won't show up on Sony Bravia TVs as UPNP source? Is there anything I can provide for debugging? Not sure if a XBMC log will help as TV is not showing XBMC at all.

I've read that Bravia's are particularly fussy. The issue is even if they showed up, the protocol info needs modified before they'd play anything. If I can, I'll try and get them at least showing up in time. We can modify platinum to get this happening the issue is just the ability to debug this in time.

Should I grab Plex and see if my Bravia is working with them? IIRC they also use Platinum, but probably a commercial (closed source) license and thus won't help much Sad


RE: Improved UPnP serving and client - edrikk - 2012-10-23

Plex definitely works with Bravia. Given this profile is put into the local profile file:

http://forums.plexapp.com/index.php/topic/39681-working-dlna-profiles/page__st__20__p__302594#entry302594

This is the 2011 profile (which is nearly identical to the 2010 profile... can't remember the exact difference... might have been a codec ...)...

Code:
<?xml version="1.0" encoding="utf-8"?>
<Clients>
  <Client name="SONY BRAVIA TV 2011">
    <!-- Compiler: YARDCO -->
    <!-- Based on ILLICO's Sony BRAVIA 2010 Profile -->
    <Identification>
         <Header name="X-AV-Client-Info" substring="HX" />
         <Header name="X-AV-Client-Info" substring="NX" />
         <Header name="X-AV-Client-Info" substring="EX" />
         <Header name="X-AV-Client-Info" substring="CX" />
    </Identification>
<Settings>
<Setting name="LocalQualityCap" value="12" />
<Setting name="RemoteQualityCap" value="12" />
</Settings>
      <ProtocolInfo>
          <Source>http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000</Source>
      </ProtocolInfo>
      <TranscodeTargets>
        <VideoProfile container="mpegts" codec="mpeg2video" audioCodec="ac3" />
        <PhotoProfile codec="jpeg" />
</TranscodeTargets>
      <DirectPlayProfiles>
        <VideoProfile container="mpegts" codec="mpeg2video,h264" audioCodec="ac3,mp2,aac" />
        <VideoProfile container="mpeg" codec="mpeg2video" audioCodec="ac3,mp2" />
        <PhotoProfile codec="jpeg" />
      </DirectPlayProfiles>
<ContainerProfiles>
        <VideoContainer name="mpegts" pn="AVC_TS_HD_24_AC3_ISO" />
        <VideoContainer name="mpegts" pn="AVC_TS_HD_50_AC3_ISO" />
        <VideoContainer name="mpegts" pn="AVC_TS_HD_60_AC3_ISO" />
        <VideoContainer name="mpegts" pn="AVC_TS_HD_EU_ISO" />
</ContainerProfiles>
      <CodecProfiles>
        <VideoCodec name="h264">
          <Setting name="MaxResolution" value="1920x1080" /><!--Deprecated-->
          <Setting name="MaxFps" value="30" /><!--Deprecated-->
          <Setting name="MaxBitRate" value="20000" /><!--Deprecated-->
          <Limitations>
            <UpperBound name="video.width" value="1920" />
            <UpperBound name="video.height" value="1080" />
            <UpperBound name="video.frameRate" value="30" />
            <UpperBound name="video.bitrate" value="20000" />
            <UpperBound name="video.level" value="41" />
          </Limitations>
        </VideoCodec>
        <VideoCodec name="mpeg2video">
          <Setting name="MaxResolution" value="1920x1080" /><!--Deprecated-->
          <Setting name="MaxFps" value="30" /><!--Deprecated-->
          <Setting name="MaxBitRate" value="20000" /><!--Deprecated-->
          <Limitations>
            <UpperBound name="video.width" value="1920" />
            <UpperBound name="video.height" value="1080" />
            <UpperBound name="video.frameRate" value="30" />
            <UpperBound name="video.bitrate" value="20000" />        
          </Limitations>
        </VideoCodec>
        <VideoAudioCodec name="ac3">
          <Setting name="MaxAudioChannels" value="6" /><!--Deprecated-->
          <Setting name="MaxBitRate" value="384" /><!--Deprecated-->
          <Limitations>
            <UpperBound name="audio.channels" value="6" />
            <UpperBound name="audio.bitrate" value="384" />
          </Limitations>
        </VideoAudioCodec>
      </CodecProfiles>
      <MediaProfiles>
        <PN name="MPEG_PS_NTSC_L2,MPEG_PS_NTSC_XAC3" remap="MPEG_PS_NTSC" mimeType="video/mpeg" />
        <PN name="MPEG_PS_PAL_MPEG1_L3,MPEG_PS_PAL_XAC3" remap="MPEG_PS_PAL" mimeType="video/mpeg" />
        <PN name="MPEG_TS_SD_AC3" remap="MPEG_TS_SD_EU" mimeType="video/vnd.dlna.mpeg-tts" />  
        <PN name="MPEG_TS_SD_AC3_ISO" remap="MPEG_TS_SD_EU" mimeType="video/mpeg" />
        <PN name="MPEG_TS_SD_NA_AC3,MPEG_TS_SD_NA_STD,MPEG_TS_SD_NA_STD_T" remap="MPEG_TS_SD_NA" mimeType="video/vnd.dlna.mpeg-tts" />
        <PN name="MPEG_TS_HD_NA_AC3,MPEG_TS_HD_NA_STD,MPEG_TS_HD_NA_STD_T" remap="MPEG_TS_HD_NA" mimeType="video/vnd.dlna.mpeg-tts" />      
        <PN name="AVC_TS_HP_HD_24,AVC_TS_HD_AC3" remap="AVC_TS_HD_24_AC3" mimeType="video/vnd.dlna.mpeg-tts" />  
        <PN name="AVC_TS_SD,AVC_TS_SD_AC3" remap="AVC_TS_HD_EU" mimeType="video/vnd.dlna.mpeg-tts" />
        <PN name="AVC_TS_HP_HD_24_AAC_LC" remap="AVC_TS_JP_AAC_T" mimeType="video/vnd.dlna.mpeg-tts" />
      </MediaProfiles>      
    </Client>
</Clients>




RE: Improved UPnP serving and client - sialivi - 2012-10-24

@alcoheca

Just so you don't miss it, someone posted about having a UPnP issue here -> http://forum.xbmc.org/showthread.php?tid=143459