I’ve cobbled together a way to turn an Internet data feed into a video crawl that can run on my local public access cable TV channel. Before explaining how, I need to explain why. Here’s the short answer: As much as I want everyone to use the Internet for all it’s worth, most people don’t yet.
A couple of years ago, I was campaigning in my community to open up the parent portal into PowerSchool, a student information system that was being used internally by teachers and administrators but wasn’t available to parents via the Internet. At one point I made a screencast that addressed the perceived risks, and showed the compelling benefits, of opening up the portal. The screencast was published on the Internet, available to the whole world, and the whole world includes Keene NH, so that ought to be a good way to bring my message to the community, right?
Wrong. Nobody watched it.
A while later, it hit me. There still aren’t many folks here who are inclined to receive a message like that from InfoWorld.com, or from YouTube, or from any other Internet destination I might use. But there are significant numbers who tune into the local public access station. Why not show the screencast there?
So I dubbed it onto a MiniDV tape, took it down to the station, and gave it to the executive producer.
Him: What’s this?
Me: A demo and discussion of the PowerSchool software. Will you run it?
And lo, a couple of weeks later, I heard from the assistant superintendant of schools. He thanked me for applying the external pressure that they’d been needing in order to break through an internal logjam, and he invited me into the beta program. Now, two years later, it’s fully deployed and making a big difference.
Meanwhile, I’ve been working on a community information project that’s all about feeds and syndication. But slow learner that I am, I continue to invite people to use Internet feeds and Internet syndication. And people continue to mostly decline the invitation.
For example, I’ve been working on calendar syndication. The syndication flows two ways. First, inward. The service pulls events from various local websites, and I’m working with the proprietors of those sites to clarify why and and to publish true calendar feeds.
But this is all still just Internet stuff. And as we’ve seen, the community doesn’t (yet) tune into the Internet for local information. It does tune into public access cable TV.
So why can’t Internet data feeds show up there?
Well, of course, they can. Here’s a prototype video crawl (the link goes to an animated gif, just for convenience) made from yesterday’s combined calendar. We’ll need to work out the details of format and workflow, but I think it’ll work. And it seems like a great way to connect two worlds.
Calendars are just part of the story. Consider, for example, the public library’s RSS feeds announcing new books and DVDs. I’m one of probably a handful of subscribers to those feeds. Now imagine that the feeds showed up as a video crawl on TV. I bet a lot more folks would find out about new books and DVDs. And maybe, just maybe, the reception of that feed via TV would lead to discovery and use of the more convenient and powerful Internet feed.
We’ll see. Meanwhile, below the fold, I describe the method I’ve come up with to do this. The paint isn’t dry, and I’ll be very interested in comments and suggestions.
… the fold …
Our public access TV station, as may be typical (though I dunno), is a mostly Windows-based operation. As is surely typical, there’s little money to spend, either on people to produce these feeds interactively or on software to produce them automatically. So the requirements seem to be:
- Cheap or free
- Fully automatable
My first idea was to leverage SMIL. I knew it would be easy and free to transform a feed into markup that can be played by Real, or QuickTime, or Windows Media. And I hoped it would also be easy and free to render that markup into a video format. But there I ran aground. If there’s a free, or at least cheap, SMIL renderer that can be scheduled to run automatically, I’d like to know about it, because that’d probably be the ideal solution. But I haven’t found one.
The next idea was to produce the animation frame by frame. And that’s what I’m actually doing for now. It sounded a lot harder than it turned out to be. After installing the Python Imaging Library, it was possible to write this very concise frame generator:
import Image, ImageFont, ImageDraw s = """ EVENTS FOR WEDS JUNE 30 FROM ELMCITY.INFO (HTTP://ELMCITY.INFO/EVENTS) 06:00 AM lap swim (ymca) 07:00 AM Cheshire Walkers: Indoor Walking Program (eventful: Keene Recreation Center) ... Trainers Academy - Level II (eventful: Monadnock Humane Society) TOR 7pm (swamp bats) """ lines = s.split('\n') def frame(index,top): image = Image.new('RGB',(720,480),(0,0,0)) draw = ImageDraw.Draw(image) font = ImageFont.truetype("arial.ttf", 18) for line in lines: draw.text((10, top), line, (255,255,255), font=font) top += 25 image.save('cal%0.3d.gif' % index) top = 450 for index in range(len(lines)*8): print index,top frame(index,top) top -= 4
This yields a sequence like cal000.gif…calnnn.gif.
I wasn’t sure how to make a video directly from that sequence, but I knew that ImageMagick could turn it into an animated GIF, like so:
convert -adjoin cal???.gif animation.gif
So I did that, and went looking for ways to convert that into a video format. ffmpeg will do it, but the results weren’t pretty, and ffmpeg can be a dicey thing to ask people to install. QuickTime, I found, did a better job. You’d need QuickTime Pro for Windows, which isn’t free, but $30 won’t break the bank.
So that’s where things stand. I’m pretty sure there’s a better way to meet the requirements, and I’ll be delighted to discover it. But maybe there isn’t, in which case it looks like this will work.
Either way, it’s the end result that will — or maybe won’t — matter. We’ll do the experiment, and we’ll find out.