About OctoCam
OctoCam is a window-mounted webcam that makes daily timelapses of the weather! OctoCam captures 4,320 images every day (at a 20 second interval), then creates a 144 second timelapse for that day! (in addition to timelapses every 3 hours showing the day up to that point)

The idea of OctoCam was one that I was dreaming about throughout freshman year of college. I lived on the 4th floor of my dorm with an amazing view of the city and thought - how cool it would be to make something to make timelapses of the weather (especially when it snows)?

Then, in February 2021, it started with a 4 AM impulse purchase of the OctoCam project kit from Pimoroni. The OctoCam project kit was perfect, it took care of the hardware and I'd only have to deal with software! A few days later and OctoCam rocked up at my dorm. It took about 3-4 weeks of experimentation and coding to get the current OctoCam stack online.

Since March 3, 2021 at 1:41:00 PM, over four million images have been captured across 1000+ daily timelapses in 5 locations - all the while, OctoCam has turned into one of my biggest and most produest of projects yet. I hope you enjoy exploring OctoCam and all the things its captured!
Technical details
The OctoCam stack is a doozy! I can't write all about it here, but I'll do my best to give a short summary. If you're still curious after reading (or just prefer images), be sure to check out the image version of the detailed OctoCam stack. This stack is a bit outdated (and doesn't include newer changes to the networking in my apartment + long-term video storage), but gives a decent overview of how it all works.

The OctoCam stack is divided into three layers - the OctoCam Pi that's actually stuck to the window capturing images, the backend which does image storage/video encoding, and the frontend which does video storage and actually serves the frontend. There's a split between the backend and frontend as my web VPS does not have the storage for storing all of OctoCam's images nor the CPU power to encode OctoCam videos. Thankfully, the "server" (it's an Optiplex 3060 from eBay) in my apartment has a lot of "CPU power" (as much as an i5-8500 has...but much more than my VPS) and disk space! But it's also on a residental asymmetric connection with measly upload speeds - not great for serving video. As such, the backend uploads videos for the frontend for storage. That's a very high level summary of the stack though, the image has A LOT more detail.

In terms of image capture, OctoCam is currently using the Raspberry Pi Camera Module 3 since June 2024, a Sony IMX708 with a ~70 degree FoV. Images are captured at 1296x2304 using the Picamera2 library. Focus is set to infinity at night, and during the day is refocused every 20 minutes.

OctoCam has gone through three other cameras (and four resolutions) throughout its lifetime, including:
  • - Raspberry Pi Camera Module 3 at 2304x1296 in June 2024
  • - Raspberry Pi Camera Module 3 Wide from June 2023 to June 2024 (2304x1296)
  • - Omnivision OV5647 at 120 degree FoV from May 2021 to June 2023 (1600x1200)
  • - Omnivision OV5647 at ~80 degree FoV from March 2021 to May 2021 (1600x1200)


OctoCam usually captures in full auto during the day, but has special logic to go into a custom night mode with longer, fixed shutter speeds. Night mode runs from just a bit before sunrise to just a bit after sunrise. The timing of night mode is complicated, especially since OctoCam includes checks to see how cloudy it is at sunrise and sunset, and can defer coming out of night mode for longer or go into night mode earlier.

The current night mode exposure time is 125ms in transition night mode (mainly for preventing over-exposures just before/after the sun crosses the horizon), and 250ms in full night mode. Previously, the exposure time was 500ms and 1000ms respectively with the CM3 Wide in Worcester, and 1000ms and 2000ms respectively on the OV5641 cameras.

OctoCam encodes videos at 8 Mbps @ CRF 25 using ffmpeg (previously at 6 Mbps with the OV5647 cameras). There's some compatibility flags so hopefully videos play across as many browsers as possible.

OctoCam is largely coded in Python. The entire Pi-side and backend is done in Python. Both the backend and frontend use Flask as a web server. The frontend also uses Jinja2 server-side rendering for a good chunk of pages (the homepage now uses a lot of client-side rendering to keep things up-to-date however).
OctoCam Privacy Policy
OctoCam has Data Retention & Privacy Policies intended to keep timelapses for a long time, maintain storage in an efficient way, but also preserve privacy.

Raw images:
Raw images are defined by any image captured by OctoCam that haven't been processed or uploaded to the OctoCam Backend.

Raw images are never stored anywhere on the OctoCam stack. When a photo is captured by the Picamera library on the Pi that captures images, it's saved to a bytes array in RAM. The bytes array is used create the compressed & timestamped image is saved to disk for upload.

Compressed images:
Compressed images are defined by any image captured by OctoCam that have undergone compression & timestamping.

Compressed images are stored on OctoCam itself until the image has been uploaded to the backend (usually this process completes in 5-10 seconds). However, if a server outage is ongoing, OctoCam will store compressed images until they can be successfully uploaded to the backend.

The Pi that captures images and the OctoCam backend are physically on the same network, meaning images never traverse the internet.

On the backend, all images are retained for 60 days after capture. Images captured on the minute are stored for an additional 60 days (for a total of 120 days). Images captured on the hour are stored forever.

Timelapses:
Timelapses are defined as any video that uses compressed images. Timelapses are encoded on the backend using ffmpeg. These timelapses are uploaded to the frontend before being deleted on the backend once the upload was successful. Partial daily timelapses are stored for their 3 hour increment, only to be deleted when the next partial timelapse has been fully uploaded to the frontend.

Full day timelapses are stored forever, unless deleted manually. After 30 days of being on the OctoCam homepage, full day timelapses are automatically transferred into the archive.

There is an admin panel where administrators can generate timelapses on demand. These timelapses are stored forever, unless deleted manually.

Your privacy:
OctoCam's resolution of 1296x2304 for images is a deliberate choice - it's a resolution that has high enough quality, is space efficient, but most importantly, means you cannot make out specific facial details of anyone on OctoCam. People on OctoCam usually turn up as 10 pixel blobs that you can't get any meaningful information from.

OctoCam is not a security camera. It is designed to capture the weather, not what people are doing. The capture time of 20 seconds and the image resolution means that it misses a lot of people that walk in the frame of OctoCam. To my knowledge, OctoCam to my knowledge does not capture any areas that would be deemed private under MGL c.214, S. 1B (right of privacy) and United States law.

Nonetheless, if you feel that your privacy or the privacy of other people is/are being violated by OctoCam, please contact me on my main website (owenthe.dev) with reasoning behind the privacy violation(s), and how you would like the issue rectified. I'll do my best to accomodate reasonable requests (i.e. deleting a portion of a timelapse, blurring a portion of captured images during nighttime).

Image requests:
By default, you cannot get the images generated by OctoCam (aside from the latest image captured). Any images that I have stored are the compressed version - not the raw version of images.

If you have a reasonable request for a set of images captured by OctoCam, please contact me on my main website (owenthe.dev) about your request, why you're making the request, and the timeframe requested.
Credits
OctoCam (and its namesake) is based on the now discontinued OctoCam project kit from Pimoroni. Truly the best $55 I've ever spent so I could focus entirely on writing the best software stack for this project.

Weather data is provided by Dark Sky. A big thanks to the developers of Flask, Jinja, Materialize, and FFmpeg - these libraries form the backbone that makes OctoCam possible.