PDA

View Full Version : SageTV Media Player Plugin


Narflex
08-05-2005, 04:13 PM
We've just released the spec publicly for writing a MediaPlayer plugin for SageTV. :goodjob: This information can be found at:

http://www.sagetv.com/2_papers/MediaPlayerPlugins.txt

Here's the general information about it; more details (such as the Java interface description) can be found by following the above link:

As of SageTV 3.0 there's a MediaPlayer plugin interface that allows a user to use alternate implementations for playing back media files.

This plugin can be used to integrate things such as the following into SageTV:

* a FLAC/Ogg/AAC/etc. audio media player
* alternate video player (MPlayer, WindowsMediaPlayer, etc.)
* a music player with alternate music visualizations
* hardware decoders (XCard, PVR350, etc.)
* media adapters (MediaMVP, Roku, etc.)

IMPORTANT NOTE: :D
The full SageTV UI can be exported to remote locations or devices by using this plugin along with the SageTV Input plugin (http://www.sagetv.com/2_papers/SageTVInputPlugins.txt) and the SageTV OSD Rendering plugin (http://www.sagetv.com/2_papers/OSDPlugins.txt). These 3 interfaces provide all that is needed to get the SageTV UI running on a Media Adapter or Media Extender or simillar device. An example of this can be seen in the Hauppauge MediaMVP plugin available here: http://www.streams.ch/

There are already 2 implementations of this available. One for the Hauppauge Media MVP (Thanks Matt) and the other for the Sigma Designs XCard (Thanks Tom).

AndyS
08-05-2005, 06:44 PM
This is really great news. Thanks Jeff!

Andy.

KJake
08-05-2005, 10:33 PM
yeah, I know there is/was some interest in getting the Roku devices working with Sage as they could be used as Media Extenders or streaming Music players with Sage managing the music. Too bad I don't have access to those devices :(

insomniac
08-05-2005, 10:36 PM
thx for sharing!

geogecko
08-05-2005, 10:38 PM
I may be confused here, but...

Does this mean that you can setup ZoomPlayer or Theater Tek to play inside of SageTV?

Secondly, on the music player, would one be able to run iTunes inside of Sage with this?

I'm thinking the answers are no, but I'm a bit confused on what this plug-in is for, otherwise.

Thank you.

JUC
08-06-2005, 06:10 AM
This is huge. I for one will not be able to help out in the cause due to my inaptitude, BUT--we should hopefully be approaching import heaven very soon with the help of some great developers on this forum!!!!!!
Thanks
JUC

dvd_maniac
08-06-2005, 08:33 PM
Is this similair to Cayar's External Video/Music/DVD Player? If so that is great news indeed. Can it work like Cayar's where it only plays the alternate media player for non-native file types? Or can it send LiveTV to the media player?

ErsatzTom
08-06-2005, 10:24 PM
Is this similair to Cayar's External Video/Music/DVD Player? If so that is great news indeed. Can it work like Cayar's where it only plays the alternate media player for non-native file types? Or can it send LiveTV to the media player?

When you configure the media player in the properties file you can set the default media player and/or a media player for a specific file extension. If you wanted more fine grained control over which media player is used in any particular situation, it shouldn't be terribly difficult to write a media player "switch" that is configured as the default and then, when load (or fastLoad) is called it decides which media player to use (and then, of course, it passes on each subsequent method call to the same player).

t

silkshadow
08-24-2005, 10:14 PM
I go away and this happens. I should go away more often :D. Thanks Frey!

briands
08-25-2005, 08:10 AM
This has been quet for a few weeks. Hopefully that means there are some skilled developers hiding away churning out code for a great HD capable client device.

JasonJoel
08-25-2005, 08:26 AM
Personally, I doubt it.


Not sure why end users would spend hundreds of hours making a custom plugin for Sage for free. But that is just me.

Sure would like to see the Sage interface on a fiew more set top devices though (Pinnacle Showcenter, Buffalo LinkTheater, SOMETHING that can play more than MPG).

Jason

salsbst
08-25-2005, 08:45 AM
Not sure why end users would spend hundreds of hours making a custom plugin for Sage for free.I think you'd get some interesting answers to this question if you posed it directly to those who have done so.

Personally, I am a recovering capitalist. I majored in economics n college, and I was enthralled with the free market -- sort of a modified libertarian -- don't get the government involved unless there is a market failure. At the time, I didn't perceive market failures all over the place.

These days, I see market failures in my sleep.

So... all of that is to say that I have come to appreciate non-capitalistic behavior as interesting and sometimes noble, and certainly worthy of contribution.

Giving away one's work and having it appreciated can provide a sense of accomplishment and gratification.

Also, if you want something badly enough, you sometimes have to do it yourself!

:)

P.S. I rarely even use Weather Report Suite myself, probably twice a week. But I don't regret doing it or sharing it!

P.P.S. Another reason for me was a desire to learn Java. I'm a .Net guy in real life, but because of growing dissatisfaction with Microsoft and capitalism (particularly monopoly), I wanted to cross over. Developing WRS was a good tutorial for myself.

stanger89
08-25-2005, 09:04 AM
Personally, I doubt it.


Not sure why end users would spend hundreds of hours making a custom plugin for Sage for free. But that is just me.

Wouldn't that be exactly what most plugins are?
WRS
Custom STVs
MVP plugin
Xcard plugin
Most Meedio Plugins
MyMovies for MCE
etc.

nielm
08-25-2005, 09:19 AM
Not sure why end users would spend hundreds of hours making a custom plugin for Sage for free. RSS news: learn java/Studio
Dynamic menus: learn java/XML/Studio; but mainly because I wanted the functionality to allow Sage to be my HTPC front-end.
Webserver: learn servlets, learn CSS/XHTML, because I wanted the functionality
IMDB search: had an itch to scratch, and most of my EPG data is not in my native English, so I wanted a decent movie review site, (and how often have you watched a movie and thought: where have I seen that actor recently!)
xmltv tv_grab_be: because I needed it!
Modules: because I didn't want to support an STV!

Now I didn't have to make them public, but I am a generous spritied kind of person, and I was fed up with not *delivering* something in my current job.

Why for free? because I don't want to create the expectation of support that payment creates.

I am sure Matt (MVP), ErstatzTom (Xcard), Cayars (STV), Mlbdude (STV), KJake (DVD burner), Crashless (STV), AndersNolberger (no end of network encoders!), Malore (comskip, STV), JereJones (comskip, SA, Dirmon) and all the others each have their own reasons!

mogrinz
08-25-2005, 11:59 AM
Now if we could just get Studio :)

Still, this is an exciting and most-welcome step in adding more open-ness to Sage

sleonard
08-25-2005, 02:50 PM
So, are any of the wonderful, generous, and kind spirited STV and plugin developers w/ Studio actually working on any media player plugins with this API?

I know that there was project started to integrate J.River's Media Center last year that ran into difficulties. I was hoping that this API would get it going again but maybe the problems were on the J.River side of the equation and not Sage.

OTOH, if Sage 3 gets going on the WMA support and improves the music player interface I'll be happy with that.

stanger89
08-25-2005, 02:59 PM
So, are any of the wonderful, generous, and kind spirited STV and plugin developers w/ Studio actually working on any media player plugins with this API?

Matt's MVP plugin and ErzatzTom's Xcard plugin both use this interface.

I know that there was project started to integrate J.River's Media Center last year that ran into difficulties. I was hoping that this API would get it going again but maybe the problems were on the J.River side of the equation and not Sage.

This doesn't really do much for that. The issues we (more like salsbst) ran into, were bridging the Java/COM gap.

JasonJoel
08-25-2005, 04:31 PM
Yeah, yeah... You're right.

I guess I was in too pessimistic of a mood. But you have to admit the comment generated a lot of discussion. ;)

Jason

Wouldn't that be exactly what most plugins are?
WRS
Custom STVs
MVP plugin
Xcard plugin
Most Meedio Plugins
MyMovies for MCE
etc.

Jason
11-23-2005, 01:58 AM
I'm going to resurrect this to see if anyone (other than Matt or Tom) has/have utilized this in any way?

It would seem to me that by calling Windows Media Player ( or anyother player...) in lieu of the internal media player (at least for audio files... mp3's) two of the 'most' requested features for Sage could be done in one fell swoop... visualizations and internet radio. :thumb:

With the G-Force visualization add-on (http://www.soundspectrum.com/) there are even album covers shown for playback visualizations. Cheap folks like me, could opt for the free version of WhiteCap as well. Both G-Force and WhiteCap integrate with WMP (any various other players...).

I'm no java programmer so much of this is gibberish to me... Outside of cracking open a java book/tutorial, am I simply missing something here, or am I over thinking the whole issue? :confused:

-Jason

deria
11-23-2005, 09:20 AM
This is an interesting thread. I don't like the built-in media player as it pertains to music, so I was planning to replace it. The method I was planning on was to use Winamp and just drive it through windows messaging. That would have allowed for all the usual music player goodness, including full screen visualizations -- but this seems like a more elegant and integrated approach. I'll have to read over the documentation provided in more detail to see if its feasible (because the odds of my writing it in java are... slim) but it would be nice to use a different media player for my music/playlists. Then the only problem I would have is cover art. Thanks for resurecting this thread -- I probably wouldn't have seen it otherwise.

Jason
11-23-2005, 09:55 AM
This is an interesting thread. I don't like the built-in media player as it pertains to music, so I was planning to replace it. The method I was planning on was to use Winamp and just drive it through windows messaging. That would have allowed for all the usual music player goodness, including full screen visualizations -- but this seems like a more elegant and integrated approach. I'll have to read over the documentation provided in more detail to see if its feasible (because the odds of my writing it in java are... slim) but it would be nice to use a different media player for my music/playlists. Then the only problem I would have is cover art. Thanks for resurecting this thread -- I probably wouldn't have seen it otherwise.

Thank goodness... :clap:

As far as the cover art... why not leave it to others? G-Force includes cover/album art and it integrates with WMP.

Here are a few screenpics...

http://www.soundspectrum.com/g-force/album_art.html

-Jason

stanger89
11-23-2005, 11:58 AM
Just an FWIW, if I understand what the MediaPlayer plugin API is for, it's really more of a "Decoder plugin" API. It would be more for implimenting stuff like a FLAC/APE decoder, or Tom's Xcard plugin, etc.

PGPfan
11-23-2005, 12:56 PM
Deria,

Please take a look at the links that Jason provided for G-force and Whitecap. Thanks Jason!

Both of those (IMHO) would be an ideal implementation into a music player plugin. If you could successfully create such a beast, I bet a significant number of us users would contribute some $ for your efforts. At least I would.

Ideally, it would be an .stvi that could be used with any .stv one chooses. Right now I'm using the great Meekel .stv that Crashless is making.

Thanks!

-PGPfan

Narflex
11-23-2005, 02:10 PM
Just an FWIW, if I understand what the MediaPlayer plugin API is for, it's really more of a "Decoder plugin" API. It would be more for implimenting stuff like a FLAC/APE decoder, or Tom's Xcard plugin, etc.

Actually it's meant to be a full media player replacement, not just a decoder. The examples suggested in this thread are all possible.

mkanet
11-23-2005, 06:26 PM
This is great news!

Mahoney
12-09-2005, 06:46 AM
Has anyone set about this for Windows Media Player yet? Between DRM and the nVidia limitations on what it will decode in which player, I'd quite like to use Windows Media Player; like it or loathe it it does seem to be the "standard" now.

deria
12-09-2005, 10:27 AM
Has anyone set about this for Windows Media Player yet? Between DRM and the nVidia limitations on what it will decode in which player, I'd quite like to use Windows Media Player; like it or loathe it it does seem to be the "standard" now.

Winamp is able to play DRM'd WMA files just fine. you might want to check out my Winamp MediaPlayer plugin.

Mahoney
12-09-2005, 10:42 AM
I'm thinking more of video files in the future, and of some limit nVidia have put in their decoder that means it only decodes surround sound audio in an mpeg file properly if it's played in windows media player. I got the impression Winamp is all about music files, not video; right?

deria
12-09-2005, 12:17 PM
I'm thinking more of video files in the future, and of some limit nVidia have put in their decoder that means it only decodes surround sound audio in an mpeg file properly if it's played in windows media player. I got the impression Winamp is all about music files, not video; right?

Well, Winamp can technically do video, but whether its good at it or bad at it I couldn't say. I'm not sure what NVIDIA limitations you're talking about, though. I can play multichannel mpeg files just fine without using WMP.

stanger89
12-09-2005, 04:26 PM
I'm not sure what NVIDIA limitations you're talking about, though.

Nvidia's decoders won't decode AC3 in Sage.

CadErik
01-28-2006, 01:45 PM
We've just released the spec publicly for writing a MediaPlayer plugin for SageTV. :goodjob: This information can be found at:

http://www.sagetv.com/2_papers/MediaPlayerPlugins.txt



I'm trying to write a windows media player plugin and integrate the visualization part and I don't really get it. I believe I should be able to get the visualization in any awt or swt window (I'd like to use WMP as activeX inside an SWT Frame and eventually bridge that). But I don't understand where this part is "plugged". I'd like to have something clean that works in any fullscreen or not fullscreen mode.

Thanks

Erik.

GKusnick
02-05-2006, 05:08 PM
Here's a technical question about the interface. Which part is it that triggers the FilePlaybackFinished hook in Sage? I'm guessing it's a particular value (or transition) of getState(), but so far I'm not having much luck figuring out which one. (EOS_STATE does not seem to do it.)

Thanks for any info.

ARMYB77
03-29-2007, 09:48 PM
Wow,
This information was released over 18 months ago now and still the only plugins that have been made are all for Music. No one has implemented it's full advantages of video capabilities.
I think GKusnick made some great leaps with his WMP and Parser for WMAs. Does anyone know how hard it would be to modify his source to include WMVs?

With this plugin I see in our future the possibility of a Napster plugin, or maybe something for Zune.

With WMV added to this feature it would give the possibilities of adding VOD such as Netflix, Vongo, CinemaNow, and Movielink.

I talked with Vongo and they seem interested in the possibilities of adding a plugin for SageTV, and MediaPortal.

I understand that it would probably be hard to add DRM support to SageTV core without having to deal with Microsoft. But a plugin is a simple solution. It is worth donating to anyways.

Thanks,
Armyb77

stuckless
08-24-2008, 05:32 PM
Does anyone know if a MediaPlayer Plugin could provide simple DVD playback in the Placeshifter client? If so, then I'd consider writing a plugin to provide that support.

bcjenkins
08-25-2008, 02:41 PM
This should be fairly straightforward to do if all we're talking about is playing a movie. If you're talking about accessing menus etc, I think it gets harder.

(This from a guy who is not a programmer)

You need something installed on the system to play the movie (VLC?) and then pipe it into the transcode process for the place shifting session. Here's how VisualHub on the Mac does it:'/Applications/VisualHub.app'/Contents/Resources/play_title '/Volumes/VISUALHUB_DVD/''VIDEO_TS' 1 1 1 2> /dev/null | '''/Library/Application Support/Techspansion/'vh131ffmpeg -y -i - -threads 4 -s 640x480 -r 29.97 -vcodec mpeg4 -g 200 -qmin 5 -b 2048k -async 50 -acodec libfaac -ar 48000 -ac 2 -ab 128k '/Users/bcjenkins/Desktop'/'VIDEO_TS'.temp.mp4 2>> /tmp/vhtemp/1219694381/visualhub_time ; echo done > /tmp/vhtemp/1219694381/visualhub_working

B

stuckless
08-25-2008, 05:14 PM
Maybe I'll just write a plugin and see if the placeshifter will actually use it. I just don't know if sage will use the plugin if a placeshifter is being used, or if it will always use it's internal player (which won't show a dvd menu at all). Initially I was thinking that I'd support simple dvd playback (ie, just play the largest title on the disc), but later I'd like to try to actually support dvd menus.

I'm not even concerned about transcoding... I've told my placeshifter to NOT transcode, since my desktop is actually a better machine than my sage server.

I was thinking about running xine/vlc in a slave mode, which is how Sage runs mplayer (i think :) )

Thraxius
10-10-2008, 07:41 AM
I personally have looked at that text file for a bit. I can't make head or tails of it. I am not a Java programmer so it is pretty much greek to me. Could someone point me to a example of someone using this plugin spec so I can try to reverse engineer it and learn what I would like from it?

Yes..I am still around programming silently in the background.

Fuzzy
03-30-2010, 04:46 AM
How's this or bringing back an old thread. I'm curious if this has had any upgrades over the years. Namely, if support is there for bluray and hd-dvd. I know normally, if checks for a plugin class with the file extension. However, the docs also mention that it will check for media_player_plugin_class/dvd for video_ts imports. Is there an equivalent for bluray/hd-dvd imports? if so, what is it? my guess would be media_player_plugin_class/bluray, or media_player_plugin_class/bdmv, but I'm not sure if either exists (wouldnt' know where to even look for it).

Either way, how about a minor doc update if this IS the case?

Thanks,
Fuzzy

Fuzzy
04-07-2010, 04:20 PM
How's this or bringing back an old thread. I'm curious if this has had any upgrades over the years. Namely, if support is there for bluray and hd-dvd. I know normally, if checks for a plugin class with the file extension. However, the docs also mention that it will check for media_player_plugin_class/dvd for video_ts imports. Is there an equivalent for bluray/hd-dvd imports? if so, what is it? my guess would be media_player_plugin_class/bluray, or media_player_plugin_class/bdmv, but I'm not sure if either exists (wouldnt' know where to even look for it).

Either way, how about a minor doc update if this IS the case?

Thanks,
Fuzzy

Narflex? Opus? Anyone?? ;-)

Opus4
04-08-2010, 01:17 PM
I'm told that it would look for "media_player_plugin_class/bluray".

- Andy

Fuzzy
04-08-2010, 02:54 PM
Thanks andy...