Monday, 25 June 2007

TV Guide upgrade

Prompted by my purchase of the Pinnacle Dual tuner, over the last week or so I've been rewriting my TV guide application to work with an arbitrary number of tuners. I've added a plugin type architecture, which allows me to add tuner "adaptors" as and when required. For example, I now have a Nebula DigiTV adaptor, a Pinnacle adaptor and a testing adaptor. Which ones are in use is controlled by a configuration file, and the TV guide just expands its processing to accommodate as many as are available.

One of the things this would allow me to do would be to create an adaptor for Windows Mediacenter for example. That way, any one who had MCE working would then be able to use my TV guide to control it. Of course, with my purchase of DVB Web scheduler (detailed in my last post) I'm not currently needing that facility, but it's good that I can now add it painlessly to the guide should I need to.

Another feature I've added is that the order of the tuners is respected. I.e. although the main aim now is to use the two Pinnacle tuners for recording and the DigiTV tuner for watching, all three are available for recording if necessary. The TV guide will however only use the DigiTV tuner if both the other tuners are already recording something else. Given that both types of tuner can record multiple programmes from a single multiplex, this actually means that I need to be recording three separate multiplexes for all three tuners to be required. Generally, that just doesn't happen, but it's nice that it will handle it if necessary.

Transport Streams

One thing I've had to deal with since I moved the majority of recording to the Pinnacle is that it records as a .TS transport stream file. Back in the days, DigiTV used to do the same but fortunately it was changed to do TS-to-DVD MPG on the fly. With the Pinnacle I'm back with a transport stream.

TS files don't matter too much as both Media Player Classic (my preferred player) and VLC both play them back natively. I do however have an automatic conversion application which converts the native video to XVid as soon as the recording has finished. This, prior to this weekend, did not work with TS files.

When I originally had a problem with DigiTV, I used a program called ProjectX to convert the TS stream to an MPG. This worked very well and still seems to stand above the rest in the marketplace. It works from the command line too, which makes it easily integratable into my automatic conversion system.

I've now made some changes to the automatic conversion to detect a TS stream and insert a conversion step before the XVid work is done. This seems to be working fine, and gets me back to where I wanted - automatic conversion to XVid with no interaction. That's more like it!

No comments: