{
  "openapi": "3.0.1",
  "info": {
    "title": "FFmpeg Video & Audio Converter — Compress, Trim, MP4, MP3, GIF",
    "description": "FFmpeg video converter and video compressor API for links to your own media: convert to MP4, WebM, MOV, MKV, MP3, M4A, WAV, FLAC or OGG, compress to a target size, trim, resize to 9:16, extract audio, mute, normalize loudness, change speed, make GIFs, merge files, probe. Export via API.",
    "version": "1.0",
    "x-build-id": "EdF46BpnZhZBEuJ8V"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~ffmpeg-video-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-ffmpeg-video-converter",
        "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/steadyscrape~ffmpeg-video-converter/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-ffmpeg-video-converter",
        "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/steadyscrape~ffmpeg-video-converter/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-ffmpeg-video-converter",
        "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": {
          "files": {
            "title": "Audio or video file links",
            "maxItems": 500,
            "type": "array",
            "description": "Direct links to your own files: mp4, mov, webm, mkv, avi, m4v, ts, mp3, m4a, wav, flac, ogg, opus and anything else FFmpeg reads, up to 2 GB each. Signed links of Apify key-value records work too. Pages of YouTube, TikTok, Instagram, Vimeo and other platforms are refused before anything is downloaded, free.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or take the links from a dataset",
            "type": "string",
            "description": "Pick the dataset of another run (a scraper's videos, a render's MP4s, a podcast list) and every audio or video link in it is processed. Only the dataset you pick here can be read."
          },
          "datasetFields": {
            "title": "Dataset fields with the links",
            "type": "array",
            "description": "The fields of each dataset item that hold the links, as dotted paths (media.url takes the url of every element of media). Leave empty to take every link in a field named like video, audio, media, file or recording, or ending in .mp4, .mp3 and the like.",
            "items": {
              "type": "string"
            }
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "convert",
              "compress",
              "trim",
              "resize",
              "extract_audio",
              "mute",
              "normalize",
              "speed",
              "gif",
              "concatenate",
              "probe"
            ],
            "type": "string",
            "description": "What is done to each file. Every operation gives one output file per link, except concatenate, which joins all the links into one file in the order given.",
            "default": "convert"
          },
          "videoFormat": {
            "title": "Video format",
            "enum": [
              "mp4",
              "webm",
              "mov",
              "mkv"
            ],
            "type": "string",
            "description": "Container and codecs of every video output. A file already in the right codecs is copied into the new container without re-encoding (fast, lossless, billed as audio minutes).",
            "default": "mp4"
          },
          "audioFormat": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "m4a",
              "wav",
              "wav-16k-mono",
              "flac",
              "ogg"
            ],
            "type": "string",
            "description": "Format of every audio output: extract audio, and convert, trim, normalize or speed on an audio file.",
            "default": "mp3"
          },
          "quality": {
            "title": "Video quality",
            "enum": [
              "high",
              "balanced",
              "small",
              "smallest"
            ],
            "type": "string",
            "description": "Used whenever a picture is encoded. high ≈ visually lossless, balanced is x264's default (CRF 23), small and smallest trade detail for size.",
            "default": "balanced"
          },
          "targetSizeMb": {
            "title": "Target file size, in MB (compress)",
            "minimum": 0,
            "maximum": 4000,
            "type": "number",
            "description": "Compress each video to about this size with a two-pass encode (8 for Discord, 16 for WhatsApp, 25 for email). 0 compresses by quality instead. If the size leaves too few bits for the full resolution, the video is downscaled and the row says so.",
            "default": 0
          },
          "maxResolution": {
            "title": "Maximum resolution",
            "enum": [
              "keep",
              "1080",
              "720",
              "480",
              "360"
            ],
            "type": "string",
            "description": "The short side of encoded videos (1080 is 1920×1080, or 1080×1920 for a vertical video). Never upscales. Encoded videos are capped at 1080p; a stream copy keeps the source as it is.",
            "default": "keep"
          },
          "aspectRatio": {
            "title": "Aspect ratio",
            "enum": [
              "keep",
              "16:9",
              "9:16",
              "1:1",
              "4:5"
            ],
            "type": "string",
            "description": "Reshape encoded videos: 9:16 for TikTok, Reels and Shorts, 1:1 or 4:5 for feeds, 16:9 for YouTube. How the picture fills the new shape is set by Fit.",
            "default": "keep"
          },
          "fit": {
            "title": "Fit",
            "enum": [
              "crop",
              "pad",
              "blur"
            ],
            "type": "string",
            "description": "When the aspect ratio changes (or files of different shapes are joined): crop fills the frame and cuts the edges, pad shows the whole picture with black bars, blur shows it whole on a blurred copy of itself.",
            "default": "crop"
          },
          "audioBitrate": {
            "title": "Audio bitrate (kbps)",
            "enum": [
              "auto",
              "64",
              "96",
              "128",
              "160",
              "192",
              "256",
              "320"
            ],
            "type": "string",
            "description": "For MP3, AAC and Opus. auto uses 192 for MP3 and M4A, 128 inside videos and for Opus, and never more than the source's own.",
            "default": "auto"
          },
          "audioChannels": {
            "title": "Channels",
            "enum": [
              "keep",
              "mono",
              "stereo"
            ],
            "type": "string",
            "description": "Mix the sound to mono or stereo.",
            "default": "keep"
          },
          "audioSampleRate": {
            "title": "Sample rate (Hz)",
            "enum": [
              "keep",
              "16000",
              "22050",
              "44100",
              "48000"
            ],
            "type": "string",
            "description": "Resample the sound. Opus (WebM, OGG) plays at 48 kHz, so 22050 and 44100 become 48000 there.",
            "default": "keep"
          },
          "loudnessTarget": {
            "title": "Loudness target, in LUFS (normalize)",
            "minimum": -30,
            "maximum": -5,
            "type": "number",
            "description": "-14 for YouTube and Spotify, -16 for podcasts and Apple, -23 for EBU R128 broadcast. Measured in a first pass, then applied as one gain when the peaks allow it, or with gentle levelling when they do not; true peaks stay under -1.5 dBTP and the result lands within about 1 LU of the target.",
            "default": -16
          },
          "startTime": {
            "title": "Start time",
            "pattern": "^\\s*((\\d+:)?(\\d{1,2}:)?\\d+([.,]\\d+)?)?\\s*$",
            "type": "string",
            "description": "Seconds (95.5) or a timecode (1:35.5, 00:01:35.500). Empty starts at the beginning. Used by every operation except concatenate and probe; trim needs a start time, an end time or both.",
            "default": ""
          },
          "endTime": {
            "title": "End time",
            "pattern": "^\\s*((\\d+:)?(\\d{1,2}:)?\\d+([.,]\\d+)?)?\\s*$",
            "type": "string",
            "description": "Seconds or a timecode, counted from the start of the file. Empty runs to the end.",
            "default": ""
          },
          "fastTrim": {
            "title": "Fast trim without re-encoding",
            "type": "boolean",
            "description": "Cut by copying the streams: instant, lossless and billed as audio minutes, but the cut starts on the keyframe at or before the start time (up to a few seconds early). Off cuts to the exact frame.",
            "default": false
          },
          "speed": {
            "title": "Speed factor (speed)",
            "minimum": 0.25,
            "maximum": 4,
            "type": "number",
            "description": "2 plays twice as fast, 0.5 at half speed. The pitch of the sound is kept.",
            "default": 1
          },
          "gifWidth": {
            "title": "GIF width, in pixels",
            "minimum": 120,
            "maximum": 480,
            "type": "integer",
            "description": "Up to 480. Each GIF is up to 30 seconds from the start time.",
            "default": 480
          },
          "gifFps": {
            "title": "GIF frames per second",
            "minimum": 5,
            "maximum": 20,
            "type": "integer",
            "description": "Fewer frames make a smaller GIF.",
            "default": 12
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}