About the live 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.

Sometimes I manage to capture video of the pine marten and squirrels on my phone when we encounter each other face-to-face in the garden. Follow the link below to my Youtube channel to see them.

Brief technical overview

For anyone interested in the technical details, the video source is a simple IP cam that streams live video from the bird feeder location in RTSP format. FFmpeg, running on a local Linux server, receives the RTSP stream and converts it to RTMP format for web compatibility. It then passes the RTMP stream to the virtual private server (VPS) that hosts this website. The VPS converts the RTMP stream to an HLS media file using Nginx, after which the video is served to website visitors by means of plugin embedded on a WordPress page.

The above method works reliably and uses few system resources, enabling me to make use one of the lowest hardware tiers offered by my VPS provider.

Rather than attempt to stream live video when it is too dark for the camera to produce a decent image, a shell 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, swapping the static image for the live feed.

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 trying to direct the camera so that there is less sky visible in the background of the image. My consumer-grade IP cam struggles in such situations, particularly when the sky itself is clear and bright while the peanut feeder – and the birds using it – are not directly lit by the sun. This produces a video feed that is washed-out and underexposed.

A solution is to place the camera higher so that it looks down on the feeder, rather than up at the sky, but there are a few (not insurmountable) problems in doing that:

  1. I will need to obtain a tall, study, pole and then dig a fairly deep hole to ensure that it does not fall over in this exposed and windy location. This is not something I want to do.
  2. There is not much space to accommodate a tall pole beside the current location of the feeder, so I would have to move the feeder to a place where a pole could be installed beside it.
  3. I do not wish to move the feeder because trees and shrubs beside the current position provide the birds with good cover from predation by the local sparrowhawk (Accipiter nisus). If this cover was lost, I fear that the birds would be easy prey while being preoccupied with feeding.
  4. It is often wet here and the camera image suffers greatly when there is water on the lens. I have addressed this so far by fixing a shroud to the camera mount that provides enough shelter to keep the camera dry in all but the worst weather. This protection cannot be easily moved to a metal pole, so I need to identify some other way of keeping the rain off the camera if it is going to be mounted that way.

All the above problems are hardly impossible to fix, so maybe one long holiday weekend I will get it done…