Save Clip
Save a clip and associated metadata when a specific condition is met
Overview
The node saves clips in mp4 format, along with the Pipeline metadata contained in those frames, as a files API object.
Files created by this node are also listed in the Console under the Deployment detail page when the save location is Lumeo cloud.
Format of output
This node creates 2 files for every clip it saves:
-
Media file (MP4 format), named
<node_name>-YYYY-MM-DDThhmmss.usZ.mp4. Ex.clip1-2023-01-20T083909.952Z.mp4. The timestamp in the file name is the creation timestamp. This file contains the media for the clip in mp4 format. -
Metadata file (JSON format) named
<node_name>-YYYY-MM-DDThhmmss.usZ.mp4.json. Exclip1-2023-01-20T083909.952Z.mp4.json. This file contains the metadata for all the frames contained in the media file in JSON format.
Inputs & Outputs
- Inputs : 1, Media Format : Encoded Video
- Outputs : 1, Media Format: Encoded 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 |
max_duration | Once this duration is reached, a new clip is started. Range: minimum 1. Unit: seconds. | number | null | No |
prebuffer_interval | Duration of video to record before the trigger condition is met. Range: minimum 0. Unit: seconds. | number | 0 | No |
max_size | Once this size is reached, a new clip is started. Range: minimum 1. Unit: bytes. | number | null | No |
trigger | Start recording a clip when this expression evaluates to True. | trigger-condition | null | No |
trigger_mode | Controls how the clip is recorded when a trigger condition is configured. Options: Exact (exact); Fixed duration (fixed_duration). | 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 |
Pre-buffer Interval
This diagram below explains how the pre-buffer interval changes how the video clip is recorded.
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
