fix: keyframe images, video clips, evidence images, live stream webcam+URL, remove demo mode
fd50325 verified | """ | |
| S3-compatible storage configuration for DetectifAI (Backblaze B2) | |
| """ | |
| # S3 bucket names (matching actual Backblaze B2 buckets) | |
| VIDEOS_BUCKET = "detectifai-videos" | |
| KEYFRAMES_BUCKET = "detectifai-keyframes" | |
| COMPRESSED_BUCKET = "detectifai-compressed" | |
| NLP_IMAGES_BUCKET = "nlp-images" | |
| REPORTS_BUCKET = "detectifai-reports" | |
| # Object prefixes/paths | |
| ORIGINAL_VIDEO_PREFIX = "original" | |
| COMPRESSED_VIDEO_PREFIX = "compressed" | |
| KEYFRAME_PREFIX = "keyframes" | |
| # S3-compatible storage default configuration (Backblaze B2) | |
| MINIO_CONFIG = { | |
| "endpoint": "s3.eu-central-003.backblazeb2.com", | |
| "access_key": "00367479ffb7e4e0000000001", | |
| "secret_key": "K003opTvf92ijRj5dM7H1dgrlwcGTdA", | |
| "secure": True, | |
| "region": "eu-central-003" | |
| } | |
| # Function to generate MinIO paths | |
| def get_minio_paths(video_id: str, filename: str = None): | |
| """Generate standardized MinIO paths for a video""" | |
| if filename is None: | |
| filename = f"{video_id}.mp4" | |
| return { | |
| "original": f"{ORIGINAL_VIDEO_PREFIX}/{video_id}/{filename}", | |
| "compressed": f"{COMPRESSED_VIDEO_PREFIX}/{video_id}/{filename}", | |
| "keyframes": f"{KEYFRAME_PREFIX}/{video_id}", | |
| "reports": f"reports/{video_id}" | |
| } |