Page 1 of 1

Watch filmon.com TV Channel without the FilmonAddon

Posted: Fri Feb 28, 2014 11:58 am
by skatulskijean
A User hat a problem to access the stream adress for a Filmon.uk tV Channel so i have quickly written a Filmon.uk parser.
I have not intress to developing a full Filmon uk addon for xbmc4xbox but i think one or more user want a solution to acess one or more
Filmon.uk Tv streams on your own little addon :


this have the dependencies from scriptmodule.requests(python 2.7)
why :
the code is cleaner, i can a session request (get or post ) easy do ,and i want not to imports more as i want then requests can handle json intern.

ok here is :

Code: Select all

import requests,re,os,xbmc,xbmcgui
from urlparse import urlparse

url=None
header = {"Referer": url,"X-Requested-With": "XMLHttpRequest","User-Agent": "Mozilla/5.0","Accept":"application/json, text/javascript, */*; q=0.01",'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'}
swfUrl = "http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf"
infoUrl='http://www.filmon.com/ajax/getChannelInfo'
s = requests.Session()


url='http://www.filmon.com/tv/bbc-one'
name=url.split('tv/')[1]



def filmonparse(url):
    pageUrl=url
    html=s.get(url).content
    channel_id = re.findall("/channels/(\d+)/extra_big_logo.png", html,re.S)[0]
    quality='low'
    data={'channel_id':channel_id,'quality':quality}
    entry = s.post(infoUrl, data, headers=header).json()[0]
    rtmp = entry.get("serverURL")
    playpath = entry.get("streamName")
    parsed = urlparse(rtmp)
    if parsed.query:
      app = "{0}?{1}".format(parsed.path[1:], parsed.query)
    else:
      app = parsed.path[1:]
    streamurl='%s playpath=%s app=%s swfUrl=%s pageurl=%s live=true' % (rtmp,playpath,app,swfUrl,pageUrl)
    li = xbmcgui.ListItem(name)
    xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(streamurl,li)




filmonparse(url)
the only what you must do to have a working addon from your favorite Filmon Uk stream to watch it on xbmc4xbox is:
go with ftp to your xbox Q/video/plugins and create a Folder with the name of your wanted channel.
On this channel create a File default.py with the code what i have posted on it.
Change the url on the default.py to the tv streamurl what you want.
Create a 250*250 channel Picture (jpg) name this default.tbn and put this to the created directory.

When you then go to video plugins on your xbmc4xbox on the xbox self you can see your lttle addon ,click it and watch your stream.

Regards Jan

Re: Watch filmon.com TV Channel without the FilmonAddon

Posted: Fri Feb 28, 2014 8:15 pm
by Wacky_35016
Thank you so much for all you do to keep my xbox alive....I also used the rtmp way you should me on aljeerza to make one for Russia today news and it worked perfectly. My next project today is getting this oxygen rtmp play path together. I messed with rtmp before with Vlc shares for my soft modded wii. I believe though that I'm going to get a android stb when my taxes come in and of course will have xbmc on it or I will put it on it.

Re: Watch filmon.com TV Channel without the FilmonAddon

Posted: Sun Mar 02, 2014 4:43 pm
by nidge
FilmOn.com, USA I think? works in the UK from the SportsDevil addon :) Scroll down to Live TV and choose FilmOn com, all seem to work :D
Movies, Lifestyle, Music, Comedy etc... available. No TV guide, so you take pot luck of what's showing.
Choose UKLIVE TV for UK channels, not really anything that you can't get on Freeview though :(

Tested and working on XBMC4xbox 3.5-BETA2.

Re: Watch filmon.com TV Channel without the FilmonAddon

Posted: Sun Mar 02, 2014 5:50 pm
by skatulskijean
nidge wrote:FilmOn.com, USA I think? works in the UK from the SportsDevil addon :) Scroll down to Live TV and choose FilmOn com, all seem to work :D
Movies, Lifestyle, Music, Comedy etc... available. No TV guide, so you take pot luck of what's showing.
Choose UKLIVE TV for UK channels, not really anything that you can't get on Freeview though :(

Tested and working on XBMC4xbox 3.5-BETA2.
Sorry i'm not understand what you mean.
On this tread i help to access a flimon uk stream on a own little addon.
This have nothing to with accessing or not accessing anything over a other addon or script.
mainly i do that , that the user self beginn creating addons for xbmc4xbox and hope that one or more user switch from only using to
doing.

Regards jan

Re: Watch filmon.com TV Channel without the FilmonAddon

Posted: Mon Mar 03, 2014 9:47 am
by nidge
Sorry Jan I will re-post in a different thread :)

Re: Watch filmon.com TV Channel without the FilmonAddon

Posted: Tue Mar 18, 2014 1:56 am
by rookie
Jan,
I would like to open the favorites.plx file stored in Navix folder in my local hard drive
to let the user select his/her favorite. Can you show me how to do this in xbmc python?

Thank you.
rookie