{
    "properties": {
        "encoding": {
            "properties": {
                "bitrates": {
                    "properties": {
                        "240p": {
                            "default": true,
                            "description": "",
                            "type": "boolean"
                        },
                        "360p": {
                            "default": true,
                            "description": "",
                            "type": "boolean"
                        },
                        "480p": {
                            "default": true,
                            "description": "",
                            "type": "boolean"
                        },
                        "720p": {
                            "default": true,
                            "description": "",
                            "type": "boolean"
                        },
                        "enable": {
                            "default": false,
                            "description": "",
                            "type": "boolean"
                        }
                    }
                },
                "snapshot_interval": {
                    "default": 60,
                    "description": "",
                    "type": "integer"
                }
            }
        },
        "general": {
            "properties": {
                "worker_connections": {
                    "default": 1024,
                    "description": "Max. connections per worker",
                    "type": "integer"
                },
                "worker_processes": {
                    "default": 1,
                    "description": "Number of NGINX worker processes. Currently the RTMP server has problems with multithreading. Therefore we recommend only one process",
                    "type": "integer"
                }
            }
        },
        "hls": {
            "properties": {
                "drop_idle_publisher": {
                    "default": "10s",
                    "description": "",
                    "type": "string"
                },
                "hls_cleanup": {
                    "default": "on",
                    "description": "",
                    "type": "string"
                },
                "hls_continous": {
                    "default": "off",
                    "description": "",
                    "type": "string"
                },
                "hls_fragment": {
                    "default": "2s",
                    "description": "",
                    "type": "string"
                },
                "hls_fragment_naming": {
                    "default": "sequential",
                    "description": "",
                    "type": "string"
                },
                "hls_fragment_naming_granularity": {
                    "default": 0,
                    "description": "",
                    "type": "integer"
                },
                "hls_fragment_slicing": {
                    "default": "plain",
                    "description": "",
                    "type": "string"
                },
                "hls_fragments_per_key": {
                    "default": 0,
                    "description": "",
                    "type": "integer"
                },
                "hls_key": {
                    "default": "off",
                    "description": "",
                    "type": "string"
                },
                "hls_nested": {
                    "default": "off",
                    "description": "",
                    "type": "string"
                },
                "hls_playlist_lenght": {
                    "default": 60,
                    "description": "",
                    "type": "integer"
                },
                "hls_sync": {
                    "default": "1ms",
                    "description": "",
                    "type": "string"
                },
                "hls_type": {
                    "default": "live",
                    "description": "",
                    "type": "string"
                },
                "idle_streams": {
                    "default": "off",
                    "description": "",
                    "type": "string"
                },
                "interleave": {
                    "default": "on",
                    "description": "",
                    "type": "string"
                },
                "meta": {
                    "default": "copy",
                    "description": "",
                    "type": "string"
                },
                "sync": {
                    "default": "10ms",
                    "description": "",
                    "type": "string"
                },
                "wait_key": {
                    "default": "on",
                    "description": "",
                    "type": "string"
                },
                "wait_video": {
                    "default": "on",
                    "description": "",
                    "type": "string"
                }
            }
        },
        "http": {
            "properties": {
                "access_control_allow_origin": {
                    "default": "*",
                    "description": "",
                    "type": "string"
                },
                "access_log": {
                    "default": "off",
                    "description": "",
                    "type": "string"
                },
                "auth_password": {
                    "default": "datarhei",
                    "description": "",
                    "type": "string"
                },
                "auth_username": {
                    "default": "admin",
                    "description": "",
                    "type": "string"
                },
                "port": {
                    "default": 80,
                    "description": "",
                    "type": "integer"
                },
                "sendfile": {
                    "default": "on",
                    "description": "",
                    "type": "string"
                },
                "tcp_nodelay": {
                    "default": "on",
                    "description": "",
                    "type": "string"
                },
                "tcp_nopush": {
                    "default": "on",
                    "description": "",
                    "type": "string"
                }
            }
        },
        "https": {
            "properties": {
                "cert_create": {
                    "default": false,
                    "description": "",
                    "type": "boolean"
                },
                "cert_domain": {
                    "default": "example.org",
                    "description": "",
                    "type": "string"
                },
                "cert_email": {
                    "default": "admin@example.org",
                    "description": "",
                    "type": "string"
                },
                "enable": {
                    "default": false,
                    "description": "",
                    "type": "boolean"
                },
                "port": {
                    "default": 443,
                    "description": "",
                    "type": "integer"
                }
            }
        },
        "rtmp": {
            "properties": {
                "access_log": {
                    "default": "off",
                    "description": "",
                    "type": "string"
                },
                "ack_window": {
                    "default": 5000000,
                    "description": "",
                    "type": "integer"
                },
                "buflen": {
                    "default": "5s",
                    "description": "",
                    "type": "string"
                },
                "chunk_size": {
                    "default": 4096,
                    "description": "",
                    "type": "integer"
                },
                "max_message": {
                    "default": "1M",
                    "description": "",
                    "type": "string"
                },
                "max_streams": {
                    "default": 32,
                    "description": "",
                    "type": "integer"
                },
                "ping": {
                    "default": "3m",
                    "description": "",
                    "type": "string"
                },
                "ping_timeout": {
                    "default": "30s",
                    "description": "",
                    "type": "string"
                },
                "port": {
                    "default": 1935,
                    "description": "",
                    "type": "integer"
                },
                "publish_token": {
                    "default": "datarhei",
                    "description": "",
                    "type": "string"
                },
                "timeout": {
                    "default": "60s",
                    "description": "",
                    "type": "string"
                }
            }
        },
        "service": {
            "properties": {
                "bridge": {
                    "default": false,
                    "description": "Whether to use BRIDGE networking mode for Docker container. By default, this is false and HOST mode networking is used by virtue of lower latency",
                    "type": "boolean"
                },
                "cpus": {
                    "default": 1,
                    "description": "CPU shares to allocate to each Restreamer-Edge instance. Currently the RTMP server got problems with multithreading. Therefore only one cpu is recommended",
                    "type": "number"
                },
                "instances": {
                    "default": 1,
                    "description": "Number of instances to run.",
                    "minimum": 1,
                    "type": "integer"
                },
                "maximumOverCapacity": {
                    "default": 0.2,
                    "description": "Maximum over capacity.",
                    "minimum": 0,
                    "type": "number"
                },
                "mem": {
                    "default": 1024.0,
                    "description": "Memory (MB) to allocate to each Restreamer-Edge task.",
                    "minimum": 256.0,
                    "type": "number"
                },
                "minimumHealthCapacity": {
                    "default": 0.5,
                    "description": "Minimum health capacity.",
                    "minimum": 0,
                    "type": "number"
                },
                "name": {
                    "default": "restreamer-edge",
                    "description": "Name for this Restreamer-Edge application",
                    "type": "string"
                },
                "role": {
                    "default": "*",
                    "description": "Deploy Restreamer-Edge only on nodes with this role.",
                    "type": "string"
                }
            },
            "required": [
                "name",
                "instances",
                "cpus",
                "mem"
            ],
            "type": "object"
        }
    },
    "type": "object"
}