{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://othmaneblial.github.io/pyffmpegcore/schemas/batch-manifest-1.0.schema.json",
  "title": "PyFFmpegCore batch manifest 1.0",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "jobs"],
  "properties": {
    "schema_version": {"const": "1.0"},
    "policy": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "max_workers": {"type": "integer", "minimum": 1, "maximum": 32},
        "max_retries": {"type": "integer", "minimum": 0, "maximum": 10},
        "max_input_bytes": {
          "oneOf": [
            {"type": "integer", "minimum": 1},
            {"type": "string", "minLength": 1}
          ]
        },
        "per_job_timeout_seconds": {"type": "number", "exclusiveMinimum": 0}
      }
    },
    "jobs": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "profile", "input", "output"],
        "properties": {
          "id": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$"},
          "profile": {"type": "string", "minLength": 1},
          "input": {"type": "string", "minLength": 1},
          "output": {"type": "string", "minLength": 1},
          "subtitle": {"type": "string", "minLength": 1},
          "force": {"type": "boolean"}
        }
      }
    }
  }
}
