SageTV Community  

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

Notices

Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-20-2011, 06:48 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Using the VFS for Online Videos (Moved from another Post)

Quote:
Originally Posted by tmiranda View Post
Forgive me in advance for hijacking this thread. Can you expand on this a little more? I want to know if I'm wasting my time working on PodcastRecorder, or if I could do it in a better way using Phoenix. You can email me if it's not something you want to go into here.
Tom, the vfs is a core system of Phoenix. It's what enables us to create views from different sources and enable them to be displayed using a unified browser(s).

In its simplest form, the vfs is made of Interfaces for MediaFiles and MediaFolders. Then we have implementations for SageMediaFile, FileSystem, Favourites, Playlists, Airings, Online Videos, Trailers, etc.

For online videos, the code is there, but we still need to add some optimizations for the caching of results, etc.

I don't know if you could do PodcastRecorder better using phoenix, since in phoenix, I don't actually "record" the download stream (ie, I don't download load it to a permanant area). The one area where Phoenix might help you, is that you could potentially enable something like PodcastRecorder to work with more than just the standard online video feeds, but there might not be much in value in that either.

Eventually, the goal of Phoenix is to expose as many of the online services as we can via the vfs. My attempt at this will be creating a PlayOn vfs implementation that can be used to expose netflix and other online providers. I've started a Trailers implementation as well, but that's largely unfinished.

Once phoenix enters a public beta then I'll provide more details on the VFS and the vfs apis. During the development of phoenix the the various apis, such as dynamic menus, vfs, configuration, etc, have all been "private" only so that we could evolve the apis as needed without impacting other plugins, etc. Once we go public, the apis will be there for anyone to use in Phoenix or any other plugin.
Reply With Quote
  #2  
Old 04-20-2011, 08:30 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
OK. I'll have to wait and see. I do have some questions that I hope you can answer:

For the virtualized online content do you expose, or is there a way to get, the FeedContext URL for the podcast and/or the RSSItems for each episode of the podcast?

How are the podcasts presented to the user? For example, if there is a two pane browser would the left pane show the podcast name ("Cranky Geeks" for example) and the right pane show the episodes?
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #3  
Old 04-20-2011, 08:50 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
OK. I'll have to wait and see. I do have some questions that I hope you can answer:

For the virtualized online content do you expose, or is there a way to get, the FeedContext URL for the podcast and/or the RSSItems for each episode of the podcast?

How are the podcasts presented to the user? For example, if there is a two pane browser would the left pane show the podcast name ("Cranky Geeks" for example) and the right pane show the episodes?
1. Every VFS item has a getMediaObject() method that returns the object being wrapped. This is only exposed for those cases where you care about the underlying the media object. In the event of RSS feeds, the getMediaObject() return the sage.media.rss.RSSItem instance for the given mediafile. Every mediafile has a getParent() and the parent for an RSS item is a RSSFolder which contains the feed url.

2. This is purely a UI/STV thing. Right now Phoenix has a number of 'browsers' that can be used. But until I work out the transparent playback of online content, then not much work has been done on making any tweaks for online content. But as it stands, you'd have a coverflow, wall view, single list, double list, etc... but again they might need to be tweaked once we actually get the playback working.
Reply With Quote
  #4  
Old 04-20-2011, 01:08 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
1. That's a nice implementation. Can I assume that Phoenix will parse the current Online.properties files or is there a different way to get the podcast info into Phoenix?

1a. Is it possible to use Set/GetMediaFileProperty() with the mediaObjects?

1b. Is there a way to store custom properties for the RSSFolder? (I'd be looking to store data indicating if it's a favorite, how many episodes to keep, etc...)

2. Understood.

I'm looking forward to Phoenix. Me thinks there will be a lot of fun stuff to play with
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #5  
Old 04-20-2011, 01:27 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
1. That's a nice implementation. Can I assume that Phoenix will parse the current Online.properties files or is there a different way to get the podcast info into Phoenix?
Currently there is a "source" that parses the online.properties and builds a view of all the online videos (ie, folders for each entry, sub entry, etc).

But, you can also create a single level view using the FeedSource and a rss url.

So, you have 2 options... use the existing online.propeties, or simply add a new view to the vfs using the feed url.

Quote:
1a. Is it possible to use Set/GetMediaFileProperty() with the mediaObjects?
Since Set/Get mediafile metadata only works for sage mediafile objects, then no. But, in phoenix, when you have vfs item, there is a method getMetadata() which returns a phoenix Metadata object that contains all the fields that supported by Set/GetMediaFileProperty. You can use that Metadata object and set whatever values you want, and they'll get persisted... just not to the same place that SetMediaFileMetadata gets persisted.

In other words, which a phoenix vfs item abstract a media file, we also abstract the "metadata" so that each vfs item can have it's own way of setting/getting metadata for it's object, but the apis remain consistent. And if an item doesn't want to implement their own metadata storage, then they can use a phoenix build in one.

Quote:
1b. Is there a way to store custom properties for the RSSFolder? (I'd be looking to store data indicating if it's a favorite, how many episodes to keep, etc...)
Today, I don't have any persistence against a "folder", just the individual items. It's something that I can look into. You can probably fake it out, using the folder's "id" and a UserRecordAPI, which is what I'd be using internally anyways, if i were to allow folders to persist properties.

I think that once the Phoenix UI is released, people will like it... but even they don't there will be lots of new apis for people to play with, you'll need to depend on the phoenix-core, even if you don't use the Phoenix UI. (If you have BMT installed, then you already have Phoenix Core installed as well)
Reply With Quote
  #6  
Old 04-20-2011, 03:18 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Very cool. Any JavaDocs available yet? Maybe I can just extend one of your classes to add .download() for podcasts.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #7  
Old 04-20-2011, 05:03 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
Very cool. Any JavaDocs available yet? Maybe I can just extend one of your classes to add .download() for podcasts.
The javadocs for phoenix is here

Keep in mind this the javadocs for ALL of phoenix... There's a lot of stuff in there... the VFS stuff is in sagex/phoenix/vfs/ and the online videos is specifically in sagex/phoenix/vfs/ov/

You can probably add simple download() method to an online video, if all you wanted to do to save it... Or you can just get the media url and pass it to the sagetv download service, or the phoenix download service. I started to implement a download for youtube, since its fairly complicated... but for simple rss feeds that simply expose the video url, it would be fairly trivial to download (which I suspect you've already done).
Reply With Quote
  #8  
Old 04-20-2011, 06:47 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by stuckless View Post
The javadocs for phoenix is here

Keep in mind this the javadocs for ALL of phoenix... There's a lot of stuff in there... the VFS stuff is in sagex/phoenix/vfs/ and the online videos is specifically in sagex/phoenix/vfs/ov/

You can probably add simple download() method to an online video, if all you wanted to do to save it... Or you can just get the media url and pass it to the sagetv download service, or the phoenix download service. I started to implement a download for youtube, since its fairly complicated... but for simple rss feeds that simply expose the video url, it would be fairly trivial to download (which I suspect you've already done).
Yes, I've gotten pretty good at downloading regular RSS feeds, YouTube, Google and Channels.com. Now if I could only get the UI right .... That's why I asked about how the UI might work because if the phoenix UI has better "hooks" in it than the regular UI I can easily add the download functionality.

I also asked about the URL and RSS Item parsing because I know how difficult it is to actually get the video URLs for YouTube, Google and Channels.com. If you have all of that information available and all I need to do is download the file and import it into the Sage database my life would be a lot simpler.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #9  
Old 04-21-2011, 04:28 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
Yes, I've gotten pretty good at downloading regular RSS feeds, YouTube, Google and Channels.com. Now if I could only get the UI right .... That's why I asked about how the UI might work because if the phoenix UI has better "hooks" in it than the regular UI I can easily add the download functionality.

I also asked about the URL and RSS Item parsing because I know how difficult it is to actually get the video URLs for YouTube, Google and Channels.com. If you have all of that information available and all I need to do is download the file and import it into the Sage database my life would be a lot simpler.
Do you have java code for parsing out the "real" youtube url, etc. I wrote some java code to do this, but I only try to get the real youtube video url, once the the user tries to play the video. Mainly because parsing out the video url for a youtube video has to be done in real time (or near real time) and it's an expensive operation. So, in the event of youtube urls, I store the normal rss url that is provided, and then later I parse out video url when needed.

Given that a vfs item can be tested to see if it's an "ONLINE_VIDEO", then the existing Phoenix UI could be tweaked to add a "download" button for online videos. If we don't do this ourself, then it could be easily done as a plugin. We'd also have to configure a download location for all downloads as well.
Reply With Quote
  #10  
Old 04-21-2011, 06:34 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by stuckless View Post
Do you have java code for parsing out the "real" youtube url, etc. I wrote some java code to do this, but I only try to get the real youtube video url, once the the user tries to play the video. Mainly because parsing out the video url for a youtube video has to be done in real time (or near real time) and it's an expensive operation. So, in the event of youtube urls, I store the normal rss url that is provided, and then later I parse out video url when needed.
I do the same thing for the same reasons. This isn't directly relevant, but I'd like to compare notes to see if what I am doing makes sense to you sensei

I identify a Podcast by a unique OnlineVideoType and OnlineVideoItem (as these values are used in the default STV.) For each podcast I keep track of the URL as well as other information needed for my plugin. I identify Episodes by creating a unique String from the RSSItem using fields like name, description, date, etc. I did it this way because when I first wrote the plugin RSSItems were not Serializable so I could not store them directly on disk or send them from the server to a client using sagex When I need to get to the video I get the video URL using pretty much the same methodology as the default STV does. (And it's messy.)

I while back I asked Narflex to make the RSSItems Serializable and thankfully he did. I should probably go back and rewrite large portions of my code to take advantage of this but I am afraid that if I fix it it will break
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
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
Post your Favorite Online Service Feeds!! (v6) Spanqboy SageTV Customizations 82 06-17-2010 08:15 PM
TV Recordings Moved to Videos bsung SageTV Software 34 02-21-2010 04:22 PM
Sage TV Recordings moved to Imported Videos after upgrade!! DougTea SageTV Software 3 04-02-2005 01:31 PM


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


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