BusComandos (cmd)

cmd.media.openPackaging

Abre un empaquetado HLS/CMAF de un fichero de una raíz de medios (dec-0110).

ImplementadoSin versión del tren todavía· generada desde packages/api-contracts/src/bus/media-daemon.ts

Página generada desde packages/api-contracts/src/bus/media-daemon.ts + packages/api-contracts/src/bus/routes.ts. No se edita a mano: bun run docs:gen la regenera y bun run docs:check falla si difiere.

cmd.media.openPackaging · v3

Abre un empaquetado HLS/CMAF de un fichero de una raíz de medios (dec-0110): elige motor (zig, libav o auto, con el motivo del fallback si lo hubo) y devuelve las URLs de master y media playlist sobre HTTP/3, o transportType: none sin listener.

CampoValor
Familiacmd
Versión3
Tope del payload8192 bytes
ContratoMediaOpenPackaging en packages/api-contracts/src/bus/media-daemon.ts

Rutas (BUS_ROUTES)

Deny-by-default: un emisor fuera de la allowlist se deniega y se audita (dec-0119 §4).

AtiendeTransporteEmisores admitidosRate (por emisor)
media-daemonunixplayback-svc, styx-ops100/s, ráfaga 100

Petición

{
  "type": "object",
  "required": [
    "rootId",
    "relPath"
  ],
  "properties": {
    "rootId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._-]{1,64}$"
    },
    "relPath": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4095
    },
    "engine": {
      "anyOf": [
        {
          "type": "string",
          "const": "zig"
        },
        {
          "type": "string",
          "const": "libav"
        },
        {
          "type": "string",
          "const": "auto"
        }
      ]
    },
    "segmentMs": {
      "type": "integer",
      "minimum": 1000,
      "maximum": 20000
    },
    "video": {
      "type": "integer",
      "minimum": 0,
      "maximum": 4294967295
    },
    "audio": {
      "type": "integer",
      "minimum": 0,
      "maximum": 4294967295
    },
    "includeAudio": {
      "type": "boolean"
    },
    "capActor": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "capResource": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    }
  },
  "additionalProperties": false
}

Respuesta

{
  "type": "object",
  "properties": {
    "result": {
      "type": "object",
      "required": [
        "packagingId",
        "engine",
        "segments",
        "targetDurationS",
        "codecs",
        "transportType"
      ],
      "properties": {
        "packagingId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,64}$"
        },
        "engine": {
          "anyOf": [
            {
              "type": "string",
              "const": "zig"
            },
            {
              "type": "string",
              "const": "libav"
            }
          ]
        },
        "fallback": {
          "type": "string",
          "pattern": "^[a-z_]{1,48}$"
        },
        "segments": {
          "type": "integer",
          "minimum": 0
        },
        "targetDurationS": {
          "type": "integer",
          "minimum": 0
        },
        "codecs": {
          "type": "string",
          "maxLength": 512
        },
        "masterUrl": {
          "type": "string",
          "maxLength": 512
        },
        "mediaUrl": {
          "type": "string",
          "maxLength": 512
        },
        "tcpMasterUrl": {
          "type": "string",
          "maxLength": 512
        },
        "certHash": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "transportType": {
          "anyOf": [
            {
              "type": "string",
              "const": "h3"
            },
            {
              "type": "string",
              "const": "none"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "error": {
      "type": "object",
      "required": [
        "code",
        "message",
        "recoverable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "pattern": "^[A-Z0-9_]{1,48}$"
        },
        "message": {
          "type": "string",
          "maxLength": 256
        },
        "recoverable": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}