Video/audio/image feed conversion plugin system?

General discussion about PS3 Media Server (no support or requests)

Video/audio/image feed conversion plugin system?

Postby whome » Thu Feb 19, 2009 10:11 am

Updated:
2009-03-30 Fixed Tomcat 6.0.18 jsp tag syntax change, added detailed installation.txt document
2009-03-22 Added The Onion, Vimeo.com, ČT24 Czech TV (requested by reffelo)


Webfeeds to RSS conversions (Tomcat web application)
http://koti.mbnet.fi/akini/ps3/areenafeed.html
http://koti.mbnet.fi/akini/ps3/installation.txt

Hello,
There is a very good, for finnish people interest really, http://areena.yle.fi media service in Finland. We use it extensively and are happy with it.

Unfortunately they don't have rss formatted search page, so I made an experiment and created a conversion module (Java + .jsp page), hosted in a localhost Tomcat http service. Here is two static files after a conversion run.

Valid and simple rss feed supported by PS3MS server
http://koti.mbnet.fi/akini/ps3/rss-simple_video.xml
http://koti.mbnet.fi/akini/ps3/rss-simple_audio.xml

More complete and valid rss feed, supported by PS3MS server
http://koti.mbnet.fi/akini/ps3/rss_video.xml
note: FF3.0x is unable to render it due to a bug in enclosure file link, it must always use http protocol but YleAreena source links are mms protocol. IE can render it fine but even it cannot show mms enclosure attachment links.

You can test sources with the following web.conf settings. My box: WinXP, VLC 0.9.8a
Code: Select all
## Yle Areena
videofeed.Web=http://koti.mbnet.fi/akini/ps3/rss_video.xml
videofeed.Web=http://koti.mbnet.fi/akini/ps3/rss-simple_video.xml
audiofeed.Web [vlcaudio]=http://koti.mbnet.fi/akini/ps3/rss-simple_audio.xml


XMB menu creates a folder for each feed source. Last folder name is taken from the <title> tag in a rss.xml document
Video menu: Web / Yle Areena :: Tänään otsikoissa
Video menu: Web / Yle Areena :: Reinikainen
Audio menu: Web [vlcaudio] / Yle Areena :: Kulttuuripeili

Media files use .wmv and .wma formats, I could not get last entry, radio, work unless put [vlcaudio] tag. MPlayer Web was my default radio web streamer, it failed. VLC did better job althought it crashed several times....not uncommon to see with vlc streamer.

Feature Request: rss videofeed and audiofeed conversion plugin system to web.conf file
We must run an another external http service to convert proprietary media services to rss.xml format. Its fine to us who has a dedicated web service available, but not all like it and is unnecessary overhead. PS3MS could very very easily support a simple plugin system for conversion tasks.

Here is a concept how we could implement this to an existing web.conf file. Registered class should implement a simple interface to get feed.areena1.* values in a hashmap and return a (simple) rss format.
Code: Select all
## web.conf file: register feed source
feed.areena1.type=video
feed.areena1.folder=Web,Yle Areena
feed.areena1.class=com.mypackage.areenafeed.YleAreenaToRSSFeed
feed.areena1.parameter.source=http://areena.yle.fi/hae?l=3&keyword=Ajankohtainen+Kakkonen
feed.areena1.parameter.quality=hi
feed.areena1.parameter.somekey=somevalue
feed.areena1.parameter.<anykey*>=value

## Interface mockup to be implemented by conversion classes
public interface RSSFeedSource {
  // init("areena1", params), key-value pairs not including prefix "feed.areena1." in a key.
  public void init(String name, Map<String,String> params);
  public String createFeed(); // return a simple rss.xml document
  public void createFeed(OutputStream out); // or should we write to a stream?

  // this may update the initial feed object to point to the exact videofeeds.
  // Example: youtube.com/watch?v=xxxxx rss links point to the video html page,
  // this method parses a url link to the actual .flv video link. Returned
  // object is then given to vlc webstreamer. Do nothing if initial object link was fine.
  // This is two-step optimization for dynamic rss documents
  //    1st step: createFeed creates rss.xml document and files are listed in XMB
  //    2nd step: User clicked a video file on XMB, resolve link to .flv/.mp4/.any video file
  public FeedObject resolve(FeedObject feedObj);
}
Last edited by whome on Mon Mar 30, 2009 11:16 am, edited 6 times in total.
whome
 
Posts: 113
Joined: Tue Jan 20, 2009 12:26 am

Re: Video/audio/image feed conversion plugin system?

Postby shagrath » Thu Feb 19, 2009 6:54 pm

Yeah, I think a plugin system will be planned somewhere on the roadmap... I was more thinking about a scripting one, maybe
(I already included beanshell, for video settings, for example)
but it's not for tomorrow, I guess
shagrath
Project Lead
 
Posts: 2668
Joined: Wed Jan 14, 2009 1:39 pm

Re: Video/audio/image feed conversion plugin system?

Postby whome » Fri Feb 20, 2009 6:21 pm

Publish YLE Areena site to Playstation 3 as a web-tv
Here is a full sources and .war archive to be deployed on Tomcat/Jetty jsp engine.
http://koti.mbnet.fi/akini/ps3/areenafeed.html
http://areena.yle.fi

You must host it on your own because PS3MS at the moment does not have a working plugin system for feed conversions. It would be very easy to create a standalone converter without .jsp page wrapper. My code does everything in a plain-old-java-object so writing a rss document to a stream or string object is basicly ready.

I have run tree static files so you can try it out without jsp engines.
Code: Select all
## Yle Areena
videofeed.Web=http://koti.mbnet.fi/akini/ps3/rss_video.xml
videofeed.Web=http://koti.mbnet.fi/akini/ps3/rss-simple_video.xml
audiofeed.Web [vlcaudio]=http://koti.mbnet.fi/akini/ps3/rss-simple_audio.xml
whome
 
Posts: 113
Joined: Tue Jan 20, 2009 12:26 am

Re: Video/audio/image feed conversion plugin system?

Postby whome » Sat Feb 21, 2009 1:30 pm

Publish YLE Areena site to Playstation 3 as a web-tv
http://koti.mbnet.fi/akini/ps3/areenafeed.html

I have updated a package to contain a commandline version. You can use either a dynamic http:// or static file:// sources in a web.conf file. See example feeds below.

Code: Select all
## YLE Areena feeds
videofeed.Web=http://localhost:8080/areenafeed/rss.jsp?quality=hi&medialink=asxrefmms&media=video&keyword=T%C3%A4n%C3%A4%C3%A4n+otsikoissa
videofeed.Web=http://localhost:8080/areenafeed/rss-simple.jsp?quality=hi&medialink=asxrefmms&media=video&keyword=Reinikainen
audiofeed.Web [vlcaudio]=http://localhost:8080/areenafeed/rss-simple.jsp?medialink=asxrefmms&media=audio&keyword=Kulttuuripeili

videofeed.Web2=http://koti.mbnet.fi/akini/ps3/rss_video.xml
videofeed.Web2=http://koti.mbnet.fi/akini/ps3/rss-simple_video.xml
audiofeed.Web2 [vlcaudio]=http://koti.mbnet.fi/akini/ps3/rss-simple_audio.xml

videofeed.Web3=file:///C:/projects/areenafeed/rss-simple1.xml
videofeed.Web3=file:///C:/projects/areenafeed/rss-simple2.xml


I look forward better plugin system so we could use dynamic sources without external Tomcat/Apache/etc.. web service. For now users can use external Tomcat server and/or create offline documents.
whome
 
Posts: 113
Joined: Tue Jan 20, 2009 12:26 am

Re: Video/audio/image feed conversion plugin system?

Postby whome » Wed Mar 04, 2009 12:44 pm

Create RSS feed from YLE Areena, Youtube and VideoGoogle sites
http://koti.mbnet.fi/akini/ps3/areenafeed.html

I've updated a package to include more varied youtube and video.google support. Can parse thumbnails from all three sites.

What is it: its Java webapp for Tomcat/Jetty to autogenerate .rss feed from the html web sites. You can use a converter url in web.conf videofeed settings.

Issues: This is an external converter so some things. I must create a fully qualified videofile links to the rss.xml document. Its a link thats sent to VLC streaming process. This is fine but may take few seconds to parse and render rss.xml reply.

PS3MS does not have a flexible enough plugin system providing 3rd party videofeed support. Currently it has a hardcoded youtubeRSS site support and can provide a two-way medialink resolving. External rss feeds don't have that luxury so I must resolve all medialinks in one go.

two-way medialink resolving: PS3MS reads rss.xml and sends a list of files to XMB menu. Soon as user clicks on a video file icon to start playback, PS3MS queries youtube.com/watch?v=xxxxx subpage to find the internal media link. Link is then given to VLC player for web streaming. This is a good thing as the initial rss.xml parsing does not take extra time.

external converter's one-way resolving issue: PSMS reads rss.xml and sends a list of files to XMB menu. Starting a playback on one of the files it sends the original rss.xml link to VLC streaming (It must cause don't know anything else what to do with it). This is a reason I must parse a fully-qualified rss.xml links at the beginning thus taking few seconds.

Better videofeed plugin system could provide two-way medialink resolving to 3rd party rss converters.
Code: Select all
## Interface mockup to be implemented by conversion classes
public interface RSSFeedSource {
  // init("areena1", params), key-value pairs not including prefix "feed.areena1." in a key.
  public void init(String name, Map<String,String> params);
  public String createFeed(); // return a simple rss.xml document
  public void createFeed(OutputStream out); // or should we write to a stream?

  // this may update the initial feed object to point to the exact videofeeds.
  // Example: youtube.com/watch?v=xxxxx rss links point to the video html page,
  // this method parses a url link to the actual .flv video link. Returned
  // object is then given to vlc webstreamer. Do nothing if initial object link was fine.
  // This is two-step optimization for dynamic rss documents
  //    1st step: createFeed creates rss.xml document and files are listed in XMB
  //    2nd step: User clicked a video file on XMB, resolve link to .flv/.mp4/.any video file
  public FeedObject resolve(FeedObject feedObj);
}
whome
 
Posts: 113
Joined: Tue Jan 20, 2009 12:26 am

Re: Video/audio/image feed conversion plugin system?

Postby whome » Sun Mar 22, 2009 3:39 pm

Updated: 2009-03-22
Added The Onion, Vimeo.com, ČT24 Czech TV (requested by reffelo)

http://koti.mbnet.fi/akini/ps3/areenafeed.html
http://koti.mbnet.fi/akini/ps3/installation.txt

ps: I am planning on hacking own copy of PM3MS sources and create a proof-of-concept plugin system. It would give us a direct converter interface without an external Tomcat/Jetty servlet engine and a two-way medialink resolving.
whome
 
Posts: 113
Joined: Tue Jan 20, 2009 12:26 am


Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests