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:

  1. 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.

  2. Metadata file (JSON format) named <node_name>-YYYY-MM-DDThhmmss.usZ.jpg.json. Ex snapshot-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

PropertyDescriptionTypeDefaultRequired
locationSave location. Options: Lumeo Cloud (lumeo_cloud); Local disk (local); S3 bucket (s3_bucket).enumlumeo_cloudYes
pathUsed when save location is Local disk. Must be writable by the lumeod user. Conditional on location being local.string/var/lib/lumeo/mediaYes
max_edge_filesMaximum number of files to keep on local disk for this node. Conditional on location being local. Range: minimum 1.numbernullNo
triggerTake snapshots when this expression evaluates to True.trigger-conditionnullNo
trigger_modeExact: snapshot every frame while triggered. Single: snapshot once per false->true transition. Options: Exact (exact); Single (single).enumexactNo
endpointS3 endpoint. Conditional on location being s3_bucket.stringnullYes
regionS3 region. Conditional on location being s3_bucket.stringnullYes
bucketS3 bucket. Conditional on location being s3_bucket.stringnullYes
key_prefixFolder prefix within the bucket. Skip trailing "/". Conditional on location being s3_bucket.string""Yes
access_key_idS3 access key id. Conditional on location being s3_bucket.stringnullYes
secret_access_keyS3 secret access key. Conditional on location being s3_bucket.stringnullYes

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

PropertyAWSDigital OceanWasabiGCP
endpointhttps://s3.us-east-1.amazonaws.comhttps://nyc3.digitaloceanspaces.comhttps://s3.wasabisys.comhttps://storage.googleapis.com
regionus-east-1nyc3us-east-1us-central1
bucketmy-aws-bucketmy-do-bucketmy-wasabi-bucketmy-google-bucket
key_prefixmy-foldermy-foldermy-foldermy-folder
access_key_idAKIAIOSFODNN7EXAMPLEDO00QWERTYUIOPASDFGHJKLZXCVBNMWASABI00QWERTYUIOPASDFGHJKLZXCVBNMGOOG00QWERTYUIOPASDFGHJKLZXCVBNM
secret_access_keyxxxxxxxxxxxxxxxxxxxxxxx

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>


Did this page help you?