It has taken considerably longer than first estimated for Raspberry Pi computers to finally be delivered to customers. Logistics, manufacturing errors and other factors delayed the highly anticipated device time and again, but I’m happy to report that mine arrived a couple of weeks ago. This was around the same time things started to get really busy at work, so I’ve only played with it a little so far. Nevertheless, I wanted to post a progress update.
Command line vs. GUI
The recommended Debian image for the Pi comes with a Graphical User Interface. I’ve played with it a bit, but to be honest, I didn’t like it much. The Pi is just too slow to run a GUI at usable speeds (unless someone manages to use the GPU’s power more). The real fun is in getting the Pi to focus on one task. If you’re looking to get decent performance out of the 700 MHz CPU, I’d recommend sticking to the command line.
Ever since my office got burglarized last year, I’ve been looking into low-end camera security systems. So I decided to find out whether the Pi could serve as a webcam server with motion detection, project “Raspberry Spi”. While the main purpose of these little machines is to get people programming, for me it’s more about learning Linux, and discovering new software. This seemed like a really nice thing to try and set up.
I hooked up my UVC-compatible webcam to the Pi and found that the default Debian Linux setup lacked support for UVC. By now, there’s a firmware updater by Hexxeh that lets you update to a newer version with proper UVC support, but I decided to try Arch instead. And not only does Arch support UVC, it turned out to be a Linux distribution I really like. I’ve been using Ubuntu/Debian almost exclusively for years now, and getting to know Arch was refreshing.
Ffmpeg and Motion
When you start browsing the web for linux webcam software, these two names keep coming up. Ffmpeg, should you somehow be unfamiliar with it, is a command line video and audio converter that does absolutely everything. It converts AVI files to OGV, and it captures webcam video and offers it as a stream. It’s a jack of all trades, and although hard to operate (lost of command line options), it’s the place to start.
Motion uses Ffmpeg, but wraps it in a more user friendly interface (still command line, but with a well-commented configuration file) and adds motion detection. You can set it up in minutes, and I got far better streaming video with it than I got with just Ffmpeg. The downside to this was that it completely fits the needs of my “Raspberry Spi” project. I now have several configs that let the Pi stream live video, capture stills upon movement, or even short videos of said movements. All without really having to get creative.
I’m currently looking into another program, uvccapture, that’s aimed at taking single images from a webcam, and I’m hoping to make it take pictures on demand, through a small website, hosted on the Raspberry Pi itself (Apache runs quite well!). Future projects may well include setting up the Pi as a music jukebox, an OpenELEC or Raspbmc media center, or just to play Quake III :).