Archive for July 9th, 2009

h1

Online TV Station: Take II

July 9, 2009

So my last post was about an app I was trying to bash together to make some kind of basic (primative, even) online TV station. While essentially just a video player with a playlist so far, with a few useful extras like lower thirds and graphics, it sort of does the job. Sort of. It’s missing some really vital stuff, like the ability to stream the video it’s playing straight out to a server. Even so, I’ve had a couple of requests to write up a rough outline of how I’m accomplishing my tests now and how I have done so in the past… so let’s take a trip back in time, maybe a couple of years… *wobbly lines, fog effect*

Way back when IPTV and independant media was having its boom, I decided I wanted in, I wanted some of that action. The idea of running a radio or TV station has always interested me, from the very moment I conceived that it might be possible, and right now seemed to be as good a time as any as independent media online had never been easier. Throw my interests in tech into the mix along with a selection of awesome shows guys in their basements were pumping out and the lack of decent tech content on TV, I knew I had to try and combine them all. I tried to make an app which simulated a set top box much like a satellite or cable box, but that failed miserably, I just wasn’t good enough at coding then, I really had no idea. I had to find another route, I did a few tests, played with some hardware and some software and I threw together what I saw at the time as being a very good idea. Not great quality by today’s standards, but from what I saw of what other people were doing, I thought it was right up there, the kind of stuff you see people do months or years later and thing “yeah, I did that!”.

Anyway, basically my setup was a graphics card with TV out acting as a second monitor, a hacked up selection of cables and converters switching the graphics card’s S-Video out to a composite signal so I could feed it back into my capture card. This was my video. The audio was simply the audio I was hearing from my speakers captured via Windows’ own mixer. Not spectacular, but it worked. For on screen graphics such as audio show slides I set the wallpaper on that second monitor to images showing the channel and/or show name, along with extra information like track titles for music and suchlike. Not technically spectacular, but it was functional and it did what I needed. I ran a few reasonably popular (considering my test audience) shows, and then it sort of fizzled out.

Fast forward to now, the IPTV Archive has inspired me yet again. No longer does my ageing capture card work, it’s just simply too old to have a functioning driver for Windows Vista or Windows 7 64bit. Shame, but that’s how it goes, it’s an ancient card and I couldn’t expect it to be supported. Anyway, that’s a problem, because it means my old method won’t work. Not only that, but I want the outcome to be a bit more useful, a bit more professional in appearance (even if the methods used are far from it). I want more than a few static slides on my desktop, I want full flowing video with lower thirds, idents, playlists, custom crap out the wazoo. Think Tricaster, but much much much much much much lower budget. Oh, and maybe without the cheesy transitions. So that was my target. Did I manage to hit it? Well, sort of, but it’s a work in progress. I’m still using my desktop, that hasn’t changed, but this time instead of using my TV out I’m using a free app to capture it. I can set the region of my desktop to capture, so that’ll be the output of my video player app. Just dandy. Now though, I can’t capture my audio the same way I used to either. I got around that by having 2 sound cards which I just so happened to have installed already. Audio out of one, into the other, captured from the line-in and also played back to me as it happens. Again, not high tech or perfect by any means, but I’m cheap and I like to work with what I have available. The captured desktop video and the line-in audio is pumped out to Ustream with Flash Media Encoder (both also free).

Am I done? Well, no. While I won’t be able to run this setup for any reasonable length of time due to my machines being turned off at night (or whenever I’m not in front of them, that’s more accurate) and my limited bandwidth, I’d definitely like to improve the arrangement. I doubt that I’ll be able to make a fully fledged streaming server app, though it would be nice, because I’m just not that good at heavy duty coding. I like simple, I like functional in as little time as possible but I don’t mind the lack of extras. Still, I have lots of room for improvement and hopefully that’ll come with time. I could set up a dedicated box but this setup barely works on my main desktop, it’s very resource intensive between the flash encoding and the video capture. Using Flash Media Encoder rather than the regular Ustream streaming stuff definitely improved resource usage but probably not enough. If I can somehow swing it I’d love to be able to turn this into a proper, distributable system which people could use to run their own TV station, if only to allow someone with better machines and pipes than mine to accomplish what I’m struggling to do. I know there are alternative methods, I don’t have to write my own app for instance, but I’d like to because I know a custom app could be a whole lot more appropriate than VLC or WinAmp, they’re just not designed for this kind of stuff. My app is a little buggy right now, I have to admit, it will crash if you play a format it doesn’t like and silly things like that, but I’m using DirectShow at the moment and it seems a little sketchy, I just need to get around to adding error handling and all that fun stuff. Another issue with DirectShow is I can’t find a way to easily draw over it (which I need for on screen graphics) so I have to use some hacky workaround which makes my life harder when it comes to capturing the whole thing. Maybe I’ll switch to some other method, I don’t know yet, we’ll see. Other options might be an embedded Windows Media Player window or a VLC ActiveX control. The whole thing’s still very much an alpha-level proof of concept right now though, as often is the case with my projects, I like to see if I can make it happen then clean up afterwards if I’m still interested.

Anyway, that’s a rough outline, hope it’s answered some questions people had, if not feel free to drop me any further questions in the comments and I’ll see if I can’t give you some kind of useful response. Catch you all next time, thanks for reading.