{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ffmpeg-micro-com/json-schema/ffmpeg-micro-com-media-metadata-schema.json",
  "title": "MediaMetadata",
  "description": "What ffprobe reported about a media file. `duration_seconds`, `format` and `size_bytes` may carry `0` or `\"unknown\"` when the probe ran but could not determine them (a still image has no duration). `width`, `height`, `fps`, `codec_video`, `codec_audio`, `has_video` and `has_audio` are present only when the probe reported them: a plain audio file has no `width`. Cover art embedded in an audio file is a video stream to ffprobe, so such a file reports `has_video: true` with the artwork's dimensions. `width` and `height` are the stored dimensions, before any rotation the file carries: a phone video shot upright can report 1920 by 1080.\n",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ffmpeg-micro-com-openapi.yaml#/components/schemas/MediaMetadata",
  "type": "object",
  "properties": {
    "duration_seconds": {
      "type": "number"
    },
    "format": {
      "type": "string",
      "description": "Container format as ffprobe names it"
    },
    "size_bytes": {
      "type": "integer"
    },
    "width": {
      "type": "integer",
      "description": "Video width in pixels; absent for audio-only files"
    },
    "height": {
      "type": "integer",
      "description": "Video height in pixels; absent for audio-only files"
    },
    "fps": {
      "type": "number",
      "description": "Frame rate of the video stream; absent for audio-only files"
    },
    "codec_video": {
      "type": "string",
      "description": "Codec of the video stream (e.g. h264); absent when there is none"
    },
    "codec_audio": {
      "type": "string",
      "description": "Codec of the audio stream (e.g. aac); absent when there is none"
    },
    "has_video": {
      "type": "boolean",
      "description": "Whether the file has a video stream"
    },
    "has_audio": {
      "type": "boolean",
      "description": "Whether the file has an audio stream"
    }
  }
}