We have built our own Swallow Cam using a Raspberry Pi so that we can watch the swallows in our shed raise and fledge their young. I should be honest and point out that although I say we, it was my brother who put this together for us, and he has kindly agreed to outline what he used, and did below…

Equipment
Raspberry Pi:
For this project we used an old version 1 Raspberry Pi. Any model will do apart from the early PiZero models which do not have a camera connection.
Raspberry PiNOIR Camera:
This is the ‘night vision’ version of the Raspberry Pi camera. You can use the regular one for better colour images, but as we wanted to also shoot in total darkness we went for the infra red version.
Long Range USB WiFi Adaptor:
This was needed as the shed with the nest was outside normal WiFi range of our internet hub. The best test to do is that if your smartphone has a WiFi connection in the location you are placing the Pi then you you can use a regular USB WiFi connector. If you are using the latest Pi3 or Pi ZeroW they have WiFi built in
Prototype Board, 6 x IR LEDs & 2 x 47ohm resistors:
These are only needed if you are using the PiNOIR camera and want to do night vision filming. Below is a screen shot of the wiring diagram and the power is just supplied from the 5v and Ground pins on the Raspberry Pi.

Method
The first thing to do is to install a new version of Raspian on your Raspberry Pi and get the camera set up. If you are new to the Raspberry Pi then all the information can be found on their website at:
and
Getting Started with a Picamera
Once you have your Raspberry Pi and Camera set up then you will want to make sure you have PuTTY and VNC activated on your Pi so you can access it remotely using your PC without a monitor, keyboard and mouse connected to the Pi. There are plenty of tutorials on this available and so I will not repeat them all here.

Installation
We installed our camera overlooking a nest that our visiting swallows return to every year. The piece of insulation that you can see in the photo below is something that we put in place a couple of years ago to protect the lawnmower that sits underneath the nest. Since our swallows have never seemed bothered by this adaptation to their nesting site we were hopeful that the presence of Swallow Cam wouldn’t disturb them.

Streaming your live feed to Youtube
Now you need to install the software on the Pi to stream to YouTube. Type in these commands in order through a command line on the Pi:
cd /usr/src
git clone git://git.videolan.org/x264
cd x264
sudo ./configure –host=arm-unknown-linux-gnueabi –enable-static –disable-opencl
sudo make
sudo make install
This will install X264 on the Raspberry Pi. These steps will only take a minute or so. Once this has finished you will need to install FFMPEG with the following commands (the ‘sudo make’ stage will take hours so you may as well get on with other stuff, but don’t forget to do the ‘sudo make install’ when it has finally finished):
cd /usr/src
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
sudo ./configure –arch=armel –target-os=linux –enable-gpl –enable-libx264 –enable-nonfree
sudo make
sudo make install
You now need to set up your YouTube account for streaming. Click on the upload button in your Youtube account and follow the instructions to set up a live feed. When you apply for live streaming YouTube will verify your account and then issue you with the key that you need to add to the code below
Once this is set up then enter the following command on the Raspberry Pi:
raspivid -o – -t 0 -vf -hf -w 720 -h 480 -fps 12 -b 480000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i – -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<Stream name/key from YouTube>


10 comments
I wonder if she ever gets the feeling that someone is watching her. LOL
Thank You so much for putting this up! I am obsessed with all birds! I’m actually decorating my office using a bird “theme” but I am ‘challenged’ shall we say when it comes to decorating anything! So if you have any suggestions, I’m all ears! Thank You again for posting this video! It’s amazing!
Thank you for your kind comment Laura and I’ll get my thinking cap on re. your bird theme (which sounds fab!)
I love this! I’ve been itching to try a raspberry pi project as I love fun techie things – I do think it would be all consuming if I got one though!
I have to admit I have spent a ridiculous amount of time watching it already Lol, and they haven’t even laid any eggs yet. It’ll be 24/7 if we get babies :)
Sarah, I love coming here and learning new things. This is absolutely cool! We have swallows that make nests in the trumpet vine above our porch. We don’t mind if they do it off to the side, but last year they made one right above the walk into the house. This year we are discouraging them from doing that. You should have heard the ruckus every time we entered or left! Can’t wait to see more video on this, so awesome! I can see why the kids are enthralled.
I can imagine the noise Nikki, ours dive bomb anything they don’t like the look of (namely the cat and dog) but they are such graceful birds. Here’s hoping they do go ahead and use the swallow cam nest :)
Oh Wow, this is so cool! I would love to have one of these, but this is way to techy for me. I have thought about buying a out side cam to see the wild life that comes in our yard after we’ve gone to bed though. That would be so cool!
You get such cool wildlife over in the States Linda, I bet you’d see some amazing creatures if you did get one. My brother is working on a camera trap for me now so hopefully we’ll get that set up soon :)
Loved the video, love the instructions, love everything about it Sarah. Our swallows just left about 2 weeks ago to fly to your side of the world. Give them my love if you see them please.
Wouldn’t it be amazing if they were the same swallows Michelle! It’s been such fun setting up the camera and will be amazing if they do go ahead and raise young in that nest. We’re keeping everything crossed :)