frigate icon indicating copy to clipboard operation
frigate copied to clipboard

WIP: Storing records on remote s3 storage

Open skrashevich opened this issue 1 year ago • 7 comments

Work in progress.

storage:
  s3: 
    enabled: true
    archive: false
    access_key_id: ****
    secret_access_key: *****
    bucket_name: frigate
    endpoint_url: http://192.168.88.171:9768
    path: "/"

skrashevich avatar May 23 '23 20:05 skrashevich

Deploy Preview for frigate-docs ready!

Name Link
Latest commit 33c81262156e9c71936cc34286c18519cbe61851
Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/646d2d14cf9c030008543025
Deploy Preview https://deploy-preview-6586--frigate-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar May 23 '23 20:05 netlify[bot]

The VOD module needs to read the metadata of every segment file for recordings playback. It has a cache, but I imagine this would be incredibly slow if every recording file has to be fetched.

How long does it take to load an hour long m3u8 playlist when you have 24/7 recordings in all mode?

blakeblackshear avatar May 23 '23 22:05 blakeblackshear

nginx vod module has "remote" and "mapped" modes for work with non-local files

skrashevich avatar May 25 '23 13:05 skrashevich

@skrashevich this is a really awesome feature. I left a few comments for improvements.

I would disable s3 stats by default. Give users the option to enable it. On buckets with millions of objects this can become a slow operation due to its recursive nature. Also, I think you are gathering stats for the whole bucket.

What if a user uses "/frigate" as their base path. Wouldn't we want stats only for that path?

@blakeblackshear, I'm not an expert on VOD. That said, s3 is commonly used to store the main playlist and HLS files for VOD platforms. Hence, with the correct config wouldn't expect any performance issues.

javydekoning avatar May 28 '23 08:05 javydekoning

I suggest adding a button next to a clip "Upload to S3" or option to "Upload only favorite clips". I personally do not have the bandwidth to upload all the vide that is captured but I would love to be able to backup specific certain clips.

PovilasID avatar Jul 23 '23 16:07 PovilasID

any update?

luckyycode avatar Apr 25 '24 21:04 luckyycode

There are couple of solution than you do yourself

  1. Clip upload. In HA notification script you can add uploads to s3 or telegram using rclone or curl.
  2. Rclone remote export. You can use rclone docker plugin to create volume that is actually a on remote server and specify it for exports, so that any time you export a clip it will get saved to remote server.

PovilasID avatar Apr 26 '24 07:04 PovilasID