A year or two ago I posted about how you could send audio over the internet with Raspberry Pis using the OpenOB project. Since then the OpenOB project has taken off, with lots of contributions from the community and lots of improvement as a result.
What hasn’t aged well is the Pi. A firmware update to fix some keyboard compatibility issues caused some serious issues with audio over IP, as both the Ethernet controller and USB sound card shared a USB bus which couldn’t operate quickly enough to handle the precise timing demands. Fortunately, the Wolfson Audio Board has come along to save the day – and it’s certainly promising.
Sadly, the kernel support for the Wolfson device isn’t in the mainline kernel yet, so that means using their custom OS image, or building our own kernel. On top of that we’d quite like a preemptible kernel to allow us to get lower latencies in userspace. This is crucial for reliable jitter-free low-latency audio, but because it’s quite niche this also means we need to apply some non-mainline patches to the Raspberry Pi kernel. The Wolfson drivers will eventually make it to the Pi kernel by default, and hopefully someone familiar with packaging for Debian/Raspbian can contribute a package to provide a real-time patched version of the kernel; but in the meantime we need to get our hands dirty. Here’s how to get a stock Raspbian image turned into a low-latency audio capable flavour, broken down and explained a bit. Continue reading Real Time kernels and audio on the Raspberry Pi
OpenOB‘s been ticking along nicely but it’s historically needed a bit of oomph and capital in the form of two computers running Linux. This isn’t often what you’ve got on your PC and it’s not something you can easily chuck in your reporter’s rucksack to take along to an event.
This limits its usefulness somewhat. So what you need instead is something cheap, small, and lightweight, that can run Linux and do everything you need it to with regards to OpenOB and network management.
Enter the Raspberry Pi, the £25 wonder-SBC. It’s got audio out (not in), runs Linux off an SD card, is small, runs off 5V power supplied via USB, and did I mention it’s £25? Okay, £30 if you buy from Farnell with shipping thrown in, and probably more like £60 when you’ve bought a power supply, sound card, SD card, etc. But we’re still talking an outside broadcast remote and receiver for a grand total of around £200. Compare that with the £1,500 per end of the current cheapest commercial solution, or the £5,000+ an end and up boxes found in most professional OB trucks. Sure, you don’t get their slickness or polish or even all their features, but you can move audio and you can do it well with OpenOB. With Opus, now from 16kbps all the way to 384kbps or linear PCM.
The primary OS supported for the Pi is Raspbian, a Debian derivative, which is awesome – because Debian/Ubuntu is the standard platform on which I develop OpenOB.
So can we actually make this perfect storm come to pass?
Update, 3rd Apr 2014: This post has been superseded by the OpenOB documentation. Please don’t try and use this post to configure your Pi – it is wrong in places as a result of updates and is not being maintained.
Continue reading Broadcast-quality OBs with Raspberry Pis
This is something that has come up time and time again now, and with Amazing Radio going online-only with nothing but a single Shoutcast server streaming one format at one bitrate, now seemed like a good time to write about online streaming of radio stations.
Let’s start by briefly looking at real broadcast operations – on FM and AM we try and maximise coverage (within our license), maximise compatibility, and of course we want to add as much value as we can with metadata like RDS (and now things like RadioDNS). We’re trying to reach as many people as possible, with as little fuss as possible, and trying to give people the best possible service.
This is not what many broadcasters do with their online offerings, which is a real shame, considering the potential that many stations have. So what constitutes a best-effort service? What makes life easier for listeners, and how can you make your station’s output as widely available as possible? I’m just going to skim over the technology here and break things down. I’m also going to discuss briefly what we’ve done with the streams at Insanity Radio 103.2 FM, and how we’ve worked them into apps and our new Radioplayer implementation. Continue reading Streaming Radio – Doing it right