Methods
Note: FaceClipManager is a storage management utility. For face analysis of clips, use FaceTracker.find_faces_in_clip(). See FaceTracker Methods.
Methods Overview
list_clips()
List all clips in storage
Inventory management, batch processing
download_file()
Download clip from storage
Local review, backup
remove_file()
Delete clip from storage
Cleanup, retention management
remove_all_clips()
Clear all clips from storage
Complete cleanup (use with caution)
list_clips()
List all video clips and their related files in object storage.
When to use: Use this to inventory what's stored, find specific clips, or iterate through all clips for batch operations. The method groups related files (original, annotated, JSON) by base name.
Signature
list_clips() -> Dict[str, dict]Returns
Dictionary mapping clip base names to file objects:
"original"- Original video clip file (.mp4)"annotated"- Annotated video clip (if exists,_annotated.mp4). Created whenfind_faces_in_clip()is called withsave_annotated=True"json"- JSON annotations file (if exists,.json)
Each file object is of type minio.datatypes.Object with properties:
object_name- Full path in storagesize- File size in byteslast_modified- Timestamp of last modification
Example: Inventory Clips
Example: Find Recent Clips
Example: Find Clips Missing Annotations
download_file()
Download a video clip or related file from object storage.
When to use: Use this to retrieve clips for local review, backup, or processing. The method automatically adds .mp4 extension if missing.
Signature
Parameters
filename(str) - Name of file to download (.mp4extension optional)
Returns
bytes- Raw bytes of the downloaded file
Example: Download and Save
Example: Backup All Clips
Example: Download Both Original and Annotated
remove_file()
Remove a file from object storage.
When to use: Use this for cleanup after reviewing clips, implementing retention policies, or removing specific unwanted recordings. Be careful as deletion is permanent.
Signature
Parameters
filename(str) - Name of file to remove (.mp4extension optional)
Example: Remove Single Clip
Example: Retention Policy (30 Days)
Example: Remove Only Annotated Versions
remove_all_clips()
Remove all clips and related files from object storage.
When to use: Use this for complete cleanup of storage bucket, clearing test data, or resetting after batch processing. Use with extreme caution as this deletes everything in the bucket.
Signature
Example: Clear Test Data
Example: Cleanup After Batch Processing
Warning: This method deletes all clips in the configured bucket. There is no undo. Always verify you're connected to the correct storage before calling this method.
Last updated
Was this helpful?

