NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) UbuStream, Web Radio and Universe v
« Previous 1 … 4 5 6 7 8
MVP access to audio/video streams - a better solution?

 
  • 0 Vote(s) - 0 Average
MVP access to audio/video streams - a better solution?
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#1
2006-11-15, 10:11 AM (This post was last modified: 2006-11-15, 10:57 AM by ubu.)
This is primarily a continuation of a discussion I've been having with HTPCGB, but anyone is welcome to jump in.
HTPCGB Wrote:As for supporting the mediaMVP, what is limiting us? Is it a programming challenge or the GBPVR API? Or both?
UbuStream's existing "channel mode" provides mediaMVP users with the ability to watch (and listen to) streaming content. However, it requires a relatively complex and labor-intensive set-up and configuration procedure, doesn't lend itself well to frequently changing sets of streaming URLs and mandates that the streams be presented as GB-PVR channels within a capture source rather than just as streams to be selected from a list.

To address these problems, a different approach is probably required. Ideally, a common service for recording/transcoding streams and presenting them to the MVP would be available to UbuStream or any other plugin that needed this capability. A generic class library (dll) might be one option.

Currently, UbuStream leverages off (and extends) the External Recorder plugin in order to present its stations as GB-PVR channels (channel mode). External Recorder provides the ability to create an "ersatz" capture source within the GB-PVR config program. This capture source is configured by specifying a media player (typically VLC) and the parameters required by the player to both play and record a single stream (the URL being part of the parameter string). The capture source is then assigned a channel number and, to all intents and purposes, appears to GB-PVR as if it was a "standard" capture source (a TV capture card, for instance).

When the channel is selected in Live TV mode, the video stream is rendered in GB-PVR's video display area. When the channel is selected in Timeshift mode, the player is invoked using the recording parameters you specified and starts recording the stream to an MPEG2 file. GB-PVR now starts playing back the MPEG2 file (and this is why MVP users can see the output) while it is being recorded, allowing the user to pause, rewind, fast forward, etc. However, if you want more than one streaming channel to be available, you have to set up a separate External Recorder capture source for each one.

UbuStream builds on this architecture by providing a simple command processor application (UbuStreamCmd.exe) that can look up an URL in the UbuStream database and build the parameters to the media player "on the fly". When configuring the External Recorder capture source, the name of the media player app is replaced with the UbuStreamCmd.exe app and, instead of hard coding the URL within the parameter string, the symbol {channel} is used. Now, the capture source may be configured to contain multiple channels (just like a regular capture source) each with a channel name and number.

At run time, when the channel is selected, GB-PVR passes the channel number to the capture source, in this case External Recorder, who, in turn, passes it to UbuStreamCmd. UbuStreamCmd uses the channel number to look up the channel name in the GB-PVR database and then tries to find a station with the same name in the UbuStream station database. If it finds one, it uses the data associated with the station to build a command line consisting of the correct player app for the station's stream followed by a parameter string with the {channel} symbol replaced by the station's URL (and, if applicable, the correct argument for forcing full screen playback appended to it) and then executes the command.

To make the UbuStream stations even more like regular channels and easier to use, the UbuStream config program lets you mark stations for inclusion in the capture source and provides a utility to generate an XMLTV format EPG file with "dummy" program entries for each station selected. (The program length and number of days generated is configurable). When this XMLTV file is defined as its EPG source, the capture source's Generate EPG button will automatically populate its channel list and create EPG entries in the GB-PVR database. Now, the stations will show up in the TV Guide so they may be selected for viewing and recording.

For examples of the External Recorder configuration parameters, check out this short document I put together for UbuStream "channel mode" users.

So, this does the job and provides a reasonable level of functionality for MVP users (and others who prefer a seamless integration of streaming stations with their other TV channels). So what's wrong with it? Well, after reading the above description you're probably thinking "Phew! That's a heck of a lot of work just to watch a lousy streaming video on my MVP. Why can't I just select it from a list and have it play, like most UbuStream users?". Well exactly. It's a bit klunky.

Also it's really designed for use with a fairly static set of streams whose URLs are not likely to change. With the new release of UbuStream (and other plugins like the CNN plugin) there's the ability to watch a dynamic, frequently changing set of video streams. For the MVP users, the prospect of reconfiguring the External Recorder capture source to include a different set of "stations" as channels every day probably sounds like a nightmare. A simpler solution might be to set up the channels in the capture source with generic names ("Stream1", "Stream2", "Stream3" for instance) and then go into the UbuStream config app every day and change the names of the stations you want to view to those names. But still..... There must be a better way.

When I put together this rather Byzantine solution to treating media streams as GB-PVR channels, some 9 months ago, I was completely overwhelmed by the difficulty of the task and totally in awe of the External Recorder plugin for having solved what I viewed as the most difficult parts of the puzzle. But now, having got my hands a bit dirty with this GB-PVR plugin stuff, I'm wondering if a "better mousetrap" could be built.
  • I would like the user to be able to select a station from a list (or some other simple UI control) and have it play. Period.

  • Configuration should consist of adding stations to the database (either automatically or via the config app). Period.

  • An MVP user should just have to check an "mediaMVP support required" checkbox once in the config app and then forget about it. Maybe not even that.

  • Explicit requests to record streams to file (both scheduled and manual recordings - either via the GB-PVR progam recording screens or by some other means) should be supported.
To achieve this, we could probably borrow some of the techniques used by External Recorder (the source code is available on the wiki) but assemble them in a different way. Ideally, we would break away from the whole channel/capture source paradigm that forces us to pretend to be a TV card. Instead, we need some service that, when invoked, would execute a player which would start recording the stream to an MPEG2, and then automatially hook into GB-PVR's ability to render the video from the file (if it knows where to look for it).

Such a service would be generic enough to provide a foundation for a variety of stream-related plugins to be built. (Hopefully, UbuStream will still be the "gold standard" for this plugin genre, but that's another story.... Big Grin ). And MVP support would be guaranteed: built right into the infrastructure.

Standardizing on VLC as a "required" component would be a simplifying assumption, I think, since it is proven to be able to do the neccessary transcoding and recording and also permits playing files while they are still being recorded. (Another VLC capability that may or may not be relevant is its ability to act as a stream server, so a stream in some format (say mp4) might be re-streamed as pure MPEG2 - not sure if MVPs could receive such a stream). The downside of course would be that RealPlayer streams (and anything else VLC can't handle) would not be playable in this scenario.

When I get time, I'll have another read of the ExternalRecorder source and see if further opportunities present themselves or additional revelations become manifest. It took a lot of effort for me to understand it 9 months ago. Hopefully, it'll be a bit clearer to me now.

Additional resources:
  • External Recorder wiki page.
  • UbuStream wiki page (the sections regarding "channel mode" are most relevant to this discussion).
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
jbyram2
Offline

Member

Posts: 109
Threads: 13
Joined: Dec 2005
#2
2006-11-20, 11:48 PM
Rather than replying right away, I was letting this post sink in a bit.

I'm willing to try out anything you might have, and give you feedback.
Being able to view YouTube would have a large TAF (Teenager Acceptance Factor), which carries almost as much weight as the WAF in my house, since they outnumber my wife by two : one.

Some thoughts:

Since CNN and YouTubes are (usually) short, perhaps building a playlist would work. I am fairly sure VLC will accept a playlist file name on the command line. Running in channel mode on the "CNN channel" would then then run through the "CNN" playlist, if a video doesn't suit your taste, skip to the next one. Some VLC command line hijinks would be required to work smoothly, without dropping the connection. I could try to work that out.

Besides Command line, VLC has telnet, Http and API interfaces. May be easier to go that route, but I can't help with programming for those.
[SIZE="1"]AMD Duron 1600 / 640MB / 80GB+200GB
Hauppauge PVR-150MCE & 3 X MediaMVP (D3A)
Girder & USB-UIRT -> Samsung SIR-T150 Digital Receiver
Girder & USB-UIRT -> ChannelMaster 9521 antenna rotator
UbuStream + CommunitySkin
100% OTA *no cable, no satellite*[/SIZE]
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#3
2006-11-21, 03:01 AM
jbyram2 Wrote:I'm willing to try out anything you might have, and give you feedback.
Being able to view YouTube would have a large TAF (Teenager Acceptance Factor), which carries almost as much weight as the WAF in my house, since they outnumber my wife by two : one.
I hear you. Wink

Quote:Since CNN and YouTubes are (usually) short, perhaps building a playlist would work. I am fairly sure VLC will accept a playlist file name on the command line. Running in channel mode on the "CNN channel" would then then run through the "CNN" playlist, if a video doesn't suit your taste, skip to the next one. Some VLC command line hijinks would be required to work smoothly, without dropping the connection. I could try to work that out.
Interesting idea. VLC does indeed allow a playlist as a command line parm. Building the playlist might be a challenge. YouTube and Yahoo both have the concept of a "favourites" list, so maybe we could "scrape" those somehow. Google, however, has no such concept. Also, since the MVP user would be watching an MPEG2 file being recorded by VLC (not the original stream) I'm not sure how they would communicate "skip to the next one" back to VLC (not possible with the current External Recorder architecture, I'm pretty sure).

I think the "ultimate" solution (to really improve the TAF, and for users suffering from ADD Smile ) would be to provide a browse/search capability from within GB-PVR so users could build a playlist on the fly. And then implement a new transcoding/recording service (as per my original post) to give MVP users more flexibility and control.

Quote:Besides Command line, VLC has telnet, Http and API interfaces. May be easier to go that route, but I can't help with programming for those.
Yes, VLC is a real "swiss army knife". I think those are possible "opportunity areas". I need to get my head around the External Recorder interface to GB-PVR first so I can see what approach would make the most sense.
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  universe and live streams from PlayOn johnsonx42 2 6,407 2012-08-11, 03:51 AM
Last Post: johnsonx42
  sirius streams using ubu streams question ryanmc 3 3,039 2008-05-01, 10:56 AM
Last Post: ryanmc
  VLC runs but no audio/video for Web Streams and Web Radio Wakalaka 0 1,816 2007-11-22, 06:30 AM
Last Post: Wakalaka
  New DynSource App - ABC Australia Video On Demand ralphy 4 3,013 2007-02-20, 12:20 PM
Last Post: ralphy
  Bad AFTV Video using VLC fhmanas 2 2,697 2007-02-01, 10:09 PM
Last Post: ubu
  UbuStream Dynamic Source "mini-plugin" architecture for on-demand streams ubu 51 21,733 2006-12-03, 09:18 AM
Last Post: ubu

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode