Bee camera setup
Tom Goddard
April 29, 2018
Here are the technical details of the live bee camera video provided by web site
beesplease.net.
Cameras
- Two Hikvision DS-2CD2032-I security cameras.
- Replaced 4mm lenses with 6mm lenses so cameras can be far enough from hive
entrance to not interfere with bee flight, and still get a close-up view.
- Run 24 hours, 7 days a week.
- 3 Mpixel (2048 x 1536 pixels), color, fixed focus, with infrared for night recording.
- Use 1280 x 720 video to reduce network bandwidth, with variable bit rate limited to 8 Kbits/sec.
- Cost $100 per camera.
Connection
- Cameras are 50 feet from house in backyard in San Francisco.
- Cameras connects to a TP-LINK TL-SG-1008P power-over-ethernet switch.
- Each camera connects by its own 90 foot cat5e ethernet cable
for transmitting video and power.
- Cables run along the fence line, under a deck, into the basement then into the house.
- The switch provides 12V power over the ethernet cable.
- Most consumer routers do not provide power, necessitating this switch.
- Switch connects to home router.
- Video stream is read by an small Intel NUC (model 5i5RYK) computer (4.5 x 4.25 x 1 inch) connected by ethernet cable
to the router.
Web server:
- Intel NUC runs Ubuntu 16.04 LTS operating system.
- Apache 2 web server hosts beesplease.net site.
- ffmpeg converts camera RTSP feed from cameras to segmented HLS video.
- Browser clients use hls.js
for playback or native HLS support (on iOS).
- To save energy (switch, router, computer) video is streamed from camera and converted
to HLS only when web page is visited. This uses a python CGI script
hls_on_demand.py
I wrote to dynamically start ffmpeg when the page is loaded.
- Web site is served from home ISP service, sonic.net gigabit fiber.
- Plan to use Sonic's dynamic DNS REST API
to keep beesplease.net pointing at dynamically assigned IP address.
- Dynamic IP assignment changes less than once per week.