PDA

View Full Version : [RELEASE] Norwegian NRK Web-TV (Video) Plugin


VictorV
2009-06-14, 00:17
I've seen some request for å NRK plugin, so i decided making one. Then I could both learn some myself, and make something others might enjoy :)

I've used quite a bit of time looking at the workings of the web-tv and finally made something i think should be slightly better than the previous scripts. No offence tho :)
The plugin are not finished and there's a lot of work left, but this release will work pretty well.
I hope some of you will give it a try and give some feedback. What can be done to make it better? Something missing? Should I implement NRK web radio or should that be a stand-alone plugin?

Download:
http://prosjektet.net/xbmc/plugins/NRK_NETT_TV.7z


I know there are some issues with the setting, and that's really just me beeing lazy.
There are no thumbnails under "Sport" and "Nyheter" becouse I haven't figured out how to fetch them yet.
I'm also working on some illustration icons for the categories so we don't will se the standard folder icon everywhere.

If someone want to help out, that's always appriciated :)

spiff
2009-06-14, 10:02
awesome!

now, if you could set the 'title' in the video info tag so they work in video library mode as well (that goes for you and ALL OTHER PLUGIN AUTHORS) that would be even better!

The-Boxhead
2009-06-15, 20:06
Exelent, been waiting for this and i like plugins much more than
scripts since they blend better with the skins ;)

However i'm unable to play anything, it looks up all catagories and list
sub containers but all content is listed up as 0.0kb and they dont play at all.

Is there anything with my system that prevents this ? im using linux, ubuntu interpid and latest bleeding edge from yesterday when i tested this.

Could you please specify wich xbmc version this plugin was tested with ?

teddy
2009-06-15, 23:19
I have the same problem, I can play some of clips in the "Nyheter" section, but that's it.

Also running XBMC on Ubuntu.

VictorV
2009-06-16, 10:49
I have tested with Babylon 9.04.1 t3ch build for xbox
Have you tried to play a file from nrk directly?

mms://straumod.nrk.no/disk08/arven/2009-01-07/Arven_300_449515_20090107_223000.wmv

Ii seems like the built in DVDPlayer won't decode wmv9. It works with xbmc for xbox with mplayer, but not in windows build for me.
I'm working on integrating some other media from nrk's archive that will play on all platforms, bur it's a damn shame the program section won't work.

The-Boxhead
2009-06-16, 23:35
I have tried 10-15 random items from all the Nyheter,Sport and programmer category. none of them plays.

But that can be because im running bleeding edge xbmc with ubuntu.

The-Boxhead
2009-07-02, 23:23
Hmmm - still not getting this to work. Just wondered if anyone has this semi working or whatever. That is on linux...

klikkamongo
2009-07-03, 01:21
I have windows xp with Babylon - 9.04, I can browse all the folders, but nothing happens when I click the programs..

VictorV
2009-07-03, 22:11
I've made a lot of work in a new version of this plugin, and should be releasing it in a few days.

The problem with playing media from 'program' section on a windows/linux build, seems like lack of support within the dvdplayer. (wmv9/mms)
This means that xbox is the only supported platform for this section

I'm not sure exactly what causes the failure of playback in the playlists ('sport', 'news',++).
The stream is fetched through .../stream.ashx?id=<ID>
*<ID> - a generated number (autoincremented?) from the database.
The ashx acts like a handle to the media file on the server side.
Some times it works, some times it don't. When it don't it reaches EOF immediately after starting playback
I know the location of the media files, but I can't figure out a way to match the medias id or title against the path or file name.


I will post some more information about the problems, some logs, and my notes about the structure of the plugin and NRK's hosting when I'm done. Then maybe someone can helps us get some answers and/or solutions.


I've also made some new functionality, so there will bew some working section for windows and linux users :p

berland
2009-07-07, 00:18
This is fantastic news, I have been close to starting something similar myself, but this looks way better.

I have a question. Would you care to release the code under the license "GPL v2 or later"? This will encourage contributions from others.

Also, it would be great if we could host this at
http://code.google.com/p/xbmc-addons/

(if you agree with my license suggestion).

I do not have write access here, but someone might help out?

berland
2009-07-07, 00:20
For the record, I experience the same problems with playback. Playing the mms:-stream in the url above directly with mplayer works.

xbmc-svn-21138, Ubuntu 9.04 32-bit.

VictorV
2009-07-07, 17:21
Berland: I will release it under GPL 2, and yes we should get in a repository, but we probably should figure out some of the major issues first?

I had a look at the problem with the playlist videoes again, and I've made a quick and dirty plugin for browsing the raw html directories.

http://www.prosjektet.net/xbmc/plugins/NRK_dir_browser.7z
This is just for testing purposes, so please don't comment the code :p

If you try this, you can see that videos from icanal's hosting will work, but don't videos from pd.nrk.no. This implies that the playlist videos that does work in my plugin is those who are redirected to icanal's hosting.

VictorV
2009-07-07, 18:46
Here are the main modules for the nrk plugin, so you can see the context:

http://prosjektet.net/xbmc/src/nrk.py.html
http://prosjektet.net/xbmc/src/conman.py.html

You can also download the source, so you can be able to test your selves. I haven't implemented this new api in a functional xbmc plugin yet, so it's a command line test.

Download source:
http://prosjektet.net/xbmc/src/nrk_api_alphabeta.7z

At this stage it wouln't be much changed for the users to see. I've created some thumbnails for the various themes (found at: http://prosjektet.net/xbmc/src/images/ ), added the live section, and there's the html browser used for testing. But I've completly re-written the backend. I've added functionality for search, subtitles and use of the nrk's api for getting path (it's just show-off)

Todos:

Find a solution for playback of playlist videos (high priority)
Add support for NRK podcasts and video podcasts (medium priority)
Add support for NRK web radio (low priority)

spiff
2009-07-08, 22:00
hi,

okay, i sort of have this working on linux, but it needs some work

1) it needs my libmms based input stream class - it's not clean enough to be commited just yet, but within a few days
2) it needs you to
1) replace mms with http in the program section urls
2) grab that http url
3) grab the first [ref1] in there
example output

[Reference]
Ref1=http://straumod.nrk.no/disk04/Br_drene_Dal/2004-03-23/Kringkastingsr_det_650_WM_20040323_133507.wmv?MSWM Ext=.asf
Ref2=http://10.103.0.61:80/disk04/Br_drene_Dal/2004-03-23/Kringkastingsr_det_650_WM_20040323_133507.wmv?MSWM Ext=.asf


4) replace the http in that url with mms
5) pass that url as the playback url to the player

with that done, i have perfect playback in xbmc for linux (and osx and windows)

VictorV
2009-07-09, 16:29
That's really great initiative, spiff. Gives me some new inspiration to spend more time time on this plugin.
Those steps you posted above should't require more than a few lines of python code and will be easy to implement

The-Boxhead
2009-07-10, 23:19
Great news ! thanks you both mr grumpy and victor !
If i only could do python coding i would help ;)

Hope progress is going along !

VictorV
2009-07-13, 18:15
I've spent some time coding on this plugin now, and it should work as specified by spiff. I re-organized the structure a bit, and added different views and a search function. I've also added some icons to make it look slicker, but some of them should absolutely be replaced with some that will fit better.
I'll try to fix bugs as they appear, and I'll try to write some error handling into it when I have some spare time.
I also hope we hear some good news from spiff soon, as it is a bit more enjoyable coding on something that works :p

Download:
http://prosjektet.net/xbmc/plugins/nrkplugin2_xbmc.7z

This version is not testet properly since I only have a old laptop with a bad 3d card, running on windows atm. I'm far from happy with it, but I guess it should work better than earlier version.

spiff
2009-07-13, 18:33
hey,

i got pissed at libmms this weekend as it worked on one puter of mine, not another one for no apparent (this being the key word i suspect) reason. your changed plugin should make it a bit easier to be me though so soon.

The-Boxhead
2009-07-13, 21:57
Okay have tested it. Seems like it throws me errors when i try to enter
any categories. The only category that i could enter was : HTML-katalog
but unable to actually play any content under there.


I bellive the following snippet shows atleast some warning:
20:39:33 T:2546228112 M:1676472320 NOTICE: File "/home/xbmc/.xbmc/plugins/video/nrk media browser/default.py", line 42, in ?
20:39:33 T:2546228112 M:1676472320 NOTICE: from NRK_API import xbmcplugin_program as plugin
20:39:33 T:2546228112 M:1676472320 NOTICE: File "/home/xbmc/.xbmc/plugins/video/nrk media browser/NRK_API/xbmcplugin_program.py", line 29, in ?
20:39:33 T:2546228112 M:1676472320 NOTICE: from webtv import WebTV
20:39:33 T:2546228112 M:1676472320 NOTICE: File "/home/xbmc/.xbmc/plugins/video/nrk media browser/NRK_API/webtv.py", line 44, in ?
20:39:33 T:2546228112 M:1676472320 NOTICE: class WebTV:
20:39:33 T:2546228112 M:1676472320 NOTICE: File "/home/xbmc/.xbmc/plugins/video/nrk media browser/NRK_API/webtv.py", line 60, in WebTV
20:39:33 T:2546228112 M:1676472320 NOTICE: settings = {
20:39:33 T:2546228112 M:1676472320 NOTICE: IndexError
20:39:33 T:2546228112 M:1676472320 NOTICE: :
20:39:33 T:2546228112 M:1676472320 NOTICE: tuple index out of range
20:39:33 T:2546228112 M:1676472320 ERROR: Scriptresult: Error

More complete log:
http://pastebin.com/m5b326743

gonna try latest xbmc build and see if anything changes...

VictorV
2009-07-14, 01:46
That's odd. It's seems like a typo in settings file. It might be stupid mistake that's been corrected in http://prosjektet.net/xbmc/plugins/nrkplugin2_00002.7z who works for me. It also contains some test with feedparser from nrk beta.
Otherwise I'll take a look at it as soon as I can

You can't play the videos at 'icanal' folder in the html directory either?
I can't get it to play the videos hostet at pd.nrk, but icanals videos works great. I'm not sure how their system are set up, but it seems like icanal are used as some sort of bandwith balancing as the playlist videos "randomly" are redirected there and then works.

The-Boxhead
2009-07-14, 11:23
Gonna try the new link when i get home from work.
And i didnt try the ones from icanal but gonna try that also.

I realy hope that we can get a stable working nrk plugin since
that was something i used alot back in the days when EnderW had his
old nrk script :)

The-Boxhead
2009-07-15, 20:27
Same thing happens... no catagorys is possible to enter.

The NRK Beta streams however i can enter and also stream content :)

So it's almost there ! :)

debuglog snippet:
http://pastebin.com/m255c311b

spiff
2009-07-17, 03:22
i have delivered on my promise in r21735. only linux for now, but i'm sure the other platforms will follow soonish

The-Boxhead
2009-07-17, 13:35
Spiff would this say that the script now works if i upgrade to r21735 ?

Thank you so much for doing that job - !

spiff
2009-07-17, 14:13
i didn't try the actual plugin (was too tired), but the hand-extracted url (as i gave instructions and victor said he had followed) definitely played

berland
2009-07-19, 14:14
Newest 7z-file has a bug either in webtv.py or in settings.xml. ViktorV would know where to fix it. My current workaround is below, but that only gets you through to browsing shows. Currently I don't get the shows to play, I just end with an empty directory.

Boxhead: From your log, it seems that you ran into this one.

diff --git a/NRK_API/webtv.py b/NRK_API/webtv.py
index ad01b0a..c06272f 100644
--- a/NRK_API/webtv.py
+++ b/NRK_API/webtv.py
@@ -77,11 +77,11 @@ class WebTV:
nrk.CONNECTION_SPEED_LOW,
nrk.CONNECTION_SPEED_MEDIUM,
nrk.CONNECTION_SPEED_HIGH,
- )[int(xbmcplugin.getSetting("connection_speed"))],
+ )[2],

'cache_time': (
ConnectionManager.cache_never_expire, 1, 2, 12, 24,
- )[int(xbmcplugin.getSetting("cache_time"))]
+ )[1]
}

print int(xbmcplugin.getSetting("connection_speed"))

berland
2009-07-19, 16:15
Extra note: Delete the *.pyo files from the 7z-archive, I think I also got into problems with these (they had some paths in them stemming from ViktorV's machine). They will be recompiled upon running the plugin.

The-Boxhead
2009-07-19, 20:21
Berlend i removed all the *.pyo files i could find but still the same for me

Fresh debug log:
http://pastebin.com/m261789f3

slankbakfra
2009-07-19, 23:47
Hello,

I got some of the shows working by editing xbmcplugin_program.py


--- C:\Users\frode\Documents\xbmc\plugins\nrk media browser\NRK_API\xbmcplugin_program.py ma jul 13 15:38:28 2009
+++ C:\Users\frode\Documents\xbmc\plugins\nrk media browser\NRK_API\xbmcplugin_program_frodes.py sø jul 19 22:20:03 2009
@@ -432,7 +432,7 @@


def _handle_show_clip_index(self, parent):
- self.item = MediaObj(key=parent)
+ self.item = nrk.MediaObj(key=parent)
return WebTV.PLAYABLE
# - EOM -

@@ -702,8 +702,16 @@
thumbnailImage=item.thumbnail,
path = item.url
)
+ li.setProperty('IsPlayable', item.is_playable())
+ ok = True
+ mediawindow = xwin.MediaWindow(int(sys.argv[1]))
+ item.listitem = li
+ ok = mediawindow.add(item)
+ mediawindow.end(ok)
+ #li.setInfo( type="Video", infoLabels={ "Title": item.title})
#xbmc.Player().play(item.url, li)
- xbmcplugin.setResolvedUrl(int(sys.argv[1]), ok, li)
+ #xbmcplugin.setResolvedUrl(int(sys.argv[1]), ok, li)
+
return

VictorV
2009-07-20, 05:19
Hello!

I'm not quite sure what the problem was. It seems to work properly after removing some entries in settings.xml.

http://prosjektet.net/xbmc/plugins/nrk_plugin_20072009.7z

I've tested this on my xbox and my windows build. xbox works properly where it should, windows really doesn't play anything, but plugin seems to work.
Just ignore the podcast section of the plugin. May be disabled in settings (I forgot)

It's still wip, but I have startet to implement some errorhandling that should create a better experience and a more stable plugin. It also remains some work against the xbmc api. Infolabels, sortmethods, context menus ++

VictorV
2009-07-20, 13:51
If womeone wants and have the time, the rest of the radio channels could be added to the webradio.xml file in the resources subdirectory of the plugin. It's just to look at the entries allready there and just use a simple string for identification.

http://www.nrk.no/informasjon/hjelp/oversikt_over_nrk_no/lyd/

I've made icons for all of them. Found in resources/images directory
I'l also try to make a better solution for selecting format and bitrate some time in near future

spiff
2009-07-20, 20:48
wiso was so kind as to add it to win32 as well - so now it should work there.

The-Boxhead
2009-07-20, 23:41
im having the same issues as reported b4, not able to enter any of the categories :(

berland
2009-07-20, 23:58
im having the same issues as reported b4, not able to enter any of the categories :(
I got this one with the latest zip-file from ViktorV as well, my previous patch will solve that (you get 'tuple index out of range' error in the log).

This is due to settings.xml giving the value of something like 30211 which is too large an index for a tuple of 3 or 4 elements. I don't get why the values are like that in settings.xml, but I guess there is some meaning to it.

Anyway, thanks to everyone for the great job, I am sure we will have this plugin settled in short time. Your efforts did at least spark an xbmc-donation from my behalf.

berland
2009-07-21, 00:39
I got this one with the latest zip-file from ViktorV as well, my previous patch will solve that (you get 'tuple index out of range' error in the log).

Code has changed, so my workaround for 'tuple index out of range' now reads:

diff --git a/NRK_API/xbmcplugin_program.py b/NRK_API/xbmcplugin_program.py
index 41bb18f..b38d744 100644
--- a/NRK_API/xbmcplugin_program.py
+++ b/NRK_API/xbmcplugin_program.py
@@ -266,9 +266,9 @@ class Main(WebTV):
self.settings['cache_files'] = xsetting('cache_files') == 'true'
self.settings['fetch_path'] = xsetting('fetch_path') == 'true'
self.settings['connection_speed'] = ( 600, 1000, 1800,
- )[int(xsetting("connection_speed"))]
+ )[2]
self.settings['cache_time'] = ( 999, 1, 2, 12, 24,
- )[int(xsetting("cache_time"))]
+ )[2]
# - EOM -

spiff
2009-07-21, 00:57
works perfectly - on linux :)

cheers

The-Boxhead
2009-07-21, 02:03
Could someone please tell me how to apply that fix. im not
a skilled programmer ;) i've been lookin trough the
plugin files but couldent find any section looking like the
one berland posted as a fix. In what file should i put this fix ?

spiff
2009-07-21, 02:09
this is what i did;
1) saved the given diff as a patch file
2) cd'd to the plugin directory
3) did patch -p1 < patch file
it complained so i had to do
dos2unix NRK_API/xbmcplugin_program.py
then redid 3)

The-Boxhead
2009-07-21, 02:46
Okay - never done a patch work like this in linux b4 ;)
But i got to this error:
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 266.

I also tried the dos2unix command (had to google that one and download tofrodos utils.

but same error - prolly just me messing stuff up ....

this is my rejection file created by the patch command:
*************** class Main(WebTV):
*** 266,274 ****
self.settings['cache_files'] = xsetting('cache_files') == 'true'
self.settings['fetch_path'] = xsetting('fetch_path') == 'true'
self.settings['connection_speed'] = ( 600, 1000, 1800,
- )[int(xsetting("connection_speed"))]
self.settings['cache_time'] = ( 999, 1, 2, 12, 24,
- )[int(xsetting("cache_time"))]



--- 266,274 ----
self.settings['cache_files'] = xsetting('cache_files') == 'true'
self.settings['fetch_path'] = xsetting('fetch_path') == 'true'
self.settings['connection_speed'] = ( 600, 1000, 1800,
+ )[2]
self.settings['cache_time'] = ( 999, 1, 2, 12, 24,
+ )[2]

VictorV
2009-07-21, 05:12
Damn this! I can't see what does it.

I've made a quickfix that should let you set the settings from settings window.

http://prosjektet.net/xbmc/plugins/nrk_plugin_21072009.7z

The-Boxhead
2009-07-22, 00:12
YES !!!! it works perfect so far, playing high quality NRK streams :)

Thank you so much VictorV, Spiff, berland and everyone making this
plugin work !!

VictorV
2009-07-25, 03:41
Good to hear boxhead :)

I've spent a shitload of time creating something completly useless now :p
I came across the teletext service at nrk's webpages, and thought it couldn't be that hard or time demanding to implement a parser for that in this plugin. I guess I was wrong..
I've ended up with a python script that parses the teletext table from the html markup, translates it into fonts represented by binary strings, generates an array and writes out a png image. Since it's pure python solution it's not superfast, but after some improvements, it's absolute usable.

http://0o2471.net//11179.jpg (http://0o2471.net/11179)

There's also some small changes in code in other section, but pretty much just some clean up of code.
I'll have to try working out some bugs next time I spend some time with the plugin. Fix the search. Clean up playlist section, as worked great before I messed up the code :) Fix support for video and radio podcast, and improve the webradio section
Shouldn't be to much work, but things really need to be polished a bit


Download:
http://prosjektet.net/xbmc/plugins/nrk_plugin_24072009.7z

VictorV
2009-07-25, 04:44
I almost forgot..

Here the complete xml file with radio streams from nrk:
http://prosjektet.net/xbmc/plugins/webradio.xml

Just download, and add to resources directory within the plugins home directory. The icons should already be there

What do you think about the podcast.. Should they be scraped from the page or set static in a xml file, as the radio streams? I don't think they extending/updating the list very often and there's alot of outdated/empty entries.

VictorV
2009-07-26, 02:20
There was some question about the podcasts, so I throwed together a quick solution there.

http://prosjektet.net/xbmc/plugins/nrk_plugin_26072009.7z
Should have a working podcast section :)

The-Boxhead
2009-07-26, 22:11
Excellent Victor ! your work is greatly appreciated !

Everything works very well !!

berland
2009-07-30, 11:30
Excellent work, yes. Now I find myself watching instead of looking at the code..

I find very few bugs, though I have not tested how to change settings (I have fixed connection speed to max in the source), I think this plugin is more than ready to be published at

http://code.google.com/p/xbmc-addons/

As for feature ideas, this springs to my mind:


Some notion of which shows/episode have been watched (like in xbmc library mode)
Possibility to read the descriptions attached to each show/episode

VictorV
2009-07-30, 16:07
Some notion of which shows/episode have been watched (like in xbmc library mode)


Should be easy to implement in a flat file system. I have thought of it, but wasn't sure how atractive it was



Possibility to read the descriptions attached to each show/episode

Yeah, this would be just to add the plot to the listitem since it's allready in structure, so this I could do next time I take a look at the code. The only issue was how to set things up. I'm not quite into how tv shows/episodes are setup or if I should just set all clips as induvidual movies.


It also seems like there is a problem playing clips with norwegian characters in url. I spent some time making it work early in development, but it seems to have be screwed up.

I guess I'll use some time clean things up sometime soon when I got the time, and I read up on svn access.

berland
2009-07-30, 23:38
Another thing to keep in mind is making a video demonstration of the plugin, this is close to being a killer app for xbmc for norwegian users.

A link to the video could be injected at various websites, among them nrkbeta.no

Halvliter
2009-08-01, 13:50
This isn't working for me. I wasn't sure which version to download so I chose nrk_plugin_26072009 and unpacked it into the videoplugins-folder.

For example; I choose the category "Natur" and then "Aktuelt", and all I see is list with icons with the name "stream.ashx" on all of them. When I click to play it, nothing happens.

In "Program", "Vis alle", "Autofil", "2008" there is 10 icons that has a white paper, and all has the name "nrk media browser". Same in the folder "Ekstramateriale".

What have I done wrong?

XBMC 9.04.1 r20654 (Compiled May 25 2009) running on Ubuntu 8.04.

(Linux noob in learning)

spiff
2009-08-01, 14:04
read the thread. then blush.

Halvliter
2009-08-01, 14:45
Bleh, installing plugins before they are working and the wondering what is wrong is typically me...

spiff
2009-08-01, 16:08
and if you didn't catch it; you need a newer xbmc as i added mms support a couple of weeks ago and that is needed for this plugin to work.

HTHS
2009-08-03, 22:40
and if you didn't catch it; you need a newer xbmc as i added mms support a couple of weeks ago and that is needed for this plugin to work.

I´m having trouble getting it to work with the latest Windows build (r21940). Do you know if mms-support is available in this build? I can´t find the information anyware...

EDIT:
Here´s what my log says:

http://www1.nrk.no/nett-tv/silverlight/getmediaxml.ashx?id=335020&hastighet=600&vissuper=True
10:54:44 T:4060 M:1407889408 NOTICE: no data found in session jar
10:54:44 T:4060 M:1407889408 NOTICE: Connection to www1.nrk.no requested...
10:54:44 T:5324 M:1407881216 NOTICE: GET www1.nrk.no/nett-tv/silverlight/getmediaxml.ashx?id=335020&hastighet=600&vissuper=True
10:54:45 T:5324 M:1407508480 NOTICE: status code: 200
10:54:45 T:4060 M:1407537152 NOTICE: put data with key: http://www1.nrk.no/nett-tv/silverlight/getmediaxml.ashx?id=335020&hastighet=600&vissuper=True in session jar
10:54:45 T:4060 M:1407537152 NOTICE: session jars "put-request" are persistent
10:54:45 T:4060 M:1407528960 NOTICE: checkout session jar with key: http://straumod.nrk.no/disk07/uti_var_hage/2008-02-06/ep5_200.wmv
10:54:45 T:4060 M:1407528960 NOTICE: no data found in session jar
10:54:45 T:4060 M:1407528960 NOTICE: Connection to straumod.nrk.no requested...
10:54:45 T:4692 M:1407520768 NOTICE: GET straumod.nrk.no/disk07/uti_var_hage/2008-02-06/ep5_200.wmv?
10:54:45 T:4692 M:1407512576 NOTICE: status code: 200
10:54:45 T:4060 M:1407528960 NOTICE: put data with key: http://straumod.nrk.no/disk07/uti_var_hage/2008-02-06/ep5_200.wmv in session jar
10:54:45 T:5272 M:1407528960 NOTICE: DVDPlayer: Opening: mms://straumod.nrk.no/disk07/uti_var_hage/2008-02-06/ep5_200.wmv?&MSWMExt=.asf
10:54:45 T:5272 M:1407524864 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
10:54:45 T:5732 M:1407496192 NOTICE: Creating InputStream
10:54:45 T:5732 M:1391693824 ERROR: XFILE::CFileCache::Open - failed to open source <mms://straumod.nrk.no/disk07/uti_var_hage/2008-02-06/ep5_200.wmv?&MSWMExt=.asf>
10:54:45 T:5732 M:1407467520 ERROR: CDVDPlayer::OpenInputStream - error opening [mms://straumod.nrk.no/disk07/uti_var_hage/2008-02-06/ep5_200.wmv?&MSWMExt=.asf]
10:54:45 T:5732 M:1407467520 NOTICE: CDVDPlayer::OnExit()
10:54:45 T:5732 M:1407467520 NOTICE: CDVDPlayer::OnExit() deleting input stream
10:54:45 T:5272 M:1407479808 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://video/nrk media browser/?program&&type=%27klipp%27&id=335020&]
10:54:45 T:5272 M:1407295488 NOTICE: CDVDPlayer::CloseFile()
10:54:45 T:5272 M:1407295488 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
10:54:45 T:5272 M:1407295488 NOTICE: DVDPlayer: waiting for threads to exit
10:54:45 T:5272 M:1407283200 NOTICE: DVDPlayer: finished waiting

VictorV
2009-08-04, 21:46
Are you experience this with all streams? I'll guess this one has norwegian unicode characters in url, and as mentioned this got screwed up somewhere in a re-structure. I'll take a look at it tonight or tommorow.

Edit: On a second look. You are using the playlist, and there seems to be some screw up there also. Try program menu entry, to access the videos.

I had about everything working before I figured out it was smart to make some major changes in coding structure, and now it seems like I has to do some work fixing a bunch of error in playlist section.

spiff
2009-08-05, 15:32
plus that's not a debug log and NEVER post logs inline in the forums.

HTHS
2009-08-05, 18:33
plus that's not a debug log and NEVER post logs inline in the forums.

Sorry... I wasn´t aware of that. :blush:

VictorV: I´ll try the program menu entry when I get to my media center...

HTHS
2009-08-07, 19:58
Are you experience this with all streams? I'll guess this one has norwegian unicode characters in url, and as mentioned this got screwed up somewhere in a re-structure. I'll take a look at it tonight or tommorow.

Edit: On a second look. You are using the playlist, and there seems to be some screw up there also. Try program menu entry, to access the videos.

I had about everything working before I figured out it was smart to make some major changes in coding structure, and now it seems like I has to do some work fixing a bunch of error in playlist section.

I`ve now tried watching video through the program menu entry, but I still can`t get it to work. The podcast section works, though. Here`s my log where it successfully streams "Schrödingers katt" (Podcast), but fails to load "Bak_Roscky_300_508229_20090712_195900.wmv" and "NRK2_200907222309_PRTY-110087-09_170_300.wmv" (From the program menu entry).

Log: http://pastebin.com/me23bb1e

VictorV
2009-08-09, 00:46
I find this a bit strange. I see it's trying to use a alternative host for the movies. I'm haven't written the best error logging and I can't duplicate your problem, so I'm not sure what's going wrong there, but is this permanent and with all programs?

I done some small work here and there now, and this will be the last release I'll post here and get this over in the repository. If someone wants to help out with this plugin help is appreciated as my hollidays are over and I don't have that much time spending on this.
In this release:
* Spent to much time on creating alpha transparency supported by xbmc in the teletext
* Fixed some bugs in the teletext "remote"
* Fixed search in program section
* Fixed some broken parts in playlist section. Now playback of _all_ videos works in my xbox build. I have no clue what needs to be done to making it work on all platforms, but there little I can do I think
* Fixed some bugs in radio streams

Download:
http://prosjektet.net/xbmc/plugins/nrk_plugin_08082009.7z

VictorV
2009-08-09, 00:48
Another thing to keep in mind is making a video demonstration of the plugin, this is close to being a killer app for xbmc for norwegian users.

A link to the video could be injected at various websites, among them nrkbeta.no

Feel free ;)

VictorV
2009-08-11, 02:28
As for feature ideas, this springs to my mind:


Some notion of which shows/episode have been watched (like in xbmc library mode)
Possibility to read the descriptions attached to each show/episode


http://prosjektet.net/xbmc/plugins/nrk_plugin_10082009.7z

This one is has some feature for watched/unwatched episodes. It's not optimal, as it's using the same methods as the caching, so the same video won't be marked as watched in different views.

To see show/episode plot you can use the context menu to view movie information as for now.

I think it's someone who's writting bugs in my code when I'm asleep, so there's also some bugfixes (and probably some new bugs ;))

berland
2009-08-13, 00:01
Great! There is a slight catch though.. :)

Found a (devastating) new bug yes.. XBMC crashes after loading all show-directories. I click e.g. 'Program' -> "Vis tema liste" -> "Underholdning", xbmc retrieves data from nrk webpages for some time, and when it is finished, xbmc crashes (xbmc exits). No error messages in log, only that it has written cache data.

I tried deleting my old cache (written by a previous version of the plugin), but it did not help.

Have not tried: compiling latest xbmc from svn.

VictorV
2009-08-13, 14:37
That isn't a new feature for sure :)
You're running on a linux platform? I've tried it on two windows build on different machines, and two xboxes and it worked as should, but I haven't any possibilities to test on any linux build atm.

The most obviouse I can think of would be the pickle module making some trouble. I have used the cPickle module in that last version. You could test this release, and tell if it's so.

I've also added support for transparent files and folders, to avoid so much navigating
Also added some small cosmetic details
http://prosjektet.net/xbmc/plugins/nrk_plugin_13082009.7z

VictorV
2009-08-14, 14:16
http://prosjektet.net/xbmc/plugins/nrk_plugin_14082009.7z

Added local vignettes to the archive, so you could use your own, or nrks classic vignettes in playlist. It is just to avoid streaming the vignettes over the internet every time, but I found it fun to use some I found on youtube.

The playlists now autoplay videos. some of them are only working on xbox. I not sure what needs to be done, but as a temp solution in the script there could be added a download feature, as the videos seemed to play just nice when played locally. On Windows and Linux(I guess?) builds I added a error.avi that should be played, so the plugin don't crash.

The plugin now also removes empty folders, so sometimes the directory listing willl be different from nrk s website, but it's only empty folders.

bluejudas
2009-08-31, 20:35
http://prosjektet.net/xbmc/plugins/nrk_plugin_14082009.7z
Hi,

Tanx for the good effort :)
... but I have a problems with live(Direkte) streams. I get "No data received" as error message. I have seen this on other streams as well, but not all. I have no problems directly from nrk.no on my computer.

Edit:
I have tested it both with xbox and the windows version of XBMC.

Edit2:
It looks like its problems with icanal streams...

~b

The-Boxhead
2009-09-14, 21:57
This is awesome work. Love how this script is turning out !

However i too have probems with "direkte" streams. Damn and today i was hoping to wath "velg09" but offcourse thats one of the streams not working :(

anyhow i realy appriciate all the hardwork put down !

The-Boxhead
2009-09-15, 22:33
For direct live streaming of NRK1 and 2 i found two mms streams:

NRK1
mms://mms-icanal-live.online.no/nrk_tv_webvid03_h

NRK2
mms://mms-icanal-live.online.no/nrk_tv_webvid02_h

if you dont want high quality just replace the _h with _l to get low bitrate.

If you dont know how to use strm files in xbmc here's a quicky:
paste the nrk1 link above into a blank txt document. Save the file as NRK1.strm
Do the same for NRK2 but name it NRK2.strm

Put both files in a folder named NRK and leave the folder a place where your xbmc can reach it.

From xbmc add source and choose your NRK folder. Then enter the NRK source and select either NRK1.strm or NRK2.strm

VictorV
2009-09-21, 19:26
If you could post some logs, I will take a look at it

VictorV
2009-09-27, 18:41
For direct live streaming of NRK1 and 2 i found two mms streams:

NRK1
mms://mms-icanal-live.online.no/nrk_tv_webvid03_h

NRK2
mms://mms-icanal-live.online.no/nrk_tv_webvid02_h

if you dont want high quality just replace the _h with _l to get low bitrate.

If you dont know how to use strm files in xbmc here's a quicky:
paste the nrk1 link above into a blank txt document. Save the file as NRK1.strm
Do the same for NRK2 but name it NRK2.strm

Put both files in a folder named NRK and leave the folder a place where your xbmc can reach it.

From xbmc add source and choose your NRK folder. Then enter the NRK source and select either NRK1.strm or NRK2.strm

I think you always getthe correct stream if you use:

mms://straumv.nrk.no/nrk_tv_direkte_nrk1_h
mms://straumv.nrk.no/nrk_tv_direkte_nrk2_h
mms://straumv.nrk.no/nrk_tv_direkte_nrk3_h

Novin
2009-09-27, 21:30
Hello

Maybe you could use the XOT-Uzg framework and just add a channel there instead?

eiiriik
2009-10-03, 22:48
i cant even copy the æ-ø-å png files.

I got a appletv, and im using SFTP to transfer.

When trying to load the plugin i get:

Error
Phyton script failed:
special://home/plugins/video/nrk media browser/default.py

The_Dig
2009-10-16, 13:30
Hi,

I have copied the NRK plugin folder to the right folder (plugins/video), but it doesn't show up in XBMC. Is there anything else I have to do to make it show in the media center?

spiff
2009-10-16, 13:38
if it doesn't show you haven't stuck it in the correct directory at all.

depending on your platform that could be e.g.

%APPDATA%/xbmc/plugins/video
~/.xbmc/plugins/video
or
uhrr. somewhere on osx

The_Dig
2009-10-16, 18:18
I'm using Windows 7.

The full path is:

C:/Program Files/XBMC/plugins/video

The "NRK media browser" folder containing the plugin is placed in the above mentioned path.

spiff
2009-10-16, 18:24
which is wrong. as i said %APPDATA% and that works just fine on win7 as well afaik.

The_Dig
2009-10-16, 18:33
Right. Found it. It's working fine now. I was wrong. You were right. I did not know that that folder existed before you pointed it out.

Thanks! :D

VictorV
2009-10-20, 03:16
I added support for the live streaming of nrk, nrk2 and nrk3 and testing out some new error logging and probably some other stuff that I don't remember, as there has been a while since last release

http://prosjektet.net/xbmc/plugins/nrk_plugin_20102009.7z


spiff: I can't get unicode mms-uri (æøå) playing. I get:

[Reference]
Ref1=http://straumod.nrk.no/Disk08/100__rstokt_med_DS__B_r_ysund_/2009-01-07/B%C3%B8r%C3%B8ysund%20NRK1_20081230_1000-200.wmv?&MSWMExt=.asf
Ref2=http://10.103.0.61:80/Disk08/100__rstokt_med_DS__B_r_ysund_/2009-01-07/B%C3%B8r%C3%B8ysund%20NRK1_20081230_1000-200.wmv?&MSWMExt=.asf


ends with:

NOTICE: DVDPlayer: Opening: mms://straumod.nrk.no/Disk08/100__rstokt_med_DS__B_r_ysund_/2009-01-07/B%C3%B8r%C3%B8ysund%20NRK1_20081230_1000-200.wmv?&MSWMExt=.asf
...
ERROR: CDVDPlayer::OpenInputStream - error opening [mms://straumod.nrk.no/Disk08/100__rstokt_med_DS__B_r_ysund_/2009-01-07/B%C3%B8r%C3%B8ysund%20NRK1_20081230_1000-200.wmv?&MSWMExt=.asf]

The error is caused by a 404 i guess

Any ideas?

VictorV
2009-10-20, 18:39
Just some small changes..
Cleaned up the plugin settings, removed the html browser and added a XBMC compability check

http://prosjektet.net/xbmc/plugins/nrk_plugin_20102009b.zip
http://prosjektet.net/xbmc/plugins/nrk_plugin_20102009b.7z

toralux
2009-11-12, 12:20
Just some small changes..
Cleaned up the plugin settings, removed the html browser and added a XBMC compability check

http://prosjektet.net/xbmc/plugins/nrk_plugin_20102009b.zip
http://prosjektet.net/xbmc/plugins/nrk_plugin_20102009b.7z

NRK detects illegal client, plugin broken:

Får en videostrøm med feilmelding... Ser ut som NRK har skjønt at man ikke ser på fra en nettleser i PC... Går det ann å komme rundt dette?

vidar
2009-11-15, 12:50
NRK detects illegal client, plugin broken:

Får en videostrøm med feilmelding... Ser ut som NRK har skjønt at man ikke ser på fra en nettleser i PC... Går det ann å komme rundt dette?

Seems to work for me - it's playing friday's "Nytt på Nytt" as we speak. Good work! :)

VictorV
2009-11-17, 15:29
NRK detects illegal client, plugin broken:

Får en videostrøm med feilmelding... Ser ut som NRK har skjønt at man ikke ser på fra en nettleser i PC... Går det ann å komme rundt dette?

More information please. I can't reproduce it, and everything seems to work here.

The-Boxhead
2009-11-17, 21:33
Your latest version works great VictorV. Again thanks for all your work !

perper
2009-11-18, 00:44
Your latest version works great VictorV. Again thanks for all your work !


Tried the latest version both on xbox (latest tc3h) and kubuntu (from standard 9.10 repository), but the plugin did not work. It errored out when trying to play a clip.

"Connection to host http-icanal-od.online.no raised exception. No data received. Aborting..."

Which isn't to strange as the correct url starts with mms...

The error seems to be in line 436 of nrk_api.py and was corrected by reversing the arguments:

Original, non working:
return url.replace('mms', 'http')

Modified, working:
return url.replace('http','mms')

bluejudas
2009-11-18, 12:03
Both True Blood and Generation Kill do not work for me (Program->Drama).

~b

VictorV
2009-11-19, 02:41
Both True Blood and Generation Kill do not work for me (Program->Drama).

~b

Yeah, they're not served by NRK and uses a sligthly different system. There could probably be made some general handler for the xml used by those silverlight players, but it's not a priority for me now, as I'm looking at some other xbmc project.

ErlendSB
2009-11-21, 13:27
Nyheter - Aktuelt
gives me this message:
"This video is currently not supported by your platform."

Anyone else experiencing this?

Species8472
2009-11-21, 22:34
Nyheter - Aktuelt
gives me this message:
"This video is currently not supported by your platform."

Anyone else experiencing this?

Yeah, get that too...