v15 Playing HTTP url stream with thumbnail image.
#1
Hello.

I have following plugin code (small cut of interesting part):
Code:
###.....
    addon = xbmcaddon.Addon()
    path = addon.getAddonInfo('path')
    fname = path + 'temp.m3u'
    file = open(fname, 'w')
    file.write('#EXTINF:0,' + dispnm + '\n')
    file.write(streamurl)
    file.close()
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    playlist.add(fname)
    xbmc.Player().play(playlist)
    os.remove(fname)
And it works fine. Variable streamurl contain http url to remote m3u8 file. And it must be like that. I do not have other data like in rtmp streams.

So it is other way to play HTTP m3u stream and get display some thumbnail from http url also in window on left of side of stream name in player window?

Ofcourse I know code to play RTMP streams and there listitem can show thumbnail image, but using code like below I cannot play HTTP streams like m3u.
Code:
def playMedia(title, thumbnail, link, mediaType='Video'):
    li = xbmcgui.ListItem(label=title, iconImage=thumbnail, thumbnailImage=thumbnail, path=link)
    li.setInfo(type=mediaType, infoLabels={ "Title": title })
    xbmc.Player().play(item=link, listitem=li)
Please give me some code example. Thanks in advance.
Reply
#2
Hi!
Was looking to make a add-on that can play a http stream from a site.
Sounds kinda like this is exactly what I need.
Excuse my lack of experience (none in python), but could i use this code to stream a video from a
.m3u8 (http://) - link ?

do you have any screenshot or guidance then that would be awesome.

Im my post is inappropriate or something just delete, and maybe send me a PM ? Smile
Reply
#3
Instead of writting the videos to the m3u file just define a listitem for each video and add it to the playlist. Then call Player.play() with the overall playlist
Reply
#4
@enen92: please give me some example of Python code to do playlist rntry for HTTP url to m3u. Because the part of my code was from my video addon, which comes from place where I have function playStream, so I alredy selected TV stream from list obtained from JSON file downloaded from some site and now I need to adter selection and obtain full url to chunked m3u play it in player. My addon already do this but thumbnail logo of channel is visible only when highglihgying channel on list before playing.
Reply

Logout Mark Read Team Forum Stats Members Help
Playing HTTP url stream with thumbnail image.0