Kodi Community Forum
[RELEASE] ITV Catchup (Video) Plugin - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: [RELEASE] ITV Catchup (Video) Plugin (/showthread.php?tid=32897)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20


Subtitles and Title - dlake02 - 2011-08-01

Hi

I'm re-working some of the ITVPlayer code - I'm new to XBMC and Python, but an experience C++ coder/Wireshark user.

So far, I've discovered that the current 1.0.0 ITVPlayer always gives the lowest bit-rate response, and I've made modifications so that by default the highest bit rate is payed.

I need some pointers please.

1) Subtitles. ITV makes the subtitles available via a URL in XML format. I've trapped that URL to a variable in the .py script. How do I get XBMC to play the subtitles from that URL ?

2) Info. When you are watching a stream and press the "I" button, up pops details of the current stream (name, time, etc). But at the moment, it just shows the programme name as "ITV." How do I populate the information on the player page ?

3) Is there a full set of API documentation I should be reading to give me these answers ?

Thanks in advance - sorry if these are simple/obvious to others, but they're not to me !!!!

David


- pipps - 2011-08-01

We are looking forward to the release of your new and improved version, David! Smile


- gobbledigook - 2011-08-01

dlake02 Wrote:1) Subtitles. ITV makes the subtitles available via a URL in XML format. I've trapped that URL to a variable in the .py script. How do I get XBMC to play the subtitles from that URL ?

2) Info. When you are watching a stream and press the "I" button, up pops details of the current stream (name, time, etc). But at the moment, it just shows the programme name as "ITV." How do I populate the information on the player page ?

3) Is there a full set of API documentation I should be reading to give me these answers ?

Thanks in advance - sorry if these are simple/obvious to others, but they're not to me !!!!

David

hi Smile whilst i can't give you any pointers... your questions may be better answered in the Python Script and Plugin Addon Development


- dlake02 - 2011-08-01

Thanks - that's where I've been looking to try to understand the features/functions available.

You could spend several epochs just trying to search for answers - so far, I've been able to add the correct "Title" information by comparing the BBC iPlayer implementation - i.e. Reverse Engineering !

I can't fathom out subtitles though - the .xml that ITV is giving me gives the subtitles and play times, but how you get XBMC to read that doesn't seem to have pointers. So, it's back to Wireshark, XBMC logs and BBC iPlayer to see if I can copy that.


- dlake02 - 2011-08-01

OK - now I understand what's going on.

ITVPlayer delivers subtitles in the W3C standard TTML. XBMC seems to rely on the proprietary (but open) .srt format.

So, I need to:

a) download the associated subtitle file
b) convert TTML to srt
c) put that file in the correct place (and I have NO idea where that is at the moment)
d) Sit back and enjoy.

Working on it.....


- krish_2k4 - 2011-08-01

just to take note, ITV Catchup will be going behind a paywall from January. and so ITV Cathcup website will be changing.


- dlake02 - 2011-08-01

Quote:ITV Catchup will be going behind a paywall from January. and so ITV Cathcup website will be changing.

Yeah - I read this and laughed when I saw the bit about how ITV were helping to fund "Digital Britain !"

In my professional life, I'm deeply involved with all things Internet. To be honest, it's time for ALL the broadcasters to wake-up, but they are stuck in the past with delivery mechanisms that are ancient, expensive and out-dated. Investing in DTT was a huge mistake - the BBC and ITV could (should) have worked with the ISPs to rebuild the Internet to support streaming properly (admission control, multicast, QoS, etc), but instead they wasted it on what they have been building for 50+ years. So, we're left with having to fund outdated transmission systems that fewer and fewer people will use, whilst the Internet remains under-invested and fragmented.

Of course, the most damage was done when the meddlers at Ofcom originally prevented BT from distributing TV. That would have exposed BT from day 1 to the issues of streaming over the 'net, issues that are still many years from being solved.

Sorry - highly personal opinion ! No problem with paying, but I'd like the money to go to a modern transport network - not large transmitters with limited capacity serving non-mobile consumers.


- dlake02 - 2011-08-04

Just a quick update. I am still working on this, but work has been crap.

So, to date, I have the plugin now playing the highest resolution offered for each stream, the title information showing together with a thumbnail if you press "i" during playback and I'm downloading any associated subtitles.

I had a (nasty) crash last night when I was trying to format the subtitles into .srt format (code lifted from the BBC iPlayer plugin) and I'm hoping to debug this today sometime.

Getting there !

David


- dlake02 - 2011-08-12

Apologies for the delay.

I've updated addon.xml and default.py. Please replace the existing ones in your ITV plugin directory with these:

http://code.google.com/p/xbmc-itv-player/downloads/detail?name=default.py&can=2&q=

http://code.google.com/p/xbmc-itv-player/downloads/detail?name=addon.xml&can=2&q=

You then need to create a new directory in userdata:

"plugin.video.itv"

Under this directory, create two subdirectories:

"Images"
"Subtitles"

The new plugin will play the highest quality stream available, provides subtitles where available, and displays the programme thumbnail correctly.

I'm working on colour for the subtitles when I can find out what's supported by XBMC.

Enjoy !

David


- ady199 - 2011-08-12

dlake02 Wrote:Apologies for the delay.

I've updated addon.xml and default.py. Please replace the existing ones in your ITV plugin directory with these:

http://code.google.com/p/xbmc-itv-player/downloads/detail?name=default.py&can=2&q=

http://code.google.com/p/xbmc-itv-player/downloads/detail?name=addon.xml&can=2&q=

You then need to create a new directory in userdata:

"plugin.video.itv"

Under this directory, create two subdirectories:

"Images"
"Subtitles"

The new plugin will play the highest quality stream available, provides subtitles where available, and displays the programme thumbnail correctly.

I'm working on colour for the subtitles when I can find out what's supported by XBMC.

Enjoy !

David

I'm getting a script error running the plugin.........(on ATV2)


- dlake02 - 2011-08-12

I don't have ATV2 to test on, so I'll need a debug log please...

David


- dlake02 - 2011-08-12

OK, spot the deliberate mistake....

The Images and Subtitles directories need to be in:

$XBMC_HOME\userdata\addon_data\plugin.video.itv\

Sorry !

David


- MacLondon - 2011-08-13

I got a script error on Windows with this new version, due to absence of a 'utils.py' file.

However I experimented by copying the 'utils.py' file from the BBC iPlayer plugin's folder into the ITV Player's folder and it worked again, presumably as intended.

Are these BBC + ITV plugins meant to have different versions of 'utils.py', or is it the same one?


- dlake02 - 2011-08-13

So you've spotted deliberate error number 2....

Sorry - put it down to jetlag an work madness.

Basically, I've stolen large amounts of code from the BBC iPlayer work, so yes, you'll need to utils.py from that plugin.

David


- ady199 - 2011-08-14

ITV player now working - Many Thanks

How do you turn off the subtitles??