Watch filmon.com TV Channel without the FilmonAddon

Discussion of plugin / script development for XBMC4Xbox
Post Reply
skatulskijean
Posts: 1028
Joined: Wed Jul 04, 2012 8:01 am
Has thanked: 1 time
Been thanked: 148 times

Watch filmon.com TV Channel without the FilmonAddon

Post 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
User avatar
Wacky_35016
Posts: 15
Joined: Mon Feb 24, 2014 11:42 am
Has thanked: 11 times
Contact:

Re: Watch filmon.com TV Channel without the FilmonAddon

Post 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.
User avatar
nidge
Posts: 472
Joined: Fri Jul 27, 2012 8:29 pm
Location: Norfolk, United Kingdom
Has thanked: 24 times
Been thanked: 26 times
Contact:

Re: Watch filmon.com TV Channel without the FilmonAddon

Post 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.
http://www.theoriginalxboxshoppe.weebly.com
http://www.ebid.net/uk/stores/Computers-and-Consoles


Crystal Xbox v1.4, Xecuter 3, 500gb sata hard disk, 1ghz CPU, 128mb RAM, HD component 720p, blue LED's.
Crystal Xbox v1.4, Xecuter 3, 320gb sata hard disk, stock CPU, 128mb RAM, HD component 720p.
skatulskijean
Posts: 1028
Joined: Wed Jul 04, 2012 8:01 am
Has thanked: 1 time
Been thanked: 148 times

Re: Watch filmon.com TV Channel without the FilmonAddon

Post 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
User avatar
nidge
Posts: 472
Joined: Fri Jul 27, 2012 8:29 pm
Location: Norfolk, United Kingdom
Has thanked: 24 times
Been thanked: 26 times
Contact:

Re: Watch filmon.com TV Channel without the FilmonAddon

Post by nidge »

Sorry Jan I will re-post in a different thread :)
http://www.theoriginalxboxshoppe.weebly.com
http://www.ebid.net/uk/stores/Computers-and-Consoles


Crystal Xbox v1.4, Xecuter 3, 500gb sata hard disk, 1ghz CPU, 128mb RAM, HD component 720p, blue LED's.
Crystal Xbox v1.4, Xecuter 3, 320gb sata hard disk, stock CPU, 128mb RAM, HD component 720p.
rookie
Posts: 6
Joined: Tue Mar 18, 2014 1:49 am

Re: Watch filmon.com TV Channel without the FilmonAddon

Post 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
Post Reply