Forum Discussion

agmark's avatar
agmark
Visitor
14 years ago

Videoplayer example question

Ok, I've started to look over the videoplayer example in the sdk and I'm confused on the xml files. Since I'm not a programmer (just dabbling in html), I'm curious if the XML files are just manually created and hosted on a server somewhere or are they created dynamically by parsing a webpage which contains the links and descriptions of the video files? When you're grabbing video links from a 3rd party (say a tv channels website), the xml would have to be dynamically created wouldn't it? I appreciate any help in bringing me up to speed on how this is done. Just trying to get my head around how it all works.
TIA

8 Replies

  • destruk's avatar
    destruk
    Streaming Star
    Either way will work - I've seen channels that simply load and parse the rss feed itself, and channels that have it hosted on a server, as well as channels which include it in the script or the package, and channels that have it dynamically created. If you can get away with it, having a server dynamically create, mirror content to your CDN, and host the XML somewhere reduces the amount of processing your server needs to do for each request. If you can push off the work to the roku box itself parsing the feed directly from the RSS, then that is optimal - but sometimes that's not desirable as the original feed only carries 10-20 of the 'newest' programs, so you lose a lot.
  • I know the Roku can grab RSS feeds, but I'll be darned if I can find any info on this. Maybe I'm missing the obvious but I think I've searched through all the sdk docs and can't seem to find any examples, etc. Does anyone have any examples of working code they'd like to share? I know I saw references to RSS feeds when I began reading about development on the Roku, but now I can't find anything. I must be overlooking something. I'll keep searching.

    As far as grabbing video from websites that don't have a RSS feed, does anyone have suggestions on specific methods for parsing the html and then creating an xml file that can then be read by the Roku? Just curious what works best.

    Thanks
  • destruk's avatar
    destruk
    Streaming Star
    You could download the Ace Broadcasting channel in the channel store - that uses the RSS feed - to see it work. - Internet TV icon #22
    For an actual RSS souce code sample to play with, I think you can ask one of the moderators to send you the MRSS code to get you started.
  • Thanks. I now have the MRSS template code, but I'm having a bit of trouble sifting through it and making it work. Getting some compile errors when I I change the URL and try to load it. Would anyone have a working example of this so I can compare it and see where I need to make the necessary changes. The documentation in this template isn't quite cutting it for me.
  • It would be helpful if you post a small sample of the MRSS feed you are trying to digest, you can remove any information that you wish to keep private, just leave the tags in place, then we can help you to understand how to parse that particular feed.

    - Joel
  • Thanks Joel. I've been experimenting using rss feeds from blip.tv The rss feed I'm looking at is at http://blip.tv/iball/?skin=rss, but I'm sure any blip tv feed would be very similar. I've tried going through the mrss_template_1.1.2 source files, but haven't had any luck so far in editing the files to point the channel to the blip tv rss feed. I suspect it's a fairly simple edit to make it work but everything I've tried hasn't worked. Remember...I'm new to this so even the simple stuff can trip me up until I understand how it's supposed to work. Once I get a working model then I think I'll have more luck in tweaking and modifying the files to make things work the way I want. Basically, I just need a working example(s) with a bit more descriptive comments on what each function is doing and suggested changes that might be useful.

    It's probably easier if you just pull up the link above and take a look than for me to post the file that the link creates. Any advice or help is appreciated! The Roku is a very nice product and I love the fact that it's an open platform. The trick is figuring out how a newbie can best take advantage of the platform.

    TIA!
  • Thanks so much Joel. I'm a bonehead. I assumed the .opml file was only used for modifying the color schemes, so I ignored the one file I needed to look at. Your help got me back on track. Now I can actually start learning how things work. But don't worry, I'm sure I'll find plenty of things to trip me up.