SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 09-22-2009, 02:06 PM
simonen simonen is offline
Sage Aficionado
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 384
http://192.168.1.2:54478 in my case, you can't use 127.0.0.1 or localhost, they seem to block that. IP should be whatever server your playon is installed on.

Last edited by simonen; 09-22-2009 at 02:20 PM.
Reply With Quote
  #22  
Old 09-22-2009, 02:25 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Quote:
Originally Posted by simonen View Post
http://192.168.1.2:54478 in my case, you can't use 127.0.0.1 or localhost, they seem to block that.
Ahh, I see it now. From their forums, sounds like they are trying to block access that. Makes sense, its a security hole and they don't want people downloading the streams, for that matter neither do I.

I imagine pretty soon they'll be doing browser ID checks to try and limit access to that to just the Wii Browser. That's an easy enough work around though as those can be spoofed, but if they feel enough heat they may just shut down the Wii support / web server entirely. The UPnP paths will prolly end up being much safer as

a) They are much harder to access and as such provide reasonable security via difficulty.
b) Its the UPnP standard so they're required for everything else to work.

But essentially we have the same goal: find a way to turn a list of PlayOn videos into a dynamic RSS feed so it can be used in Sage's Online Service menu without any modification to Sage.

Are you running the PHP / VB script via Nielms webserver? Also, are you able to do targeted sorting easily (i.e. just display one show's episodes)?

Last edited by evilpenguin; 09-22-2009 at 02:31 PM.
Reply With Quote
  #23  
Old 09-22-2009, 02:44 PM
simonen simonen is offline
Sage Aficionado
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 384
Basically it just brings the entire queue into one feed so it shows everything together. I have noticed that they are changing up the links to the files quite often, it use to be once per day, but I have had to update the static link references in my test xml file a few times in the last hour or else they stop working. So whatever we do must be fairly live.

In addition, it looks like Sage is also caching the feed, so if the links change you have to restart the UI or restart the extender.

I am using xampplite apache/php package. But I am not using the VBscript at the moment, that was a different option. I can send you that stuff if you want. Maybe you can take it to the next level since it is using the upnp.exe app.

Personally, I have no interest in downloading the files either; just want to watch them on a TV screen.

Last edited by simonen; 09-22-2009 at 02:55 PM.
Reply With Quote
  #24  
Old 09-22-2009, 03:14 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
I think the ideal next level is gong to be a Java implementation of UPnP.exe that we can turn into a servlet for Jetty. That way anyone who's running the Sage Webserver can run this also with zero extra config.
Reply With Quote
  #25  
Old 09-22-2009, 03:26 PM
simonen simonen is offline
Sage Aficionado
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 384
Really the ideal thing would be for Sage to add a UPnP browser to the software in their next version and then we would not be limited to the user queues or even playon for that matter IMHO.
Reply With Quote
  #26  
Old 09-22-2009, 07:20 PM
Jason's Avatar
Jason Jason is offline
Sage Expert
 
Join Date: Nov 2003
Location: Texas
Posts: 598
Quote:
Originally Posted by simonen View Post
Really the ideal thing would be for Sage to add a UPnP browser to the software in their next version and then we would not be limited to the user queues or even playon for that matter IMHO.
That's exactly what I have been saying!

http://forums.sagetv.com/forums/show...0&postcount=77

__________________
True standalone tuner functionality with the --> HAVA Channel Changer<--
Reply With Quote
  #27  
Old 09-23-2009, 10:01 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by evilpenguin View Post
they don't want people downloading the streams, for that matter neither do I.
There is some value to downloading the streams.. I use linux, and run playon in an XP VM. My CPU is an AMD 4850e, and playon running in a VM on this box cannot quite keep up in realtime.

The first thing I tried was to mount Playon's UPnP feeds via djmount (like the HD200 does) and "browse media files on server" from my HD100, and browse to the right file and play it. The browsing took forever, and playing the file was totally unreliable.

The second thing I tried was to rsync the shows I was interested in from the djmount to one of the sagetv media directories. This almost worked, but the playon VM was too slow, and I'd see shows where there were lots of problems (like the same frame repeated for 30 minutes).

My current kludge is to

- mount Playon's UPnP via djmount's playlist option, which gives me a url to wget for the actual .mpg file:

% djmount -f -o playlists,default_permissions,allow_other /tmp/dj

- download the file I want

% wget -O w13_s1e12.mpg `grep http /tmp/dj/PlayOn\ \(playon\)/Hulu/TV\ Episodes/W/Warehouse\ 13/s1e12:\ MacPherson.m3u`

- Then rescan imported media in sagetv.

This is totally manual, but at least I can watch Hulu on my HD100. I've been meaning to try to automate it..

Drew
Reply With Quote
  #28  
Old 09-23-2009, 02:07 PM
reggie14 reggie14 is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Maryland
Posts: 2,760
ep-

One thing to keep in mind if/as you develop a plugin is that it would be nice if there was a way to run the PlayOn server on a separate box from the Sage server. It seems like a goofy thing to do, but my Sage server (presumably) doesn't have enough power to do the transcoding for the PlayOn server, by my workstation has plenty of spare power. So, since I'm not ready to upgrade my Sage server, it'd be nice to run PlayOn on my workstation for a while.
Reply With Quote
  #29  
Old 09-23-2009, 02:43 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
No worries, UPnP.exe gets all its info over the network so you can run it on any PC. It might even run via Wine on a linux box.

Basically, my plan for weaponizing this is to make crank out a program that turns UPnP into a compliant Podcast feed. Then drop that into a webserver's cgi-bin folder would allow the creation of customizable URL's which could be feed though Sage's mediaRSS framework.

Last edited by evilpenguin; 09-23-2009 at 02:57 PM.
Reply With Quote
  #30  
Old 09-23-2009, 03:28 PM
reggie14 reggie14 is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Maryland
Posts: 2,760
Quote:
Originally Posted by evilpenguin View Post
Basically, my plan for weaponizing this is to make crank out a program that turns UPnP into a compliant Podcast feed. Then drop that into a webserver's cgi-bin folder would allow the creation of customizable URL's which could be feed though Sage's mediaRSS framework.
Great! I'm looking forward to trying this out. Thanks for working on it.
Reply With Quote
  #31  
Old 09-23-2009, 03:41 PM
HuMan321's Avatar
HuMan321 HuMan321 is offline
Sage Aficionado
 
Join Date: Apr 2009
Location: Idaho
Posts: 365
So what kind of PC horsepower does Playon require? My Sage Server runs WHS which has only a 20GB C: drive. Another PC on the network I could use to run Playon is a P4 3GHz, but as i read their website is too slow. Any tips on how to run Playon on my WHS (quad core) and not install to small C drive?
Reply With Quote
  #32  
Old 09-23-2009, 06:24 PM
Zippster's Avatar
Zippster Zippster is offline
Sage Aficionado
 
Join Date: Jun 2008
Location: Buffalo NY
Posts: 314
According to their site, they are going to be coming up with some sort of update to allow specifying usage besides just your windows drive, hope so as mine is only 20 GB because OS is all it holds.

My Sage server I just installed playon onto is dual opteron 2.0's , Sage doesnt ever use much of anything, running one Playon show ( to Xbox 360 ) though is using about 59% They also claim to be coming out with optimized updates to help CPU usage.

Cant wait to get this on to my extender though.

EXCELLENT work EP.
Reply With Quote
  #33  
Old 09-23-2009, 06:32 PM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by evilpenguin View Post
No worries, UPnP.exe gets all its info over the network so you can run it on any PC. It might even run via Wine on a linux box.
Not for me:

Code:
% wine z:\\tmp\\upnp 
Can't locate Win32.pm in @INC (@INC contains: .) at -e line 762.
BEGIN failed--compilation aborted at -e line 947.
If this is perl, maybe you could just publish the source?

Drew
Reply With Quote
  #34  
Old 09-23-2009, 06:50 PM
mayamaniac's Avatar
mayamaniac mayamaniac is offline
Sage Icon
 
Join Date: May 2004
Posts: 2,177
someone get Jeff/Narflex to see this thread, he might cook something up for the next beta.
__________________
Mayamaniac

- SageTV 7.1.9 Server. Win7 32bit in VMWare Fusion. HDHR (FiOS Coax). HDHR Prime 3 Tuners (FiOS Cable Card). Gemstone theme.
- SageTV HD300 - HDMI 1080p Samsung 75" LED.
Reply With Quote
  #35  
Old 09-23-2009, 07:09 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Quote:
Originally Posted by drewg View Post
Not for me:

Code:
% wine z:\\tmp\\upnp 
Can't locate Win32.pm in @INC (@INC contains: .) at -e line 762.
BEGIN failed--compilation aborted at -e line 947.
If this is perl, maybe you could just publish the source?

Drew
Hmm, yeah, its a compiled Perl script, but it should have all the libraries it needs packed into the .exe. But, then again, i'm not really clear on all the voodoo that goes into compiling perl scripts into executables so its not surprising that it wouldn't work. But, still no worries, as I should be able to compile it into a linux executable also. Here's the source code btw,

http://mediascraper.svn.sourceforge....st.pl?view=log
Reply With Quote
  #36  
Old 09-24-2009, 07:34 AM
simonen simonen is offline
Sage Aficionado
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 384
Houston, we have liftoff! Hulu user queue as an online feed is now a reality. More to come later today, and I need to figure out where to post the files for people to grab.

There are 2 parts. A vbscript that you can schedule to run however often you wish, must run after a restart of your computer though. The script also uses the upnp.exe app. The second part is a php script that translates the output of the upnp.exe app into an rss feed.
Reply With Quote
  #37  
Old 09-24-2009, 07:58 AM
Brent Brent is offline
SageTVaholic
 
Join Date: May 2006
Location: KC, Missouri
Posts: 3,695
Quote:
Originally Posted by simonen View Post
Houston, we have liftoff! Hulu user queue as an online feed is now a reality. More to come later today, and I need to figure out where to post the files for people to grab.
Excellent news! Keep us posted.
Reply With Quote
  #38  
Old 09-24-2009, 09:03 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by evilpenguin View Post
But, still no worries, as I should be able to compile it into a linux executable also. Here's the source code btw,

http://mediascraper.svn.sourceforge....st.pl?view=log
Hmm.. something is not quite right. I downloaded the script, and changed the shell interpreter to #!/usr/bin/perl, and it almost works. I tried some of your examples at the top of the thread. The first problem is that the *nix shell hates the " syntax you have (complains of mismatched quotes).

- I tried escaping them (./UPnP2Podcast.pl \"\"Hulu:TV Episodes:+2\") which gives me the usage mesage:
UPnP2Podcast v1.0beta
USAGE: UPnP2Podcast.exe (UPnP Search String)

- I tried putting a single quote around all of them. That works better, but doesn't find the server:

./UPnP2Podcast.pl '""Hulu:TV Episodes:+2"'
Error! Couldn't find UPnP Device: (""Hulu)

If I run strace, I see it found my playon server, but failed late. Eg:

Code:
connect(4, {sa_family=AF_INET, sin_port=htons(53478), sin_addr=inet_addr("172.31.193.172")}, 16) = 0
write(4, "GET / HTTP/1.0\r\nHost: 172.31.193.172:53478\r\nContent-Length: 0\r\n\r\n", 65) = 65
read(4, "HTTP/1.1 200 OK\r\nCONTENT-TYPE: text/xml\r\nContent-Length: 2770\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\" xmlns=\"urn:schemas-upnp-org:device-1-0\">\r\n   <specVersion>\r\n      <major>1</major>\r\n      <minor>0</minor>\r\n   </specVersion>\r\n   <device>\r\n      <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>\r\n      <dlna:X_DLNADOC xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">DMS-1.00</dlna:X_DLNADOC>\r\n      <friendlyName>PlayOn (playon)</friendlyNam"..., 4096) = 2835
read(4, "", 4096)                       = 0
close(4)                                = 0
select(8, [3], NULL, NULL, {6, 0})      = 1 (in [3], left {4, 4000})
recvfrom(3, "HTTP/1.1 200 OK\r\nST: upnp:rootdevice\r\nEXT: \r\nUSN: uuid:45981880-c614-4616-8f47-470ee3dcb6f0::upnp:rootdevice\r\nLOCATION: http://172.31.193.172:52478/\r\nSERVER: Windows NT/5.0, UPnP/1.0, Intel CLR SDK/1.0\r\nCACHE-CONTROL: max-age=900\r\nContent-Length: 0\r\n\r\n", 4096, 0, {sa_family=AF_INET, sin_port=htons(1900), sin_addr=inet_addr("172.31.193.172")}, [16]) = 252
open("/etc/protocols", O_RDONLY|0x80000 /* O_??? */) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=2510, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5fa4ad8000
read(4, "# Internet (IP) protocols\n#\n# Updated from http://www.iana.org/assignments/protocol-numbers and other\n# sources.\n# New protocols will be added on request if they have been officially\n# assigned by IANA and are not historical.\n# If you need a huge list of used numbers please install the nmap package.\n\nip\t0\tIP\t\t# internet protocol, pseudo protocol number\n#hopopt\t0\tHOPOPT\t\t# IPv6 Hop-by-Hop Option [RFC1883]\nicmp\t1\tICMP\t\t# internet control message protocol\nigmp\t2\tIGMP\t\t# Internet Group Management\nggp\t3\tGGP\t\t# g"..., 4096) = 2510
close(4)                                = 0
munmap(0x2b5fa4ad8000, 4096)            = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff07370340) = -1 EINVAL (Invalid argument)
lseek(4, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff07370340) = -1 EINVAL (Invalid argument)
lseek(4, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
connect(4, {sa_family=AF_INET, sin_port=htons(52478), sin_addr=inet_addr("172.31.193.172")}, 16) = 0
write(4, "GET / HTTP/1.0\r\nHost: 172.31.193.172:52478\r\nContent-Length: 0\r\n\r\n", 65) = 65
read(4, "HTTP/1.1 404 Not available\r\nContent-Length: 0\r\n\r\n", 4096) = 49
read(4, "", 4096)                       = 0
close(4)                                = 0
select(8, [3], NULL, NULL, {6, 0})      = 0 (Timeout)
close(3)                                = 0
write(1, "Error! Couldn\'t find UPnP Device: (\"\"Hulu)\n", 43Error! Couldn't find UPnP Device: (""Hulu)
) = 43
exit_group(0)                           = ?
Process 7737 detached
It is worth noting that djmount also makes those same complaints about 404s from http://172.31.193.172:52478/. But it works:

Code:
$ ls /tmp/dj/PlayOn\ \(playon\)/
Amazon VOD (Beta)  CBS  CNN  ESPN  Hulu  Netflix  PlayOn Info  Revision3  Syfy  YouTube
I don't know enough perl to know whats failing, or why..

Drew
Reply With Quote
  #39  
Old 09-24-2009, 10:12 AM
aflat aflat is offline
Sage Aficionado
 
Join Date: Feb 2009
Posts: 302
take a look at the qn function in perl, it should solve most of your quoting issues
Reply With Quote
  #40  
Old 09-24-2009, 11:13 AM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Sorry, I forgot to mention I updated the program to not be hardcoded for PlayOn anymore, now you have to specify it.
Code:
./UPnP2Podcast.pl 'PlayOn:Hulu:TV Episodes:+2'
Also, I made some modifications to the Net::UPnP .pm files so i'll have to post those as well. It'll work without them, but with them it can grab tons of extra metadata for the files.

Last edited by evilpenguin; 09-24-2009 at 11:18 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PlayOn Media Streaming Software for $19.99 JetreL The SageTV Community 7 09-30-2009 03:49 PM
Playon slowww SageGk SageTV HD Theater - Media Player 11 07-17-2009 06:27 AM
Special Playon Deal bigbill The SageTV Community 3 06-29-2009 01:08 PM
PlayOn... Beginners Manual... joelinkup SageTV HD Theater - Media Player 13 04-13-2009 01:55 PM
HD Netflix Content with Playon fyodor SageTV HD Theater - Media Player 0 03-14-2009 08:04 PM


All times are GMT -6. The time now is 08:16 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.