About the Video Feed

This page contains a live video feed from a camera that points at a bird feeder in my garden in Foyers, Inverness-shire, Scotland.

As well as common garden birds, Red squirrels also eat from the feeder. They love those peanuts!

The camera has also caught mice that have climbed the tree to get to the free food, and even a Pine marten.

The squirrels come and go during daylight hours, although they seem to favour the morning, particularly the first few hours after sunrise. They are shy creatures when they first start visiting and will run up the nearest tall tree and hide if I am moving around outside. As time passes most will tolerate my presence just so long as I am not too noisy or get too close. Some become very bold, allowing me to approach within a few metres while they are eating.

Brief technical overview

For anyone interested in the technical details, the video source is a simple ipcam that streams video in the RTSP format. A local linux server uses ffmpeg to receive the RTSP stream and convert it to an RTMP stream for web compatibility. It then uses ffmpeg to forward the RTMP stream to a virtual private server (VPS). The VPS receives the RTMP stream and uses Nginx to convert it to HLS files, which are then served to website visitors by means of a HLS plugin embedded on a WordPress page. After a little tweaking, it works faultlessly and with fairly meagre resources used.

Rather than attempt to stream video when it is too dark for the camera to produce a decent image, a bash script amends the ffmpeg command to replace the live feed with a static image when the sun sets. It does the reverse when the sun rises. This is not a perfect solution, as official ‘dawn’ and ‘dusk’ times are not always a reliable indicator of suitable light conditions in the garden. For example, it can still be very light long after the official sunset time here in the summer. Oppositely, it can still be quite dark after ‘sunrise’ in the late autumn and winter months. Because of this, the camera feed sometimes misses the first few hours of daylight or goes live when it is still too dark to see anything properly.

Another problem is dealing with the colour balance and over exposure when the sun is low in the sky. On a fair winter day there can be a bright blue sky in the background of the image, yet the peanut feeder will still be in shade of nearby trees. This is hard to dial-out in the camera settings, with the result that the birds and the feeder appear dull against the light backdrop. The solution is probably to move the feeder to a better position or place the camera higher, so that it looks down to the ground and not the sky.