[REQUEST] TVNZ OnDemand Video Plugin - Watch New Zealand Television?

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
matthuisman Offline
Skilled Python Coder
Posts: 597
Joined: Sep 2006
Reputation: 4
Location: Chch, New Zealand
Lightbulb  [REQUEST] TVNZ OnDemand Video Plugin - Watch New Zealand Television?
Post: #1
Hi all,

This plugin would only be good for kiwi's really... but my gf would love me if someone made a plugin so she could watch her Shortland Street episodes.

the website is :http://tvnzondemand.co.nz/

I could have a go, i just see it uses Flash for videos and don't know how to get the video link from the html code...
find quote
matthuisman Offline
Skilled Python Coder
Posts: 597
Joined: Sep 2006
Reputation: 4
Location: Chch, New Zealand
Post: #2
object data="http://images.tvnz.co.nz/on_demand/images/player.swf" type="application/x-shockwave-flash" height="265" width="320" name="player" id="player"><param value="http://images.tvnz.co.nz/on_demand/images/player.swf" name="movie"><param value="always" name="allowScriptAccess"><param value="true" name="allowFullScreen"><param value="true" name="swLiveConnect"><param value="duration=3145&amp;cid=1432121&amp;title=red_bull_air_race_ep7&amp;previewURL=&amp;chapterURLs=http://download.tvnzondemand.co.nz/download/store1/flash/2007/shows/redbullairrace_2007_ep8_sm945752_part1.flv;http://download.tvnzondemand.co.nz/download/store1/flash/2007/shows/redbullairrace_2007_ep8_sm945752_part2.flv;http://download.tvnzondemand.co.nz/download/store1/flash/2007/shows/redbullairrace_2007_ep8_sm945752_part3.flv;http://download.tvnzondemand.co.nz/download/store1/flash/2007/shows/redbullairrace_2007_ep8_sm945752_part4.flv;http://download.tvnzondemand.co.nz/download/store1/flash/2007/shows/redbullairrace_2007_ep8_sm945752_part5.flv&amp;CG=ondemand-channel-one-distributor-img-genre-sport-international-series-redbullairrace2007-episode-redbullairraceep7&amp;co=nz" name="flashVars">

ahhahah, looks promising :-P

I may attempt myself... i hope XBMC can play flash vids Tongue
find quote
matthuisman Offline
Skilled Python Coder
Posts: 597
Joined: Sep 2006
Reputation: 4
Location: Chch, New Zealand
Post: #3
Yup, it can! woot! will have this plugin shortly!
it will be my first plugin so will see how it goes Big Grin
find quote
Sycophant Offline
Junior Member
Posts: 3
Joined: Nov 2008
Reputation: 0
Post: #4
Had any success with this?
find quote
Sycophant Offline
Junior Member
Posts: 3
Joined: Nov 2008
Reputation: 0
Post: #5
I see there are also XML feeds galore...

http://tvnzondemand.co.nz/search/atom_sk...&l=150&s=d

http://tvnzondemand.co.nz/content/eml_se..._skin.atom

Series XML is wrapped in <div id="video_feature_rss"> on each show's page
find quote
Sycophant Offline
Junior Member
Posts: 3
Joined: Nov 2008
Reputation: 0
Post: #6
The more I look at it, the more difficult it becomes - most videos aren't in the simple progessive form as above, most are streamed directly from the server by the SWF player - not an HTTP request at all.

I guess wifey can't watch Shortland St on the Xbox.
find quote
moonglow Offline
Junior Member
Posts: 8
Joined: Feb 2009
Reputation: 0
Post: #7
Any chance of this plugin happening? or it too messy? It would be a great way to avoid more freeview satelite dishes Smile
find quote
gerner Offline
Donor
Posts: 164
Joined: Apr 2004
Reputation: 0
Location: NZ
Post: #8
I was looking at this, are there any higher def streams available?
find quote
angusj Offline
Junior Member
Posts: 1
Joined: Aug 2009
Reputation: 0
Smile  Happy to give this a shot...
Post: #9
Nerd If someone can explain how the value clauses are ordered in the following code, I can get to work on constructing a simple browser for this. A complete novice at Python, borrowed this section from the Joox script.

Have no problem specifying the mfind statement itself, its the ordered syntax that follows "value = m[index4+3:index6]" Or perhaps there is a better solution to scrape the episodes Confused?


#fill the title

index1 = m.find('href="./cat')

index2 = m.find('href="./id')

index3 = m.find('</a><br')

index4 = m.find('id/')

index5 = m.find('">')

index6 = m.find('"',index4)

if index1 != -1 or index2 != -1:

if index3 != -1:

tmp = CMediaItem() #create new item

tmp.id = counter



if index4 != -1:

#value = m[index4+3:index5]

value = m[index4+3:index6]

tmp.URL = 'http://video.stage6.com/' + value + '/.divx'



value = m[index5+2:index3]

tmp.name = value



counter = counter + 1

tmp.type = 'video'



else:

value = m[index1+7:index5]

tmp.URL = 'http://joox.net' + value



value = m[index5+2:index3]

tmp.name = value



counter = counter + 1

tmp.type = 'html_body-sidebar'



self.list.append(tmp)

counter = counter + 1

elif counter > 1:

index = m.find('</div>')

if index != -1:

return 0 #we are done



return 0
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 25,689
Joined: Oct 2003
Reputation: 169
Post: #10
value = m[index4+3:index6]

grabs everything after id/ (3 characters after the position pointed to by index4, which is the start of id/) up to index6, which is the first " after index4.

In this case it looks like it's grabbing from something that looks like this:

href="http://some.url/here/id/this_is_what_we_want"

index4 will point to the offset of id
index6 will be that last quote
and it'll extract this_is_what_we_want

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 25,689
Joined: Oct 2003
Reputation: 169
Post: #11
I recently started hacking something up for this. I have a plugin that can browse TVNZ's ondemand website and generate the show + episode listings with thumbnails etc.

Problem is they've switched to RTMPE so XBMC doesn't support playback. I've also had no luck trying to interface with the RTMPE server using rtmpdump either (which supports RTMPE). If anyone has skills in decompiling the player SWF or using Wireshark (which doesn't seem to give anything of interest) then drop me a line.

It appears to be bailing with an error about an invalid timezone.

TV3 also has an ondemand site - not sure how to get the FLV out of that one though - it doesn't appear to be using a .smil file, and the video links appear non-obvious.

Both are probably geo coded - I can probably hook up a proxy login if that would help someone with the knowledge to make progress.

It would be great to be able to show off this sort of capability at linuxconf.au in January (which is in Wellington, NZ).

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Temhil Offline
Skilled Python Coder
Posts: 396
Joined: Apr 2008
Reputation: 1
Location: Canada
Post: #12
I found a post with a beginninhg of implementation in python of RTMPE decoding.
Not sure waht is the status, but I post it in, just in case:
http://hak5.org/forums/index.php?showtop...t&p=139631

[Image: passionxbmc_signature.png]
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

[Image: project_thin_badge.gif]
find quote
rand Offline
Junior Member
Posts: 1
Joined: Dec 2009
Reputation: 0
Post: #13
jmarshall Wrote:I recently started hacking something up for this. I have a plugin that can browse TVNZ's ondemand website and generate the show + episode listings with thumbnails etc.

Problem is they've switched to RTMPE so XBMC doesn't support playback. I've also had no luck trying to interface with the RTMPE server using rtmpdump either (which supports RTMPE). If anyone has skills in decompiling the player SWF or using Wireshark (which doesn't seem to give anything of interest) then drop me a line.

It appears to be bailing with an error about an invalid timezone.

TV3 also has an ondemand site - not sure how to get the FLV out of that one though - it doesn't appear to be using a .smil file, and the video links appear non-obvious.

Both are probably geo coded - I can probably hook up a proxy login if that would help someone with the knowledge to make progress.

It would be great to be able to show off this sort of capability at linuxconf.au in January (which is in Wellington, NZ).

Cheers,
Jonathan

There was a re-write of rtmpdump and a new release just a few days ago, and the project was re-homed, it is now with the mplayer team.

Check:

http://rtmpdump.mplayerhq.hu/

Hopefully this will help - looking forward to see rtmpe support in xbmc
find quote
praganzi Offline
Junior Member
Posts: 3
Joined: Aug 2009
Reputation: 0
Post: #14
<bump>

Any news? There's been a lot of views to this thread. There may be only 4,000,000 people here total, most of whom won't own an xbox, but there is the demand.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 25,689
Joined: Oct 2003
Reputation: 169
Post: #15
I have a nasty hacked up plugin but it requires librtmp. It's recently been added to ffmpeg (as in last day or two) so hopefully we may be able to get something up and running in time.

If any python dev wants to play with it let me know and I'll send you the code.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Post Reply