[Request] TVNZ OnDemand

  Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
markhoney Offline
Senior Member
Posts: 134
Joined: Oct 2003
Reputation: 1
Location: Wellington, New Zealand
Post: #181
Hi WaterGoblin. Thanks for the pointers so far - I'm just trying to finish off the new version of this plugin, and I'm now looking at TVNZ. If you're right about RTMPDump being able to play from that URL, I'll have a look at if I can get XBMC to hand the HTTP URL to rtmp, rather than have XBMC try to play the URL directly.

As an aside, I've managed to get NZOnScreen working now. So we have working Ziln, NZOnScreen, Parliament TV and Shine TV in my new code. I've yet to finish off converting TV3 to use the new plugin structure (pretty much everything's class-based now), and TVNZ is my current challenge.

Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
find quote
markhoney Offline
Senior Member
Posts: 134
Joined: Oct 2003
Reputation: 1
Location: Wellington, New Zealand
Post: #182
WaterGoblin, how exactly did you feed that URL into rtmpdump? Can you give me the full command you ran?

Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
find quote
markhoney Offline
Senior Member
Posts: 134
Joined: Oct 2003
Reputation: 1
Location: Wellington, New Zealand
Post: #183
Looks like I might have hit a dead end with the new TVNZ steams, at least for now. They appear to be using a newer version of RTMP than is supported by rtmpdump. Here's the command I've just tried to run to grab a stream:

Code:
rtmpdump -r "rtmpe://cp133145.edgefcs.net/ondemand/&mp4:videos/963482467001/963482467001_1496686975001_4769206.mp4" -W "http://admin.brightcove.com/viewer/us20120319.1412/federatedSlim/BrightcovePlayer.swf" -o Test2.flv

And here's the output:

Code:
RTMPDump 2.4 git-6230845 2011-9-25
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
WARNING: HandShake: Type mismatch: client sent 6, server answered 9
INFO: Connected...
ERROR: HandleCtrl: SWFVerification Type 2 request not supported! Patches welcome
...
ERROR: Closing connection: NetStream.Play.StreamNotFound

It seems like the first warning is okay, as protocol version 9 is supported by rtmpdump, but the ERROR is because the new type of Flash Verification (type 2) hasn't been coded in rtmpdump yet.

For now I guess I'll keep trying to find out how to build the RTMP URLs, as hopefully someone will add the new verification type to rtmpdump at some point. My only other major work is to fix up the TV3 stuff and then I'll release the Eden version of the plugin.

Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
find quote
dteirney Offline
Team-XBMC Developer
Posts: 838
Joined: Jul 2007
Reputation: 6
Location: New Zealand
Post: #184
You could try the following patch to your librtmp and see if the server still works when using Type 1. http://lists.mplayerhq.hu/pipermail/rtmp...01578.html

Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
find quote
dteirney Offline
Team-XBMC Developer
Posts: 838
Joined: Jul 2007
Reputation: 6
Location: New Zealand
Post: #185
Actually, this patch is clearer. http://lists.mplayerhq.hu/pipermail/rtmp...01581.html

Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
find quote
markhoney Offline
Senior Member
Posts: 134
Joined: Oct 2003
Reputation: 1
Location: Wellington, New Zealand
Post: #186
Dave, thanks - I'll try that patch when I get the chance. My priority now, though, is to clean up the plugin a bit and get it released - especially as Eden is out already!

Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
find quote
markhoney Offline
Senior Member
Posts: 134
Joined: Oct 2003
Reputation: 1
Location: Wellington, New Zealand
Post: #187
I'm still trying to work out how to get the RTMP URL from TVNZ, and while poking around found that the PS3 site (http://tvnz.co.nz/ondemand/xl) grabs a page from a message broker that's kind of weird:

http://c.brightcove.com/services/messagebroker/amf

The page title is "gobbles!" and the page is full of the following:

Quote:This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat. This turkey likes to eat.

I assume that the page contents don't matter, and that it's the data in the HTTP request to the server that's important (including a GET variable called playerKey that I've removed from the link above). Still, it's a bit of light relief from trying to work out how to build these damned URLs, which is beginning to feel like I'm banging my head against a brick wall.

Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
find quote
dethfeet Offline
Junior Member
Posts: 21
Joined: Mar 2012
Reputation: 2
Post: #188
Hi,

I did not follow the whole thread and I'm outside of NZ. But I created a plugin for german TV station using the brightcove api.

You need to send an amf request to retrieve the url (using pyamf). I copied the code to do this from this plugin:
http://code.google.com/p/bluecop-xbmc-re...n303&r=303

You can see my plugin for reference here:
http://code.google.com/p/xbmc-dethfeet/s...default.py

Maybe this helps you...
find quote
markhoney Offline
Senior Member
Posts: 134
Joined: Oct 2003
Reputation: 1
Location: Wellington, New Zealand
Post: #189
Wow, thanks! I'll give this a try and see if I can grab the URL by hand, and if it works I'll code it in to my plugin.

Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
find quote
nickr Offline
Team-Kodi Member
Posts: 18,109
Joined: May 2009
Reputation: 363
Location: Christchurch NZ
Post: #190
Hi there Mark and the others in this thread.

I became aware on nzonscreen through a radio item on RNZ National during the weekend and immediately started to look for how to integrate it with XBMC. Google led me to this thread.

So is there any progress with that?

Cheers, Nick.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
(This post was last modified: 2012-04-16 09:41 by nickr.)
find quote
Stildawn Offline
Senior Member
Posts: 220
Joined: May 2012
Reputation: 0
Post: #191
I to would like to know if there is any progress?

And if so how to do it, I'm a complete XBMC noob lol.

Much thanks
(This post was last modified: 2012-05-30 01:04 by Stildawn.)
find quote
markhoney Offline
Senior Member
Posts: 134
Joined: Oct 2003
Reputation: 1
Location: Wellington, New Zealand
Post: #192
I'm back to working on this, now that I've finished moving house, etc.

I've found that there is a brightcove module for XBMC that I'm going to try to use, and I've also packaged up PyAMF for XBMC and will be releasing this alongside the TVNZ plugin for Eden. I'll try to be done for the end of the weekend, and will release even if I can 't get the TVNZ brightcove content playing.

Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
find quote
markhoney Offline
Senior Member
Posts: 134
Joined: Oct 2003
Reputation: 1
Location: Wellington, New Zealand
Post: #193
Hah, I think I've found my problem - PyAMF needs a fix, as documented at:

http://forum.xbmc.org/showthread.php?tid=119551&page=5

I seem to be getting useful data back from BrightCove now, so all I need to do is decode the data, extract the RTMP URL and hopefully TVNZ will be working an a couple of hours!

Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
find quote
layziefj Offline
Junior Member
Posts: 20
Joined: Jun 2010
Reputation: 0
Post: #194
thanks mark.. awesome stuff! downloaded the latest zip from your github and can confirm that prime tv and shine tv work.

eagerly waiting for the others..

thanks again
find quote
markhoney Offline
Senior Member
Posts: 134
Joined: Oct 2003
Reputation: 1
Location: Wellington, New Zealand
Post: #195
Hmmm, although I'm getting data back from BrightCove, it's not the data I want. I just seem to be getting responses with no video URLs, which probably means that I'm giving some wrong data to the broker. I've tried both the full browser and PS3 versions (they have different keys, etc), and neither are working.

I'm just waiting for my PyAMF module to be released (divingmule has released a version, but it doesn't have the fix that my plugin needs) and then I'll get this plugin submitted. In fact, as TVNZ isn't working I may as well release it now. Be warned, though, that some of the TV3 stuff has suffered from the website HTML changing (e.g. FOUR) and therefore not everything works. I'm hoping to clean this up this evening.

Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
find quote
Post Reply