NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) UbuStream, Web Radio and Universe v
« Previous 1 … 4 5 6 7 8
UbuStream Dynamic Source "mini-plugin" architecture for on-demand streams

 
  • 0 Vote(s) - 0 Average
UbuStream Dynamic Source "mini-plugin" architecture for on-demand streams
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#21
2006-11-12, 11:09 PM
Remco Wrote:Thanks for the feedback. To be honest, i didn't read your first post, but just took the CNN.pls as an example Smile
New try: [ATTACHMENT NOT FOUND]
Excellent! It now works perfectly with the UbuStream DynSource architecture. (Sadly, I can't watch the streams since they are blocked for US users.) Two minor points:

1) I suggest you add the line Player=Windows Media Player as the second line of the Sections file. This will ensure that the correct media player will be used for playing the streams associated with your DynSource. It'll work OK without it, but the user will then have to remember to manually select the correct player for the Uitzendggemist DynSource in the UbuStream config app before using your app for the first time. (Also, if any of the streams use a different player from the default one, you can always override it by including a Player1= line for that item in the playlist file.)

2) I notice that the Uitzendinggemist.nl group (section) gets populated with a very large number of stations (streams). If there was a way you could break them into several separate sections (perhaps using the "genre" or "net/zender" categories on the web site), the user would be able to filter what was imported into UbuStream by selecting only those sections they wanted (using the config app). Just an idea. Maybe it's fine as it is.
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
HTPCGB
Offline

Member

Posts: 215
Threads: 15
Joined: Jun 2006
#22
2006-11-13, 01:22 AM
To build on what you said in the CNN Videos thread, I think that an architecture for searching google videos (and youtube, yahoo, etc.) would work in the following way.

-user types in a search string in the ubustream interface
-the search string is passed to the mini plugin (probally a .dll)
-the plugin calls up a google video search for that string and parses the resulting webpage for video links
-an array of video links is returned to ubustream

Simple in principle, probably not in practice. To avoid scope creep, I think we should finalize the current architecture and move on from there.

As for supporting the mediaMVP, what is limiting us? Is it a programming challenge or the GBPVR API? Or both?
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#23
2006-11-13, 01:55 AM
HTPCGB Wrote:To build on what you said in the CNN Videos thread, I think that an architecture for searching google videos (and youtube, yahoo, etc.) would work in the following way.

-user types in a search string in the ubustream interface
-the search string is passed to the mini plugin (probally a .dll)
-the plugin calls up a google video search for that string and parses the resulting webpage for video links
-an array of video links is returned to ubustream
Sounds reasonable. Wouldn't be that hard to implement, either. Also, I often find things by just browsing around and finding things I wouldn't have known to search for. A while back, I started a prototype of a browser embedded in a form with the ability to "grab" the url of the link you clicked on, but it I ran out of steam. Still, I think something like that would be nice as an additional way of finding video links.
Quote: Simple in principle, probably not in practice. To avoid scope creep, I think we should finalize the current architecture and move on from there.
Funny, I was just thinking the same thing. Smile
Quote: As for supporting the mediaMVP, what is limiting us? Is it a programming challenge or the GBPVR API? Or both?
Ahhhh, well, since you asked.......

On second thoughts, I think I'll put this in a separate post since I need to gather my thoughts and my mother-in-law is about to arrive to take us out for the wife's birthday dinner. So in the interests of maintaining the general WAF, the wise course will be to do this later. Plus the whole issue of providing MVP support for streaming video probably justifies its own thread..
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#24
2006-11-14, 12:05 PM
I've released the beta of UbuStream v2.0 (see this post) so you guys can now download it and see your mini-plugins in action. I've been playing with them all day. Pity I can't see the Uitzendinggemist streams but the CNN one's are good. Much higher quality than the BBC streams I'm getting from my BBC mini plugin. The BBC site has a lot of streams available but a) they use RealPlayer which IMHO is not the greatest choice of technology and b) they transmit very low definition, low speed video. A pity. The CNN ones all work fine (and look great) with VLC, which is good news for MVP users.
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#25
2006-11-17, 07:32 AM (This post was last modified: 2006-11-17, 08:02 AM by ubu.)
So I'm attaching the source code for the three sample mini-plugin apps so people can see how the Dynamic Source architecture works and what's involved in writing a DynSource app.

I've also included the source for the common class library (DynamicSource.dll) so you can see how all the pieces fit together. (Also the latest version of the binary.) Please don't change the class library source since it's important that it be "common". If you don't want to use the class library, feel free to develop apps any way you like. Just read the specification document so you can be sure your app will work with UbuStream.

The sample apps vary in complexity:
  • MosaicDynSource - very simple app that publishes a single section by hard-coding it. It retrieves a web page and parses the HTML for the name and url of a single item.
  • BBCDynSource - retrieves its sections from a main web page, extracting the section names and urls from the HTML. Then for each section found, it reads the section web page in order to retrieve a list of items, extracting the url of a child page for each one. For each item, it uses the url to access the child page which is then parsed for the actual item data.
  • DemocracyNowDynSource - bit of a hybrid. It publishes a single hard-coded section but, then, it retrieves the item data by reading the section page, extracting most of the item attributes from it but also extracting the url of a child page. For each item, it then reads its associated child page to extract the "actual" url for the item's stream.
You'll notice I rely heavily on regular expressions to do the string parsing. This because I'm comfortable with them, they're extremely efficient and they allow for very compact code (if you can get used to the somewhat cryptic syntax and the fact that they never work right the first time you code them Wink ). There are probably lots of other ways (maybe better) to do the string slicing and extraction work.

The zip file contains the folder DynamicSource which contains the DynamicSource.sln solution. The code is written in C# running with .Net 2.0 and using Visual C# 2005 Express.

Download: [ATTACHMENT NOT FOUND]

Enjoy!
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
stefan
Offline

Posting Freak

Posts: 3,116
Threads: 81
Joined: Oct 2004
#26
2006-11-18, 03:26 PM
Thank's... I think I'm getting the hang of it. I made a very first hello-world type of thing parsing www.sr.se's webbradio application, and got it to find one of the channels. Real cool. Hope to get it to be more dynamic soon enough. So... more time wanted Wink Now, dinner-making is on the schedule Smile
I'm not always right
GB-PVR 1.2.9
Accent HT-400 Case, AMD Athlon 64 3800+ 1024MB, 1TB+300GB+180GB, WinXP Pro-SP2, NVidia 7600GT
Nova-T USB2, PVR-350 recording from Dilog 355 DVB-T box, USB-UIRT (receiving & transmitting)
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#27
2006-11-18, 08:20 PM
stefan Wrote:Thank's... I think I'm getting the hang of it. I made a very first hello-world type of thing parsing www.sr.se's webbradio application, and got it to find one of the channels. Real cool. Hope to get it to be more dynamic soon enough. So... more time wanted Wink Now, dinner-making is on the schedule Smile
That's great! That makes two of us using the new architecture Smile. Seems like a good choice of target site. Looks like you could usefully use the new SiteItem.WebSite property to include the schedule page for each station (eg. http://www.sr.se/p1/tabla/) so it would get written to the PLX file and then you could use the WebSite button in UbuStream to see what's playing.

Cooking dinner is a nice break from writing code, I find. Kinda brings you back to the "real" world.
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
stefan
Offline

Posting Freak

Posts: 3,116
Threads: 81
Joined: Oct 2004
#28
2006-11-20, 08:08 AM
I'm having a bit of a problem here. It seems half of the stations are not available in RealPlayer mode; only in WMP mode. The problem is that the website reads a cookie in order to fiugre out if I want RP or WMP, and it seems that RP is default...

Is it possible to set a cookie to send with the request? (I'm sure it is, I just need to figure out how Smile )
I'm not always right
GB-PVR 1.2.9
Accent HT-400 Case, AMD Athlon 64 3800+ 1024MB, 1TB+300GB+180GB, WinXP Pro-SP2, NVidia 7600GT
Nova-T USB2, PVR-350 recording from Dilog 355 DVB-T box, USB-UIRT (receiving & transmitting)
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#29
2006-11-20, 11:10 AM
stefan Wrote:I'm having a bit of a problem here. It seems half of the stations are not available in RealPlayer mode; only in WMP mode. The problem is that the website reads a cookie in order to fiugre out if I want RP or WMP, and it seems that RP is default...

Is it possible to set a cookie to send with the request? (I'm sure it is, I just need to figure out how Smile )
Yeah, I see the cookie on my machine. The cookie is called SRPlayer and it's inside a file called [email=ubu@webbradio%5B2%5D.txt]ubu@webbradio[2].txt[/email] in the Cookies folder. I see &intPrimaryPlugin=2 and &intSecondaryPlugin=2 in there. I'm guessing those values may be what controls the player type because I went to the site's player page and switched my preference from WMP to RealPlayer (Byt ljudformat, I think. My Swedish is non-existant, I fear Sad ) and, when I looked at the file again, those two values had changed.

.Net has a Cookie class so, if you want to get real fundamental, you could maybe twiddle with the cookie from your C# code. Or, if you know exactly what to change in the cookie, you could read the file, change the values, and write it back again just before you connect to the site.

But the simplest (crudest?) way might be to take a copy of the file while your preference is still RealPlayer, then go to the site's player page and switch your preference to use WMP and take a copy of the cookie file again. Now you have two cookie files, one for WMP and one for RealPlayer. In your program you could then just use System.IO.File.Copy to copy whichever one you wanted into the Cookies directory just before you connect to the site. The pages you parse should then have the correct player embedded in them and you should be looking at the correct URLs.
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
stefan
Offline

Posting Freak

Posts: 3,116
Threads: 81
Joined: Oct 2004
#30
2006-11-20, 11:19 AM
I did some research, and my approach was to override your Read_HTML_Page and create a CookieContainer and attach to the webrequest. Then, before I start parsing stuff, I go to the webpage "Byt ljudformat" with the appropriate parameters for choosing realplayer. But I have no idea if this would work...

When you say "Cookies directory", which directory are you talking about, exactly?
I'm not always right
GB-PVR 1.2.9
Accent HT-400 Case, AMD Athlon 64 3800+ 1024MB, 1TB+300GB+180GB, WinXP Pro-SP2, NVidia 7600GT
Nova-T USB2, PVR-350 recording from Dilog 355 DVB-T box, USB-UIRT (receiving & transmitting)
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): « Previous 1 2 3 4 5 6 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Universe or Network Tuner plugin for PIP greg in kansas 8 11,164 2016-03-13, 02:20 AM
Last Post: greg in kansas
  Universe plugin update mvallevand 0 4,875 2015-10-02, 11:55 PM
Last Post: mvallevand
  universe and live streams from PlayOn johnsonx42 2 6,512 2012-08-11, 03:51 AM
Last Post: johnsonx42
  Universe Plugin Setup mvallevand 4 12,170 2011-01-25, 01:41 AM
Last Post: mvallevand
  Universe Plugin on NMT Azimuth 3 6,265 2011-01-22, 08:40 PM
Last Post: mvallevand
  Some challenges with Universe Plugin cooper43 7 5,691 2010-12-27, 01:50 PM
Last Post: cooper43
  Some challenges with Universe Plugin cooper43 0 2,324 2010-12-26, 06:37 PM
Last Post: cooper43
  Why doesn't this plugin work!?!? haarvik 18 9,964 2009-05-28, 01:14 AM
Last Post: cc1091
  Ubustream not working preview neither timeshitf play Toni 2 3,219 2009-05-27, 07:59 PM
Last Post: Toni
  Imposible to start ubustream Toni 3 3,306 2009-05-27, 12:02 PM
Last Post: Toni

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode