{
    "id": "http://sport-archive.com/input-schema/output/thumb#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "CT transcode output specification for video thumbnails",
    "type": "object",
    "properties": {
        "output_type": {
            "type": "string",
            "value": "THUMB",
            "description": "Type of the file to output"
        },
        "mode": {
            "type": "string",
            "enum": [
                "snapshot",
                "intervals"
            ],
            "description": "Type of thumbnails generation needed"
        },
        "output_bucket": {
            "type": "string",
            "description": "S3 bucket and path where the thumbnails will be uploaded",
            "pattern": "^[0-9a-zA-Z\\.\\-_]+$",
            "minLength": 3,
            "maxLength": 63
        },
        "output_file": {
            "type": "string",
            "description": "basename for the thumbnails to generate. We will appen sequence number if the 'interval' mode is selected",
            "pattern": "^[\\w /-]+\\.[0-9a-zA-Z]+$",
            "minLength": 1,
            "maxLength": 1024
        },
        "intervals": {
            "type": "integer",
            "minValue": 1,
            "description": "Override default interval in seconds"
        },
        "snapshot_sec": {
            "type": "integer",
            "minValue": 0,
            "description": "Time in second in the video where to take the snapshot"
        },
        "s3_rrs": {
            "type": "boolean",
            "description": "Activate reduced redundancy or not in S3 storage"
        },
        "s3_encrypt": {
            "type": "boolean",
            "description": "Activate backend storage encryption"
        },
        "size": {
            "type": "string",
            "pattern": "^[0-9]+x[0-9]+$",
            "description": "Size of the thumbnails"
        }
    },
    "required": [
        "size"
    ],
    "additionalProperties": false
}