Save Snapshot
Save a snapshot and associated metadata when a specific condition is met
Overview
The node saves a snapshot in jpg format, along with the Pipeline metadata contained in that frame, as a files API object.
Files created by this node are also listed in the Console under the Deployment detail page.
Format of output
This node creates 2 files for every snapshot it saves:
-
Media file (JPEG format), named
<node_name>-YYYY-MM-DDThhmmss.usZ.jpg. Ex.snapshot1-2023-01-20T083909.952Z.jpg. The timestamp in the file name is the creation timestamp. This file contains the media for the snapshot in jpg format. -
Metadata file (JSON format) named
<node_name>-YYYY-MM-DDThhmmss.usZ.jpg.json. Exsnapshot-2023-01-20T083909.952Z.jpg.json. This file contains the metadata for the frame contained in the media file in JSON format.
Inputs & Outputs
- Inputs : 1, Media Format : Raw Video
- Outputs : 1, Media Format: Raw Video
- Output Metadata : None
Properties
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
location | Save location. Options: Lumeo Cloud (lumeo_cloud); Local disk (local); S3 bucket (s3_bucket). | enum | lumeo_cloud | Yes |
path | Used when save location is Local disk. Must be writable by the lumeod user. Conditional on location being local. | string | /var/lib/lumeo/media | Yes |
max_edge_files | Maximum number of files to keep on local disk for this node. Conditional on location being local. Range: minimum 1. | number | null | No |
trigger | Take snapshots when this expression evaluates to True. | trigger-condition | null | No |
trigger_mode | Exact: snapshot every frame while triggered. Single: snapshot once per false->true transition. Options: Exact (exact); Single (single). | enum | exact | No |
endpoint | S3 endpoint. Conditional on location being s3_bucket. | string | null | Yes |
region | S3 region. Conditional on location being s3_bucket. | string | null | Yes |
bucket | S3 bucket. Conditional on location being s3_bucket. | string | null | Yes |
key_prefix | Folder prefix within the bucket. Skip trailing "/". Conditional on location being s3_bucket. | string | "" | Yes |
access_key_id | S3 access key id. Conditional on location being s3_bucket. | string | null | Yes |
secret_access_key | S3 secret access key. Conditional on location being s3_bucket. | string | null | Yes |
Max Edge Files
When location is local, if this property is not set, Lumeo will continue to save till the disk fills up.
If it is set, Lumeo will save to local disk in a round robin manner (overwrite the 1st file once max_edge_files have been written).
Key Prefix
This property supports custom folder / path configurations in the S3 bucket using dynamic keyword replacements by enclosing keywords in double curly braces {{keyword}}.
Available keywords: application_id, application_name, deployment_id, deployment_name, gateway_id, gateway_name, source_id, year, month, day, hour, min, sec.
ex. production/test or media/{{deployment_id}}/{{year}}-{{month}}-{{day}}/clips
Output Metadata
Node does not insert any output metadata; upstream metadata continues through the pipeline
Common Provider Configurations
Examples
| Property | AWS | Digital Ocean | Wasabi | GCP |
|---|---|---|---|---|
endpoint | https://s3.us-east-1.amazonaws.com | https://nyc3.digitaloceanspaces.com | https://s3.wasabisys.com | https://storage.googleapis.com |
region | us-east-1 | nyc3 | us-east-1 | us-central1 |
bucket | my-aws-bucket | my-do-bucket | my-wasabi-bucket | my-google-bucket |
key_prefix | my-folder | my-folder | my-folder | my-folder |
access_key_id | AKIAIOSFODNN7EXAMPLE | DO00QWERTYUIOPASDFGHJKLZXCVBNM | WASABI00QWERTYUIOPASDFGHJKLZXCVBNM | GOOG00QWERTYUIOPASDFGHJKLZXCVBNM |
secret_access_key | xxxxx | xxxxx | xxxxxx | xxxxxxx |
AWS Credentials
Create user
aws iam create-user --user-name <username>
Attach policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject"
],
"Resource": "arn:aws:s3:::<bucket-name>/*"
},
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::<bucket-name>"
}
]
}aws iam put-user-policy --user-name <username> --policy-name S3PutObjectPolicy --policy-document file://s3-put-policy.json
Create long lived access key for user and grab the credentials
aws iam create-access-key --user-name <username>
Updated 6 days ago
