{
  "openapi": "3.0.1",
  "info": {
    "title": "WebM to MP4 Converter",
    "description": "Convert WebM video files to MP4 format using FFmpeg. Fast, reliable transcoding with support for batch URLs and custom output settings.",
    "version": "1.0",
    "x-build-id": "1Agx5bUevXuhIDGmW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/junipr~webm-to-mp4/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-junipr-webm-to-mp4",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/junipr~webm-to-mp4/runs": {
      "post": {
        "operationId": "runs-sync-junipr-webm-to-mp4",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/junipr~webm-to-mp4/run-sync": {
      "post": {
        "operationId": "run-sync-junipr-webm-to-mp4",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "videos": {
            "title": "Videos to Convert",
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "description": "List of WebM videos to convert. Each item must have either a 'url' (HTTP/HTTPS link to a WebM file) or a 'kvStoreKey' (key in the actor's Key-Value Store). Min: 1, Max: 3.",
            "items": {
              "type": "object"
            },
            "default": [
              {
                "url": "https://www.w3schools.com/html/mov_bbb.webm"
              }
            ]
          },
          "videoCodec": {
            "title": "Video Codec",
            "enum": [
              "h264",
              "h265"
            ],
            "type": "string",
            "description": "Video codec to use for encoding. H.264 offers the best compatibility (all browsers, devices, platforms). H.265 produces smaller files but has limited browser support — best for archiving or mobile apps.",
            "default": "h264"
          },
          "preset": {
            "title": "Encoding Preset",
            "enum": [
              "ultrafast",
              "fast",
              "balanced",
              "slow",
              "veryslow"
            ],
            "type": "string",
            "description": "Encoding speed vs quality/size tradeoff. 'ultrafast' is fastest but produces larger files. 'veryslow' produces the smallest files but takes much longer. 'balanced' (default) is the best choice for most use cases.",
            "default": "balanced"
          },
          "crf": {
            "title": "Quality (CRF)",
            "minimum": 0,
            "maximum": 51,
            "type": "integer",
            "description": "Constant Rate Factor controls quality. Lower = better quality, larger file. 0 = lossless (very large), 18 = high quality, 23 = default, 28 = lower quality, 51 = worst quality.",
            "default": 23
          },
          "maxBitrate": {
            "title": "Max Video Bitrate",
            "type": "string",
            "description": "Maximum video bitrate (e.g., '2M', '5M', '10M'). Leave empty for CRF-only quality control (recommended). Use this to cap file size for streaming scenarios.",
            "default": ""
          },
          "resolution": {
            "title": "Output Resolution",
            "type": "string",
            "description": "Force output to a specific resolution (e.g., '1920x1080', '1280x720', '854x480'). Leave empty to keep the original resolution. Aspect ratio is preserved with padding if needed.",
            "default": ""
          },
          "maxWidth": {
            "title": "Max Width",
            "type": "integer",
            "description": "Scale video down if wider than this value (pixels). Aspect ratio is preserved. Ignored if 'resolution' is set."
          },
          "maxHeight": {
            "title": "Max Height",
            "type": "integer",
            "description": "Scale video down if taller than this value (pixels). Aspect ratio is preserved. Ignored if 'resolution' is set."
          },
          "fps": {
            "title": "Output Frame Rate",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Output frames per second. Leave empty to keep the original frame rate. Common values: 24, 30, 60."
          },
          "audioCodec": {
            "title": "Audio Codec",
            "enum": [
              "aac",
              "mp3",
              "none"
            ],
            "type": "string",
            "description": "Audio codec: 'aac' (default, universal compatibility), 'mp3' (widely supported), 'none' (strip audio from output).",
            "default": "aac"
          },
          "audioBitrate": {
            "title": "Audio Bitrate",
            "type": "string",
            "description": "Audio bitrate. Common values: '64k' (low), '128k' (default, good quality), '192k' (high), '320k' (maximum).",
            "default": "128k"
          },
          "audioSampleRate": {
            "title": "Audio Sample Rate",
            "type": "integer",
            "description": "Audio sample rate in Hz. Leave empty to keep the original sample rate. Common values: 44100, 48000."
          },
          "volume": {
            "title": "Volume Multiplier",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Audio volume adjustment. 1.0 = original volume (default). 0.5 = half volume. 2.0 = double volume. Range: 0.0 to 5.0.",
            "default": 1
          },
          "outputPrefix": {
            "title": "Output File Prefix",
            "type": "string",
            "description": "Prefix added to output filenames in the Key-Value Store. For example, 'converted_' produces 'converted_myvideo.mp4'.",
            "default": "converted_"
          },
          "fastStart": {
            "title": "Fast Start (Web Optimized)",
            "type": "boolean",
            "description": "Move the MP4 moov atom to the beginning of the file. Enables streaming playback — the browser can start playing before the entire file is downloaded. Highly recommended for web use.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max Concurrent Conversions",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum number of videos to convert simultaneously. Video encoding is CPU-intensive — keep this at 1-2 unless you have excess memory and CPU available. Range: 1-3.",
            "default": 1
          },
          "downloadTimeout": {
            "title": "Download Timeout (ms)",
            "minimum": 10000,
            "maximum": 300000,
            "type": "integer",
            "description": "Timeout for downloading each source video in milliseconds. Default: 60000 (1 minute). Range: 10000-300000.",
            "default": 60000
          },
          "conversionTimeout": {
            "title": "Conversion Timeout (ms)",
            "minimum": 30000,
            "maximum": 600000,
            "type": "integer",
            "description": "Timeout for FFmpeg conversion per video in milliseconds. Default: 300000 (5 minutes). Range: 30000-600000.",
            "default": 300000
          },
          "maxFileSizeMb": {
            "title": "Max Source File Size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "number",
            "description": "Maximum source video size per file. Default 50 MB, hard cap 100 MB.",
            "default": 50
          },
          "maxDurationSeconds": {
            "title": "Max Source Duration (seconds)",
            "minimum": 1,
            "maximum": 600,
            "type": "number",
            "description": "Maximum source video duration per file. Default 300 seconds, hard cap 600 seconds.",
            "default": 300
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}