Build Your Own Raspberry Pi Camera

During the past few years, my BirdCam setup has evolved significantly. As I mention in the UpFront section of this issue, I hope to get the stream transferred to a YouTube Live stream at some point, so I can watch the feathery show on my television. And although watching the birds is the end goal, I'm constantly on a mission to improve the quality and flexibility of my setup.

Right now, the "best" quality video comes from Logitech 720p cameras that connect to my motion server via USB. (You can check out the setup in previous articles—just search for "birdcam" on, and you'll find lots of information.) I've purchased several IP cameras, but each one has its limitations and frustrations. For one, the quality of an IP video camera is just not as sharp as a photo from a local device—at least not without spending literally thousands of dollars for a high-quality IP camera from Axis. I figured there must be an easier way, and with the dawning of the Raspberry Pi 3 era, I think I found it.

Why Pi?

The RPi3 has built-in Wi-Fi. That means I can access it without worrying about Ethernet cabling. And, that means I can potentially put it outside without trying to weatherproof a network cable or figure out how to poke a hole in my house to get the Ethernet inside!

The RPi3 has an incredible camera module. Literally the day after I purchased my 5 megapixel camera module, RPi released an 8 megapixel camera, which means if you buy now, you'll get even better results.

The RPi3 is small. That's important, because I plan to put everything inside a weatherproof project case and mount it outside next to a bird feeder that isn't right outside my window (they all are now by necessity).

The RPi3 is fairly inexpensive, especially when compared to an IP camera with similar image quality. The RPi3 itself is about $35, the camera is $25, and I have a pile of MicroSD cards and MicroUSB chargers lying around. Even with the cost of the project box (around $15), it's all less than $80.

The Goal

Since the Raspberry Pi device I'll be setting up is a full-blown Linux computer, the configuration options are endless. It's possible to install Motion on the little beastie and handle motion detection fully on the RPi. I already have Motion installed on my Birdcam server though, so what I want is for the Raspberry Pi simply to serve out a stream that my existing server can use to capture movement like it does with the USB cams locally connected.

My first attempt at creating the perfect RPi IP camera (RPIPCam?) included compiling mjpg_streamer and creating an MJPEG streaming camera that could be added to the Motion setup on my BirdCam server. I realized after the fact that Motion would be just as happy with a simple Web server on the RPi serving up a still image, then constantly re-downloading that image. It means my Raspbian Linux image doesn't have to have any custom software installed at all, which is ideal.

The Process

The first step is to install Raspbian. This is done easily by getting the NOOBS zip file from here and unzipping it onto your freshly formatted MicroSD card. Don't let the insulting name fool you; NOOBS is incredible. It allows you to install a variety of distributions, and it does all the heavy lifting. I can't recommend it enough.


Shawn is Associate Editor here at Linux Journal, and has been around Linux since the beginning. He has a passion for open source, and he loves to teach. He also drinks too much coffee, which often shows in his writing.