BusConsultas (qry)

qry.media.probe

Facts de un asset por el motor de medios del daemon, en proceso (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.

qry.media.probe · v2

Facts de un asset por el motor de medios del daemon, en proceso (dec-0110: FFmpeg sólo como librería, nunca como proceso). Sustituye al ffprobe que workers-svc lanzaba como proceso (cmd.workers.probe, retirado).

engine: zig (facts propios), libav (FFmpeg 8 vía FFI) o auto (la misma regla que openPackaging: zig si lee el contenedor, si no libav cuando está compilado). Sin engine, el default del daemon (STYX_MEDIA_ENGINE). La respuesta dice qué motor contestó.

CampoValor
Familiaqry
Versión2
Tope del payload32768 bytes
ContratoMediaProbe 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-daemonunixcatalog-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"
        }
      ]
    }
  },
  "additionalProperties": false
}

Respuesta

{
  "type": "object",
  "properties": {
    "result": {
      "type": "object",
      "required": [
        "engine",
        "container",
        "fileSize",
        "streams"
      ],
      "properties": {
        "engine": {
          "anyOf": [
            {
              "type": "string",
              "const": "zig"
            },
            {
              "type": "string",
              "const": "libav"
            }
          ]
        },
        "container": {
          "anyOf": [
            {
              "type": "string",
              "const": "mp4"
            },
            {
              "type": "string",
              "const": "mov"
            },
            {
              "type": "string",
              "const": "matroska"
            },
            {
              "type": "string",
              "const": "webm"
            }
          ]
        },
        "fileSize": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "durationUs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "streams": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "index",
              "kind",
              "codec",
              "default"
            ],
            "properties": {
              "index": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "kind": {
                "anyOf": [
                  {
                    "type": "string",
                    "const": "video"
                  },
                  {
                    "type": "string",
                    "const": "audio"
                  },
                  {
                    "type": "string",
                    "const": "subtitle"
                  },
                  {
                    "type": "string",
                    "const": "data"
                  }
                ]
              },
              "codec": {
                "type": "string",
                "pattern": "^[a-z0-9_]{1,32}$"
              },
              "width": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "height": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "frameRateNum": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4294967295
              },
              "frameRateDen": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4294967295
              },
              "sampleRate": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295
              },
              "channels": {
                "type": "integer",
                "minimum": 1,
                "maximum": 65535
              },
              "language": {
                "type": "string",
                "pattern": "^[A-Za-z0-9-]{1,16}$"
              },
              "default": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "maxItems": 64
        }
      },
      "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
}