TunerFreeMCE Plugins

TunerFreeMCE Plugins

TunerFreeMCE has the ability to run content from a variety of different sources, but doesn't cover every site out there. Fortunatly TunerFreeMCE version 3 allows developers to write simple plugins to bring other content in too. To install the plugins, download them from here, and unzip in to your Program Files/MillieSoft/TunerFreeMCE/plugins directory. After installation, update your program list to pick up the new programs.

If you are interested in writing your own plugins, see here for instructions.

4oD YouTube

Download

This plugin brings the latest 4oD content from YouTube.

Add youtube.com, google.com and google.co.uk to your sites as described in the FAQs, and then when you log in to youtube, it will remember your login.

ABC Australia

Download

Catchup TV from ABC Australia

 

British Pathé

Authors: Simon

Download

This plugin brings access to British Pathé film clips

 

NASA JPL

Authors: Simon

Download

This plugin brings access to NASA podcast videos

NASA TV

Authors: swarfega, ClarkF1 and liamcarbin

Download

This plugin brings access to NASA TV

News

Download

This plugin brings live content from sky news and eurosports news (found via ChannelZapper)

RTE

Download

This plugin brings content from RTE.ie

SeeSaw

Download

This plugin brings content from seesaw.com. Requires TunerFreeMCE 3.5.0 or later.

History: 1.1 - added support for latest SeeSaw content

Sling

Download

This plugin brings content from sling.com. It includes the CBS, NBC, Fox and Marvel channels

TED

Author: Simon Willcock

This plugin brings the latest TED videos.

TV Catchup

Author: Tom Parker

This plugin brings integration with TVCatchup which brings you live streaming of over 30 UK TV channels

TWIT.TV

Author: Mike Houghton from Windows7intouch.com

This plugin brings integration with TWIT.TV, bringing you the latest technology news

Yellowstone

Author: Max

Download
This plugin brings live video from Yellowstone National Park

TunerFreeMCE Plugin Creation

TunerFreeMCE Plugin Creation

It is possible to produce a plugin for TunerFreeMCE to bring in content from any source. This allows new channels to be added, and allows programs to be cached and viewed for those channels. This document describes how to produce thos plugins, using a Sling.com plugin as an example

1.  Create plugin directory

Each plugin will be delivered in it's own directory, so create an appropriatly names directory. In that directory you can place all of the files required for your plugin.

2. Create plugin definition file

The primary file that defines your plugin is an xml definition file called config.xml. Create that file in your plugin directory. The contents of the file are;

  • Definition of the plugin
  • A list of channels provided by the plugin
  • Details of how to read the list of programs
  • Details of how to play the program

3. Plugin definition

The root element of the plugin document is called TunerFreePlugin. It has the following attributes;

  • name. This is the name of the plugin used to display to the user which plugins are installed
  • provider. This is a code used to identify the provider of the content. It should only contain a-Z, 0-9 and _.
  • version. This us a number that will be used for checking for new versions
  • country, This should be an ISO country code. Used for VPD switching.
  • programType. Can be FLASH or WMV or WMP for a flash video page, or a .wmv stream.
e.g.
<TunerFreePlugin name="Sling" version="1.0" country="US" provider="SLING" programType="FLASH">
</TunerFreePlugin>

4. Plugin channels

A child of the root element is channels. This element contains the definition of all of your channels in the channel element. The channel element has the following attributes;

 

  • name. This is the display name of the channel
  • code. This is the internal code used to identify the channel. It should start with the provider name, and only contain a-Z, 0-9 and _.
  • logo. This is a url to the logo of the TV channel that will be used on the list of channels. This can be an http://, file:// or resx:// url, or can be a filename in the plugin directory. This will be displayed at a size 244x154
  • smallLogo. Optional. This is a url to the logo of the TV channel that will be displayed next to the program name. This can be an http://, file:// or resx:// url, or can be a filename in the plugin directory. This will be displayed at a size 20x20. If this is not specified, the logo url will be used.
  • background. Optional. This is a url to the background that will be shown when browing this channel. This can be an http://, file:// or resx:// url, or can be a filename in the plugin directory. If this is not specified, the default TunerFree logo will be used.
  • feed. This is the url which the system should go to to get a list of programs for the channel.
e.g.
<TunerFreePlugin name="Sling" provider="SLING">
<channels>
<channel name="CBS" code="sling_cbs" smallLogo="http://betaimg1.sling.com/sli/images/dyn/network/15_clip_logo/rs/120/90/15_clip_logo.jpg?v=6" logo="http://betaimg1.sling.com/sli/images/dyn/network/15_clip_logo/rs/120/90/15_clip_logo.jpg?v=6" feed="http://beta.sling.com/network/15/CBS/videos.rss"/>
<channel name="NBC" code="sling_nbc" logo="http://betaimg0.sling.com/sli/images/dyn/network/74_clip_logo/rs/120/90/74_clip_logo.jpg?v=3" feed="http://beta.sling.com/network/74/NBC/videos.rss"/>
<channel name="Fox" code="sling_fox" logo="http://betaimg1.sling.com/sli/images/dyn/network/41_clip_logo/rs/120/90/41_clip_logo.jpg?v=4" feed="http://beta.sling.com/network/41/Fox/videos.rss"/>
<channel name="Marvel" code="sling_marvel" logo="http://betaimg3.sling.com/sli/images/dyn/network/302_clip_logo/rs/120/90/302_clip_logo.jpg?v=2" feed="http://beta.sling.com/network/302/Marvel/videos.rss" background="sling-background.jpg"/>
</channels>
</TunerFreePlugin>

5. Feed tags

For feeds that are well formatted xml (e.g. rss, atom), the contents of the feed are read by specifying the tag names for each attribute that we are interested in inside the parser section of the definition. Each of those tag names is specified in one of the following definition tags;

  • programTag. This specifies the name of the program top level tag
  • episodeTag. Optional. This is the tag in which the episode name is held
  • programTitleTag. This is the tag in which the program name is held
  • programDescriptionTag. Optional. This is the tag in which the program description is held
  • dateTag. Optional. This is the tag in which the broadcast date is held
  • linkTag. This is the tag in which the link to the web page displaying the program is held
  • programIdTag. This is the tag in which a unique identifier for the program is held. This is used to track which programs have been watched, so it can be any unique text
  • programIconTag. Optional. This is the tag in which the program thumbnail icon is held
  • namespace. Optional. If your xml requires namespaces to parse, specify each namespace in a tag with an attribute of name to specify the namespace, e.g. <namespace name="video">http://www.google.com/schemas/sitemap-video/1.1</namespace>. You can have as many namespace tags as required.
  • channelPrefixTag. If your feed contains multiple channels in one XML file, you can specify which tag contains a channel name and prefix this to the code from the channel definition to create multiple channels from one stream. You can add dummy channels with empty feed strings to the channel list to specify channel icons for each prefixed channel.

If the value you need to get from the xml is the tag value (e.g. <id>123</id>, simply specify the tag name in the definition (e.g. <programIdTag>id</programIdTag>).

If the value you need is in an attribute of the tag (e.g. <id val="123"/>), specify the attribute name in the "attr" attribute of the definition (e.g. <programIdTag attr="val">id</programIdTag>).

If there are multiple nodes with the same name in the feed, you will need to pick one of them e.g.

<link rel="self" href="http://dj.rte.ie/vodfeeds/feedgenerator/videos/show/?id=1050152" />
<link rel="alternate" href="http://www.rte.ie/player/#v=1050152" />

you tell the system which one to pick by using the findAttr and findAttrVal attributes. findAttr is the name of the attribute to look for, and findAttrVal is the value in that attribute that needs to be matched (e.g. <linkTag attr="href" findAttr="rel" findAttrVal="alternate">link</linkTag>)

To read the date format, also specify a date mask in C# .NET format, e.g.  <dateFormat>ddd, dd MMM yyyy HH:mm:ss</dateFormat>. Your date string may contain information that you don't want to parse at the end, e.g a timezone. To ignore that, simply don't specify the whole date format string - the date will be truncated to the length of the format string before parsing.

an example is;
<TunerFreePlugin name="Sling" version="1.0" country="US" provider="SLING" programType="FLASH">
<channels>
<channel name="CBS" code="sling_cbs" smallLogo="http://betaimg1.sling.com/sli/images/dyn/network/15_clip_logo/rs/120/90/15_clip_logo.jpg?v=6" logo="http://betaimg1.sling.com/sli/images/dyn/network/15_clip_logo/rs/120/90/15_clip_logo.jpg?v=6" feed="http://beta.sling.com/network/15/CBS/videos.rss"/>
<channel name="NBC" code="sling_nbc" logo="http://betaimg0.sling.com/sli/images/dyn/network/74_clip_logo/rs/120/90/74_clip_logo.jpg?v=3" feed="http://beta.sling.com/network/74/NBC/videos.rss"/>
<channel name="Fox" code="sling_fox" logo="http://betaimg1.sling.com/sli/images/dyn/network/41_clip_logo/rs/120/90/41_clip_logo.jpg?v=4" feed="http://beta.sling.com/network/41/Fox/videos.rss"/>
<channel name="Marvel" code="sling_marvel" logo="http://betaimg3.sling.com/sli/images/dyn/network/302_clip_logo/rs/120/90/302_clip_logo.jpg?v=2" feed="http://beta.sling.com/network/302/Marvel/videos.rss" background="sling-background.jpg"/>
</channels>
<parser>
<programTag>item</programTag>
<episodeTag>title</episodeTag>
<dateTag>pubDate</dateTag>
<dateFormat>ddd, dd MMM yyyy HH:mm:ss</dateFormat>
<linkTag attr="href" findAttr="rel" findAttrVal="alternate">link</linkTag>
<programIdTag>media:player</programIdTag>
<programTitleTag attr="url">media:title</programTitleTag>
<programDescriptionTag>media:description</programDescriptionTag>
<programIconTag attr="url">media:thumbnail</programIconTag>
</parser>
</TunerFreePlugin>

6. Feed parsing

For content that cannot easily be defined as an xml tag, you can define a start and end string to search for. The value will be taken as the content between the start and end tag, e.g. if we wanted to get the program name from the text "programName=Doctor Who,episodeName=.." then we would define

<programStart>programName=</programStart>
<programEnd>,</programEnd>

If you need to search for multiple strings to find the exact position, i.e. find the first occurrence of string 2 after string 1. For example, when searching in the following "tag=programName,value=DoctorWho,tag=episodeName,value=..." you could specify the following;

<programStart>tag=programName</programStart>
<programStart2>value=</programStart2>
<programEnd>,</programEnd>

The tags that you can use for this are;

programStart
titleStart
episodeStart
dateStart
dateFormat
linkStart
programTitleStart
programDescriptionStart
programIconStart
programIdStart

programEnd
titleEnd
episodeEnd
dateEnd
dateFormat
linkEnd
programTitleEnd
programDescriptionEnd
programIconEnd
programIdEnd

programStart2
titleStart2
episodeStart2
dateStart2
dateFormat
linkStart2
programTitleStart2
programDescriptionStart2
programIconStart2
programIdStart2

programEnd2
titleEnd2
episodeEnd2
dateEnd2
dateFormat
linkEnd2
programTitleEnd2
programDescriptionEnd2
programIconEnd2
programIdEnd2

7. Click Points

For web page based video, the software will click on the appropriate points on the page to make the video play and go full screen. You need to tell the software where to click by giving the X and Y coordinates of a number of possible click points. You can include basic calculations using +, - and * and the constants H (screen height), H2 (half screen height), W (screen width) and W2 (half screen width). So, if the play button is 300 pixels to the left of the middle of the screen, specify it as "W2-300". If a click is not applicable, specify the coordinates as 0,0.

The tags are;

  • StartPlay. This is the location to be clicked to start playback first time.
  • PlayNonFS. Play when not in full screen
  • RevNonFS. Jump to start when not in full screen
  • FS. Go to full screen
  • PlayFS. Play when in full screen
  • RevFS, Jump to start when in full screen
  • HighRes. Toggle high resolution/low resolution
e.g.
<clicks>
<PlayNonFS x="W2-490" y="540"/>
<StartPlay x="0" y="0"/>
<RevNonFS x="0" y="0"/>
<FS x="W2+120" y="540"/>
<PlayFS x="W2-306" y="H*0.96"/>
<RevFS x="0" y="0"/>
<HighRes x="0" y="0"/>
</clicks>
To calculate the click positions, I put media center in to full screen, navigate to a page and then take a screenshot. I then paste that in to Paint and use that to find the co-ordinates of points on the screen. When not in full screen, the Y positions tend to be a fixed number, and the X positions tend to be plus or minus a fixed amount from the middle of the screen. In full screen, the Y position tends to be a fraction of the screen height, and the X positions again tend to be plus or minus a fixed amount from the middle of the screen, but are sometimes a fraction of the screen width.

8. Authentication

Sometimes feeds need authentication, e.g. they need you to have logged in in your browser first. The cache builder can pick up a logged in session from your browser, but only if you add the site to your Trusted Sites in IE by going to the Security tab in Internet Options, clicking on Trusted Sites and then Sites, and adding the site to the list.

To allow authenticated access at the time of playing the video, be sure to add the site to the Sites list in the Privacy tab of the Internet Options.

9. Testing

To test your plugin, put it in the C:/ProgramData/MillieSoft/TunerFreeMCE/additional_plugins folder. This folder is used to pick up any plugins that are not installed directly via the plugins page in TunerFreeMCE.

After you have created your plugin, run TunerFreeMCECacheBuilder.exe to pick up your programs. If you run the code with a -debug flag, some additional information will be outputted that may help you if you are having problems.

10. Publishing

After you have created your plugin, email me at  This e-mail address is being protected from spambots. You need JavaScript enabled to view it. to get your plugin added to the list of plugins shown within TunerFreeMCE

Overriding the click positions

The way that TunerFreeMCE plays, pauses and goes full screen for flash based content is it simulates a mouse click in just the right place. The software has some pre-seeded click positions for the most common window sizes, and does it's best to calculate the rest. This is done by looking at the file C:/ProgramData/MillieSoft/TunerFreeMCE/resolutions2.dat. That file is automatically updated on the fly too every time the list of programs is built, so any changes to the click positions, e.g. due to new banner adds on the pages, can be pushed out automatically.

Sometimes though, for whatever reason, your media center just doesn't quite display things in the same position as everyone else. You can set your own positions for the clicks by copying resolutions2.dat to C:/ProgramData/MillieSoft/TunerFreeMCE/resolutionOverride.dat. If that file exists, it will be read first, and does not get overwritten by the system.

The format of the file is as follows;

XResolution:Yresolution,bbcPlayNonFSX,bbcPlayNonFSY,bbcRevNonFSX,bbcRevNonFSY,bbcFSX,bbcFSY,bbcPlayFSX,bbcPlayFSY,bbcRevFSX,bbcRevFSY,bbcHighResX,bbcHighResY,bbcLivePlayX,bbcLivePlayY,bbcLiveFSX,bbcLiveFSY,huluPlayNonFSX,huluPlayNonFSY,huluFSX,huluFSY,huluHighResX,huluHighResY,huluPlayX,huluPlayY,bbc16CheckX,bbc16CheckY,bbc16OKX,bbc16OKY,fivePlayNonFSX,fivePlayNonFSY,fiveRevNonFSX,fiveRevNonFSY,fiveFSX,fiveFSY,fivePlayFSX,fivePlayFSY,fiveRevFSX,fiveRevFSY,C4PlayNonFSX,C4PlayNonFSY,C4PauseNonFSX,C4PauseNonFSY,C4FSX,C4FSY,C416CheckX,C416CheckY,C416OKX,C416OKY,C4PauseFSX,C4PauseFSY,BBCHDPlayY

where "bbcPlayNonFSX" means the X coordinate of the bbc play button not in full screen and so on. 

e.g.
1920:1080,646,524,680,524,1252,524,60,1012,147,1012,1034,568,710,552,1185,552,652,560,1308,245,1308,473,16,1065,748,613,765,654,484,500,534,500,1004,500,700,1055,739,1055,770,495,470,584,1075,584,483,637,723,727,30,1050,630

To change the click position for your screen, just keep one line in the file that has the closest resolution to yours in it, and delete the others. Do not put a return at the end of the line - it must not have any blank lines in it. Once you have that one line, edit the resolution to be the same as yours, and then change the click point that you need to correct. For example if you have 1920x1020 resolution, and you needed to change the coordinates for the bbc play button from 646,524 to 690,550, you would have the following change;

1920:1020,690,550,680,524,1252,524,60,1012,147,1012,1034,568,710,552,1185,552,652,560,1308,245,1308,473,16,1065,748,613,765,654,484,500,534,500,1004,500,700,1055,739,1055,770,495,470,584,1075,584,483,637,723,727,30,1050,630

Don't forget, when new functionality is added (e.g. the BBC HD streams recently), you may need to get a new copy of the resolution file to work from, because new click coordinates will be added.

 

Setting up VPN

Step by step guide to integrating OpenVPN with TunerFreeMCE for UK users

Instructions here refer to AlwaysVPN as an example, but that should not be seen as an endorsement. It worked for me OK though.

1) You will need to download and install a version of OpenVPN which allows the password to be entered in a plain text file, e.g.;

http://botsikas.blogspot.com/2008/10/building-openvpn-with-enable-password.html

2) Buy a proxy server package, e.g. AlwaysVPN. Download and install the config file from them (just the config file - you already have the OpenVPN client downloaded in step 1).

3) Go to  C:\Program Files (x86)\OpenVPN\config and create a text file with your username for the VPN service on the first line, and your password on the second. Save it as "user_auth.txt", e.g.

martin.millmore
bananas

3) Edit your config file to add the full name of the password text file after the text auth-user-pass. Also change any certificate references to be full paths, e.g.;

ca "C:\\Program Files (x86)\\OpenVPN\\config\\alwaysvpn2_ca.crt"
tls-auth "C:\\Program Files (x86)\\OpenVPN\\config\\alwaysvpn-ta.key" 1
auth-user-pass "C:\\Program Files (x86)\\OpenVPN\\config\\user_auth.txt"

4) Create a text file with the following command in it, and save it as "openUSVPN.bat";

"C:\Program Files (x86)\OpenVPN\bin\openvpn.exe" --config "C:\Program Files (x86)\OpenVPN\config\AlwaysVPN-Compatible.ovpn"

5)  Create a text file with the following command in it, and save it as "closeUSVPN.bat";

taskkill /f /im openvpn.exe

6) Edit your preferences to enter these scripts in the UK and US VPN command boxes;

7) Right click on Media Center, and select Run as administrator.This is important, because the openVPN command needs to run as administrator to configure the network settings.

8)  When you browse to hulu, it will open your US VPN connection. When you go to UK programs, it will kill the VPN connecton so that you can watch UK programs though your regular UK broadband connection.

Step by step guide to integrating Windows native VPN with TunerFreeMCE for UK users

1) Set up your windows VPN connection as described by your VPN provider. This will create a network connection in the Network and Sharing center. In this example, we will say the connection is called "MYUSVPN".

2) Create a text file with the following command in it, and save it as "openUSVPN.bat";

RasDial MYUSVPN username password

where username and password are your username and password

3)  Create a text file with the following command in it, and save it as "closeUSVPN.bat";

RasDial MYUSVPN /disconnect

4) edit the preferences as described above

Here's a list of different services that have been tested by TunerFreeMCE users. This is not an endorsement of the sites that work, but is just provided to help people.

Name Status
AlwaysVPN Works fine with Vista 32bit and Vista 64bit, but e-mail them to enable hulu support
Anonymizer Does not work with Media Center
HideMyIP Does not work with Media Center
UKiVPN Works fine. RasDial can be used to script the proxy switching

VPN setup for US users

Follow the same instructions as for UK users, but set your default country to US, and create an openUKVPN.bat file that opens the UK VPN, and a closeUKVPN.bat file that closes the VPN. Put the openUKVPN.bat file in the UK VPN Command prefernce, and the closeUKVPN.bat file in the US VPN Command prefernce.

VPN setup for other countries

If you not in either the UK or the US, you will need to open a VPN connection for both countries. To do this, set the default country to your home country (e.g. CA for Canada), and create two command files, openUKVPN.bat and openUSVPN.bat. In the openUKVPN file, put a command to close the US connection and then open the UK one. In the openUSVPN file, put a command to close the UK connection and then open the US one. This will swap between the two connections fine. When you exit media center, just kill any remaining VPN connections.

Step by step guide to integrating Proxy Switching with TunerFreeMCE for UK users

1) Get the details of your proxy server. In the following example, we will assume it has the server name "myproxy"

2) Create a a text file with the following command in it, and save it as "openUSVPN.bat";

netsh winhttp set proxy myproxy:80

3)  Create a text file with the following command in it, and save it as "closeUSVPN.bat";

netsh winhttp reset proxy

4) Edit the preferences as described above.

As before, if you are connecting from a different country, simply change the commands to suit.

 

Administrator privileges

Some VPN connections require you to run as an administrator, which is a pain on Vista in particular. There is a great solution to this documented here. In summary, you create a task in the Task Scheduler to run your VPN command, and select the Run With Highest Privileges option. Don't set any triggers so that it doesn't run on it's own. Then create a bat file which runs the task, e.g. it should have C:\Windows\System32\schtasks.exe /run /tn “Start VPN” where Start VPN is the name of your task. Then add that bat file as your VPN command.

TunerFree MCE Options

TunerFree MCE Options

In the TunerFree MCE preferences file, there are a number of options that you can set. Many, but not all of them are available through the preferences page. This preferences file is located in C:/ProgramData/MillieSoft/TunerFreeMCE/preferences.dat

getBBC
0 - don't get any BBC programs
1 - default

getITV
0 - don't get any ITV programs
1 - default

getC4
0 - don't get any C4 programs
1 - default

getFive
0 - don't get any Five programs
1 - default

getHulu
0 - don't get any Hulu programs
1 - default

cacheLocation
this will be the location of the file where the cache is saved. Includes the full file name, not just the directory. Default is C:/ProgramData/MillieSoft/TunerFreeMCE/programList.dat

installLocation
this is the location where the software is installed. Defaults to file://C:\\Program Files\\MillieSoft\\TunerFreeMCE\\

bbc_alba
0 - don't get any BBC Alba programs
1 - default

bbc_scotland
0 - don't get any BBC Scotland programs
1 - default

bbc_wales
0 - don't get any BBC Wales programs
1 - default

bbc_ireland
0 - don't get any BBC Wales programs
1 - default

logFile
if specified, the background service will write output to this file. Make sure it exists and is writable.
Default is empty

cacheInterval
time in miliseconds between the background service getting programs. Default is 3600000

ignoreVersion
If specified, this the latest version that you have chosen to ignore in the version checker.
Default is empty

remindDate
If specified, this is the date on which the version checker will next check.
Default today.

defaultCountry
This is the default country code for VPN switching, e.g. if set to UK, it will not need to do a switch when you go to UK programs, but will if you go to US.
Default is UK

switchUKCommand
This command will be run when switching from non-UK to UK programs
Default is empty

switchUSCommand
This command will be run when switching from non-US to US programs
Default is empty