Online Police Scanner

Screen shot 2014-11-21 at 8.19.22 PM In my spare time, I’m a geek about information and government transparency. I foolishly believe that technology can and will make government agencies more transparent, subject agencies to criticism and make government better.

To further that agenda, I created this online police scanner for my hometown of Montpelier, Vermont.

The technology to make this work is pretty out-of-the-box.

The hardware is just a Uniden BC72XLT handheld scanner and a Asus mini laptop. I’m not even using a mixer, I’m just running my audio out from my scanner straight into the laptop’s audio in.

So on the software side, I’m using Sox to capture the audio and save it as an Ogg Vorbis file.

Because the audio coming in is so crappy, I am running a lowpass filter on it when I’m capturing it.

I think the quality of the audio is pretty good considering the source.

I’m recording the audio in 10-minute segments. Once a segment is done, it gets uploaded to the server and available to listen to.

In terms of how much code I’ve written to make all of this work, it’s less than 100 lines. There is a bit more sophistication that can and will be added, but the amount of custom code will likely never exceed 1,000 lines.

And the reason I built this system isn’t because I care that much about listening to the Montpelier police scanner any where in the world, it’s because I think this technology could be really useful for low-budget broadcasting of audio and video.

One really annoying thing I discovered building this system is that Apple’s Safari browser doesn’t support the Ogg Vorbis format. So in order to make this work with Safari, I would need to either not use the open Ogg format, but rather some sort of proprietary format like MP3, or I would need to create two versions of the audio. It’s just hilarious how much of a hissy fit Steve Jobs threw about Flash, yet his own browser doesn’t support the open data formats.

Unfortunately, disk space is an issue for me, so I chose to only distribute the audio as Ogg. That means Safari and Internet Explorer users are out of the luck. But frankly, both of those browser’s are second-class citizens on the web now anyways. Just download Chrome, and if you hate Google, get Firefox.

Share Button