Problems with livestream playback

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
membrane Offline
Senior Member
Posts: 163
Joined: Mar 2011
Reputation: 5
Post: #1
Hi,

I have trouble with the playback of http-livestreams. It works in Dharma, but in Eden, they just buffer. You have to press play to start them. Is there a way to tell XBMC that they are livestreams?

This is the interesting part:
Code:
print 'laola: use streamtype 1b'
                match_live_1b=re.compile('isLiveStream=true&videopfad=(.+?)&sendeerkennung').findall(link)
                req = urllib2.Request(match_live_1b[0])
                req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
#               if xbmcplugin.getSetting(pluginhandle,"inside") == 'false':
#                       req.add_header('X-Forwarded-For', xip)
                response = urllib2.urlopen(req)
                link=response.read()
                response.close()
                print link


                match_rtmp=re.compile('<meta name="rtmpPlaybackBase" content="(.+?)" />').findall(link)
                match_http=re.compile('<meta name="httpBase" content="(.+?)" />').findall(link)
                match_quality=re.compile('<video src="(.+?)" system-bitrate=".+?"/>').findall(link)

                http = match_http[0].replace("&i=&q=&k=&c=DE&a=&u=&t=&l=","&i=&q=&k=&c=DE&a=&u=&t=&l=&v=2.4.5&fp=LNX%2010,3,162,29&r=UEEBM&g=UICJXUGLJHOM")

                if quality == '0':
                        video = match_quality[0]
                if quality == '1':
                        video = match_quality[1]
                if quality == '2':
                        video = match_quality[-1]

                item = xbmcgui.ListItem(path=http+video)

                return xbmcplugin.setResolvedUrl(pluginhandle, True, item)

Code:
def addLink(name,url,mode,iconimage):
        u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)##
        ok=True##
        liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)##
        liz.setInfo( type="Video", infoLabels={ "Title": name } )##
        liz.setProperty('IsPlayable', 'true')##
        ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz)##
        return ok

If you want to look for yourself, download my repo (http://code.google.com/p/membrane-xbmc-r...p&can=2&q=), install Laola1 LIVE and play a KHL-Livestream.

My Repo:
http://code.google.com/p/membrane-xbmc-repo/
Home of the XBMC Add-ons: BundestagsTV (DE), Deluxemusic (DE,EN), Dorkly (EN), Extreme.com (EN), Gameone (DE), Kika (DE), Laola1.tv (DE,EN), Massive-Mag (DE), NHL Videocenter (EN), Nuna (DE), SachsenFernehen (DE), Spobox (DE) and Yavido (DE,EN).
find quote
divingmule Offline
Skilled Python Coder
Posts: 1,297
Joined: Oct 2008
Reputation: 61
Post: #2
I've run into this a few times, posted this thread but nothing useful came of it Frown
find quote
membrane Offline
Senior Member
Posts: 163
Joined: Mar 2011
Reputation: 5
Post: #3
It looks like XBMC doesn't recognise them as livestreams - the seekbar is active.

Is there a workaround?

My Repo:
http://code.google.com/p/membrane-xbmc-repo/
Home of the XBMC Add-ons: BundestagsTV (DE), Deluxemusic (DE,EN), Dorkly (EN), Extreme.com (EN), Gameone (DE), Kika (DE), Laola1.tv (DE,EN), Massive-Mag (DE), NHL Videocenter (EN), Nuna (DE), SachsenFernehen (DE), Spobox (DE) and Yavido (DE,EN).
find quote