Sign up here and you can log into the forum!

UMSP Plugin :: PBS Video (Experimental)

UMSP Plugin Depot, the place for sharing plugins & info about them. No requests, just plugins/code.

UMSP Plugin :: PBS Video (Experimental)   

Postby shunte » Thu Mar 03, 2011 9:14 am

Yes folks here's a UMSP plug-in for the US Public Broadcasting System featuring all your favorite PBS offerings - so Git yur cultcha on!

Note that the plug-in may not work outside of the US due to site restrictions; if you can play content through the PBS Video site then you're good to go.

I've tagged this as experimental as I've not had much time to really bash on it and so there may be a couple of rough edges

Note that the seemingly "extra" menu step is by design, the plug-in would timeout when it had too much work to do so I added an extra hop for improved user experience.

The plug-in relies on RTMP streams that unfortunately are in a format not supported by the WD, at least that's what the box reported, and thus an on-the-fly transcoding is performed.

I've implemented the code so the proxy that does the RTMP and transcode can be hosted by the WD or alternatively if you have a web server available with a little more horse-power than the WD you can configure to use that mechanism instead.

Link updated Wednesday 22-Mar-2011 @ 19:46 EST
File name: wdpbs.tgz File size: 9.26 KB

Copy the archive to your WD and untar to the /tmp/umsp-plugins folder, e.g.
Code: Select all
tar xzf wdpbs.tgz
cp -fR wdpbs/* /tmp/umsp-plugins/wdpbs/
then go to the webend to activate. Alternatively you can rename the archive to umsp.tgz, reboot and activate

The plug-in presents three categories much the same as the PBS Video site
Image

Browse By Programs
Browse By Topic
Browse By Collection

See the PBS site for more details

The plug-in started out as a reverse engineering of an XBMC plug-in that turned out to be broken because PBS had pulled the content that it relies upon.

The WD:PBS plug-in is using combination of the available RSS along with some HTML scrape hopefully PBS keeps these in place for a good long while to come.

Let me now if you run into problems
Last edited by shunte on Wed Mar 23, 2011 3:49 pm, edited 8 times in total.
If you like the work I do please feel free to make a donation to the Red Cross
User avatar
shunte
Developer
 
Posts: 420
Joined: Sun Sep 19, 2010 1:43 am
Location: Cambridge, MA U. S. and A.

Re: UMSP Plugin :: PBS Video (Experimental)   

Postby b-rad.cc » Thu Mar 03, 2011 11:05 am

sounds cool :mrgreen: i'll give it a shot later tonight.
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: UMSP Plugin :: PBS Video (Experimental)   

Postby Montreal1 » Thu Mar 03, 2011 12:22 pm

Nice one, just tested...can't watch, is going frame by frame...
Montreal1
DLX'er
 
Posts: 73
Joined: Mon Jun 07, 2010 4:09 am

Re: UMSP Plugin :: PBS Video (Experimental)   

Postby shunte » Thu Mar 03, 2011 1:23 pm

I got smooth playback but I have to admit I'm using my HTPC to host the RTMP/transcode piece

It took quite a bit of tweaking to get the transcoding just right and its not just a simple container replacement both audio and video are re-encoded to WD happy formats

If you can try configuring so that the proxy is setup on an external server, e.g. my configuration :
Code: Select all
config_tool -c WDPBS_SERVER='http://192.168.1.192/wdlxtvumsp/wdpbs-proxy.php'
where .192 is my HTPC

Simply copy the proxy file as-is, no mods required

Alternatively try this edit in the proxy adding nice to the command
Code: Select all
      // lower process priority (nice) to give the OSD a chance to pick-up the clean stream
      $cmd = "nice -n19 /usr/bin/rtmpdump -r '".urldecode($_GET['r'])."' -y '".urldecode($_GET['y'])."' -q | ffmpeg -loglevel quiet -i pipe:0 -vcodec mpeg4 -acodec ac3 -ac 2 -ar 48000 -ab 192k -f $format pipe:1 | cat";
To be honest not sure if that'll help but worth a try
If you like the work I do please feel free to make a donation to the Red Cross
User avatar
shunte
Developer
 
Posts: 420
Joined: Sun Sep 19, 2010 1:43 am
Location: Cambridge, MA U. S. and A.

Re: UMSP Plugin :: PBS Video (Experimental)   

Postby Montreal1 » Sat Mar 05, 2011 8:16 am

With this logic plugin, that's mean we can get justin.tv running via some HTCP?
Montreal1
DLX'er
 
Posts: 73
Joined: Mon Jun 07, 2010 4:09 am

Re: UMSP Plugin :: PBS Video (Experimental)   

Postby shunte » Sat Mar 05, 2011 3:23 pm

The link in the initial post has been updated with the latest version of the plug-in

I've resolved a couple of problems with the plug-in

Playback of full episodes was problematic and its now pretty solid

This turned out to be handshake problems on the RTMP process, adding in a player argument to rtmpdump resolved this; I've not tested with a WD sourced proxy but it works just fine with the proxy on my HTPC webserver, it may not work with the proxy on the WD given the player is shockwave, I'm in the middle of watching a show as I type but will check on the later and post an update.

**Update** plays with a WD based proxy but is pretty horrible, getting the choppy playback that Montreal1 reported, some initial minor tweaking on process priority isn't helping either, again I'll keep you all posted with progress **Update**

There is the odd show that won't play and I've not gotten to the bottom of that issue

In addition current problems I'm seeing are audio sync exhibits after 20 minutes or so of playback, becoming more and more noticeable as the video progresses and depending on the content - I say that because a show like "Secrets Of The Dead" has a lot of content with voice over and interviews interspersed so the sync issue is only a problem when there is a talking head on screen.

Anyway, it's a problem so I'm dipping back into the ffmpeg documentation for resolution

Speaking of resolution video quality is a little hit and miss, again this could be my choice of ffmpeg transcoding but given the "vanilla" rtmpdump content isn't playable I'm finding it hard to compare, everything looks good on a PC monitor from 2 feet away but on my 50" plasma not so much - YMMV.

Another problem I've noticed that I've not gotten to the bottom of is when a show has finished the WD remains in play mode with a blank screen, again this seems to happen more often than not with full shows.

Search has been fully implemented

I may add custom menus on the next pass so you can specify your shows via XML configuration

Again please let me know if you run into problems and if you discover workarounds/fixes for any of the issues

Regarding Justin.tv given it's using streaming a plug-in could be developed that utilizes similar techniques as being employed here - it's not currently on my todo list.
If you like the work I do please feel free to make a donation to the Red Cross
User avatar
shunte
Developer
 
Posts: 420
Joined: Sun Sep 19, 2010 1:43 am
Location: Cambridge, MA U. S. and A.

Re: UMSP Plugin :: PBS Video (Experimental)   

Postby RMerlin » Mon Mar 07, 2011 10:54 am

shunte wrote:**Update** plays with a WD based proxy but is pretty horrible, getting the choppy playback that Montreal1 reported, some initial minor tweaking on process priority isn't helping either, again I'll keep you all posted with progress **Update**


I wonder if people with more powerful routers (such as an Asus RT-N16) could run the transcoding proxy on their DD-WRT'ed router... That'd be an interesting setup :)
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada

Re: UMSP Plugin :: PBS Video (Experimental)   

Postby recliq » Mon Mar 07, 2011 12:26 pm

i'm sorry to say so but i doubt that we will ever be able to transcode video on wd in realtime... simple container cange may be possible but forget about video transcoding :geek:
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5513
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: UMSP Plugin :: PBS Video (Experimental)   

Postby shunte » Mon Mar 07, 2011 2:08 pm

yep I have to agree, the WD is usually the little engine that can but it really humps dry air when you push it too far :)

not sure if a router would have enough horse power but I bet there are a good few NAS devices that may be able to take the load if a networked PC or other isn't available

all of the videos in the case of PBS are being hosted from the Amazon E3 cloud[front], maybe someone will pony up an account to run a proxy utilizing the same service :P

or maybe not ;)
If you like the work I do please feel free to make a donation to the Red Cross
User avatar
shunte
Developer
 
Posts: 420
Joined: Sun Sep 19, 2010 1:43 am
Location: Cambridge, MA U. S. and A.

Re: UMSP Plugin :: PBS Video (Experimental)   

Postby shunte » Mon Mar 07, 2011 6:02 pm

update is available via the link in the initial post

apologies but not much progress on getting the audio sync issue fixed but I have added custom menu support to allow you to define canned search criteria and pin specific shows, topics or collections

configuration is hopefully self-explanatory, here is an example XML
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<items>
  <item>
    <title>Secrets Of The Dead</title>
    <type>search</type>
    <query>secrets of the dead</query>
    <maxresults>200</maxresults>
  </item>
  <item>
    <title>NOVA</title>
    <type>program</type>
    <programid>979359664</programid>
    <maxresults>200</maxresults>
  </item>
  <item>
    <title>Science (Topic)</title>
    <type>subject</type>
    <programid>957383708</programid>
    <maxresults>200</maxresults>
  </item>
  <item>
    <title>PBS Indies (Collection)</title>
    <type>feature</type>
    <programid>135</programid>
    <maxresults>200</maxresults>
  </item>
  <item>
    <title>Jimmy Carter</title>
    <type>search</type>
    <query>jimmy carter</query>
    <maxresults>200</maxresults>
  </item>
</items>
Configuration is either a shortcut to one of the standard menu'd options or a canned search, on the PBS video website mouse over an entry to get its type and id.

hopefully the next iteration addresses the sync and resolution/quality problems i'm seeing

one last comment on justin.tv, from my reading over at the XBMC forums jtv have really closed the system down and encrypt their streams

the XBMC solution actually uses a full screen browser to "fake" the appearance of an application hosted video

obviously that is not an option for the WD directly but anyone interested may want to check out TVersity as it had a similar solution baked into a release a year or so ago inclusive of on the fly transcodng to a UpnP client.

I mucked around with it when it was initially released and at the time it was a little rough around the edges but was functional - there may have been improvement since.
If you like the work I do please feel free to make a donation to the Red Cross
User avatar
shunte
Developer
 
Posts: 420
Joined: Sun Sep 19, 2010 1:43 am
Location: Cambridge, MA U. S. and A.

Next

Return to UMSP Plugins

Who is online

Users browsing this forum: No registered users and 1 guest