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
#41
2006-11-27, 11:03 AM
stefan Wrote:New zip attached.
Looking good! I got it to work with UbuStream (with a bit of persuasion Smile ) and even to play some of the stations.. The files it's writing are still called SRSections.plx and SRPlaylist.plx and, since the app is now called SverigesRadioDynSource.exe, UbuStream is expecting SverigesRadioSections.plx and SverigesRadioPlaylist.plx. (I just renamed them by hand to get them to load).

Also, since all the stations are for radio, you should include the line Type1=Audio for each station in the playlist. Right now they're defaulting to Video in UbuStream.

Other than that it's working well.

Comments:
1) You're using the station page for the website field (eg. Website1=http://www.sr.se/p1). It might be more useful to put the schedule page there (eg. http://www.sr.se/p1/tabla).
2) I notice all the stations are in one section right now. Maybe breaking the stations down into a few sections would be nice. I couldn't figure out from the site (it's all in Swedish Big Grin ) if they have any kind of grouping of the stations that you could use to create sections from.

Anyway, it's already another useful DynSource app. Cool
[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
#42
2006-11-27, 02:25 PM (This post was last modified: 2008-01-11, 12:01 PM by stefan.)
New zip attached. Sections are hard to do, since they don't have any "real" sections. They have divided the stations into four tabs, but no apparent categories are used... I'll have to think about that.

Source code is in the zip, too. It is my first c# "project", so please be gentle. But I'd welcome critique, since I'd like to learn from my mistakes 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
#43
2006-11-28, 12:48 AM
stefan Wrote:New zip attached. Sections are hard to do, since they don't have any "real" sections. They have divided the stations into four tabs, but no apparent categories are used... I'll have to think about that.
Now it works perfectly. It's all good!

Yes, it seemed to me that sr.se didn't have any "natural" sections (not just that I can't read Swedish Smile ).

Quote:Source code is in the zip, too. It is my first c# "project", so please be gentle. But I'd welcome critique, since I'd like to learn from my mistakes Smile
It may be your first c# project, but it looks like you're used to coding in some similar language? The cookie handling code is interesting. Maybe we should put your code on the wiki in case other people need to solve the same problem. Or maybe make it generic enough to add it into the class library as an additional optional "service".
[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
#44
2006-11-28, 07:26 AM
ubu Wrote:It may be your first c# project, but it looks like you're used to coding in some similar language?
Yes, I fiddle a bit with java Wink What I have no clue about is coding/naming conventions/standards or "best practices" in c#. I have quite a bit to learn there

ubu Wrote:The cookie handling code is interesting. Maybe we should put your code on the wiki in case other people need to solve the same problem. Or maybe make it generic enough to add it into the class library as an additional optional "service".
That's a good idea. That part of the code is stolen from a tutorial online, and I have only made small changes to it. So I don't claim any right to it, nor do I care if anyone changes it and uses it for there own. That goes for the rest of "my" (thank's for the example code, ubu Wink ) code, too, by the way. Anyone can feel free to use it as they wish.
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)
stefan
Offline

Posting Freak

Posts: 3,116
Threads: 81
Joined: Oct 2004
#45
2006-11-28, 12:05 PM
Now, if I could figure out http://www.svt.se 's handling of things, that would be great:
http://svt.se/svt/road/Classic/shared/me...p?&d=37591
but it looks as if I'm into over my head on that one...
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
#46
2006-11-29, 07:20 AM
stefan Wrote:Now, if I could figure out www.svt.se 's handling of things, that would be great:
http://svt.se/svt/road/Classic/shared/me...p?&d=37591
but it looks as if I'm into over my head on that one...
That looks like a great site. Wish it was in English (or had English subtitles on the video Smile ).

It doesn't look too bad from a URL scraping point of view. It's just that a) the menus are nested quite deep so you have to keep reading pages until you get to the final "player" page with the url you want and b) it uses frames, so you have to read the "menu" frame html instead of the main page in each case.

For instance: If you replace index.jsp with navigation.jsp in the URL you posted, you get the frame html for the first menu. Each of the "folders" on that menu has an entry with something like:
Code:
<a href="[B]navigation.jsp[/B]?d=37591&amp;group=26697"
So you add http://svt.se/svt/road/Classic/shared/mediacenter/ to the beginning of that href string and that will take you to the next menu down where you read all the href= folder entries again and go to their menu pages in turn. And so on. Eventually, you'll find a menu page that has links to the player pages:
Code:
href="[B]player.jsp[/B]?d=5117&amp;a=185094"
On each player (leaf) page you'll find:
Code:
<div id="overEmbed"><a href="/content/1/c6/18/50/73/billack.ram">Extern spelare</a>
which is the part of the URL you want for the external player stream name. Now just add the http://svt.se prefix and you get:

http://svt.se/content/1/c6/18/50/73/billack.ram

Which is the URL you need. On the way down the menu tree you'll see the text part of each menu href (eg. >Fakta & Fritid</a>) and the text after each title= which should give you plenty of material for sections, descriptions, etc. in the PLX file.

Looks like it probably uses cookies again for the player options (but you already have that covered Wink ). Looks like a lot of the streams require RealPlayer but that seems pretty common on a lot of sites, especially ones that started doing streaming broadcasts in the early days (BBC, UN, Daytona Beach, etc).
[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
#47
2006-11-29, 07:57 AM
That's my initial thought, too, but nope... if you actually do a read of those frames (and not in a browser, that is) you get something like below: (that goes both for the navigation frame and the player frame)

I was thinking you could start an IE OLE object and download the pages (which then hopefully would parse and execute the js, and then I could read the source code from the IE object. But I'm not sure this is
a) doable
b) acceptable at all Big Grin
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
<title>svt.se - spelarfönster</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-language" content="sv" />
<meta name="Author" content="Sveriges Television AB, Stockholm, Sweden" />
<meta name="Copyright" content="Sveriges Television AB, Stockholm, Sweden" />
<meta name="description" content="TV när du vill! SVT Webb-TV." />
<meta name="keywords" content="Webb-TV, webbtv, video, streaming, ondemand, film, rörliga bilder,Mediespelare,Mediecenter,Mediaspelare,Mediacenter" />
<meta name="robots" content="index, follow, noarchive" />
<link href="/svt_se/css/global/media.css" rel="stylesheet" type="text/css" />
<link href="/svt_se/css/global/mediaPlayerWindow.css" rel="stylesheet" type="text/css" />

<script language="JavaScript" type="text/javascript" src="/svt_se/js/media.js"></script>
<script language="JavaScript" type="text/javascript">
function launchFullScreen(theFormat){
var theMediaPlayer = eval(document).PlayerObjectEmbed;
    if(theMediaPlayer != null){
        if(theFormat == "wm"){
            if (theMediaPlayer.playState == 3){
                theMediaPlayer.fullScreen = 'true';
            } else {
                alert("Filmen mÃ¥ste starta innan den kan visas i fullskärm!");
            }
        } else if(theFormat == "rm") {
            theMediaPlayer.SetFullScreen();
        }
    } else {
        alert("Kunde inte visa fullsk&auml;rm!");
    }
}
</script>
</head>
<body onload="self.focus();initMedia(false);" class="player">
<div id="playerWrapper">
    <div id="introContent">
        <div id="overEmbed"><a href="player.jsp?a=-1&amp;showhelp=true&amp;hastested=true" onClick="shL();">Hj&auml;lp</a></div>
        <img src="/content/2/c6/03/75/91/laptop3.jpg" width="384" height="288" alt="" />
        </div>
</div>
<div id="loading">Laddar...</div>
<!--WEBSIDESTORY CODE HBX2.0 (Universal)-->
<!--COPYRIGHT 1997-2005 WEBSIDESTORY,INC. ALL RIGHTS RESERVED. U.S.PATENT No. 6,393,479B1. MORE INFO:http://websidestory.com/privacy-->
<script language="JavaScript" type="text/javascript">
var _hbEC=0,_hbE=new Array;function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}
var hbx=_hbEvent("pv");hbx.vpc="HBX0200u";hbx.gn="alpha.svt.se";

hbx.acct="DM5504013GSC19SW3";
hbx.pn="Forstasida";
hbx.mlc="/Forstasida/Media_Player";
hbx.pndef="title";
hbx.ctdef="full";

hbx.fv="";
hbx.lt="auto";
hbx.dlf="n";
hbx.dft="n";
hbx.elf="n";

hbx.seg="";
hbx.fnl="";

hbx.cmp="";
hbx.cmpn="";
hbx.dcmp="";
hbx.dcmpn="";
hbx.dcmpe="";
hbx.dcmpre="";
hbx.hra="";
hbx.hqsr="";
hbx.hqsp="";
hbx.hlt="";
hbx.hla="";
hbx.gp="";
hbx.gpn="";
hbx.hcn="";
hbx.hcv="";
hbx.cp="null";
hbx.cpd="";

hbx.ci="";
hbx.hc1="";
hbx.hc2="";
hbx.hc3="";
hbx.hc4="";
hbx.hrf="";
hbx.pec="";
</script><script language="javascript1.1" type="text/javascript" src="/svt_se/js/hbx.js"></script>

<!--END WEBSIDESTORY CODE-->

<script language="JavaScript" type="text/javascript">
// <![CDATA[
<!--
var _rsCI="svt-se";
var _rsCG="forstasida";
var _rsDT=0;
var _rsDU=0;
var _rsDO=0;
var _rsX6=0;
var _rsSI=escape(window.location);
var _rsLP='http:';
var _rsRP=escape(document.referrer);
var _rsND=_rsLP+'//secure-dk.imrworldwide.com/';
var _rslocal=_rsLP+'//svt.se/svt_se/js/';

if (parseInt(navigator.appVersion)>=4)
{
     var _rsRD=(new Date()).getTime();
     var _rsSE=1;
     var _rsSV="";
     var _rsSM=1.0;
     _rsCL='<scr'+'ipt language="JavaScript" type="text/javascript" src="'+_rslocal+'v51.js"><\/scr'+'ipt>';
}
else
{
     _rsCL='<img src="'+_rslocal+'cgi-bin/m?ci='+_rsCI+'&amp;cg='+_rsCG+'&amp;si='+_rsSI+'&amp;rp='+_rsRP+'" alt="" />';
}

document.write(_rsCL);
//-->
// ]]>
</script>
<noscript>
<img src="//secure-dk.imrworldwide.com/cgi-bin/m?ci=svt-se&amp;cg=forstasida" alt="" />
</noscript>

</body>
</html>
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
#48
2006-11-29, 09:41 AM
When I read the pages from C# (using a webbrowser control on a form and writing the html to a file each time the browser reads a page) I get the navigation and player pages OK. The webrowser gets the frame page (navigation or player) but then loads the parent page (index). So I get two files every time. The first one contains the good stuff.

On the player page, where you are getting:

Code:
<div id="playerWrapper">
    <div id="introContent">
         <div id="overEmbed"><a href="player.jsp?a=-1&amp;showhelp=true&amp;hastested=true" onClick="shL();">Hj&auml;lp</a></div>
I'm getting:
Code:
<div id="playerWrapper">
            <div id="overEmbed"><a href="/content/1/c6/18/50/94/stenskott.ram">Extern spelare</a> | <a href="player.jsp?a=185094&amp;showhelp=true&amp;hastested=true" onClick="shL();">Hj&auml;lp</a> | <a href="player.jsp?a=185094&amp;changesettings=true&amp;hastested=true" onMouseDown="shL();">&Auml;ndra inst&auml;llningar</a></div>
So it looks like you are pointing at a null (a=-1) page somehow. Did you set the preference panel to RealPlayer (as I did). Maybe that's getting in the way.

I'm using the WebBrowser object to read the pages but I imagine I'd see the same with regular WebRequest and Web Response objects.

As to using an IE OLE object, I have no idea. I was always taught that OLE automation was part of the M$ plot to conquer the world Wink .
[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
#49
2006-11-29, 10:08 AM
ubu Wrote:I'm using the WebBrowser object

Cool ...That's what I was getting at when I wrote IE OLE Smile Obviously I have no idea what I'm talking about, so... it looks like it's solvable, then Smile

I was using HttpWebRequest, and then I got the code I attached above. The -1 part was, granted, from one of my tries when I omitted the player "a" attribute, but having an attribute didn't matter. Got the same type of js-script back. But the webBrowser object will probably solve the problem Smile Thank's for setting me straight Wink
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
#50
2006-11-30, 12:52 AM
stefan Wrote:so... it looks like it's solvable, then Smile
Definitely!

Quote:I was using HttpWebRequest, and then I got the code I attached above. The -1 part was, granted, from one of my tries when I omitted the player "a" attribute, but having an attribute didn't matter. Got the same type of js-script back. But the webBrowser object will probably solve the problem Smile Thank's for setting me straight Wink
I just used the webbrowser object because I happened to be working on some code that was using one at the time. Haven't had time to try it, but I'd imagine regular WebRequest and Web Response objects would produce the same results (maybe not?). I'm wondering if the HttpWebRequest object is doing something different (interpreting/resolving the html rather than just letting you see the raw html stream). Just guessing. Like I say, too busy to try it myself.
[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.
« 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 10,958 2016-03-13, 02:20 AM
Last Post: greg in kansas
  Universe plugin update mvallevand 0 4,798 2015-10-02, 11:55 PM
Last Post: mvallevand
  universe and live streams from PlayOn johnsonx42 2 6,388 2012-08-11, 03:51 AM
Last Post: johnsonx42
  Universe Plugin Setup mvallevand 4 12,060 2011-01-25, 01:41 AM
Last Post: mvallevand
  Universe Plugin on NMT Azimuth 3 6,160 2011-01-22, 08:40 PM
Last Post: mvallevand
  Some challenges with Universe Plugin cooper43 7 5,516 2010-12-27, 01:50 PM
Last Post: cooper43
  Some challenges with Universe Plugin cooper43 0 2,258 2010-12-26, 06:37 PM
Last Post: cooper43
  Why doesn't this plugin work!?!? haarvik 18 9,647 2009-05-28, 01:14 AM
Last Post: cc1091
  Ubustream not working preview neither timeshitf play Toni 2 3,129 2009-05-27, 07:59 PM
Last Post: Toni
  Imposible to start ubustream Toni 3 3,183 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