Tutorial · Python ยท ~10 min

Batch Remove Subtitles from Videos

Whole seasons, one command: folder-prefix jobs turn a 40-episode backlog into an overnight export.

PythonBatchAPI

Why this matters

Per-file loops fail at episode 12, lose progress, and burn engineer time. Batch jobs give queueing, retries, and per-file status for free.

Each file becomes an independent job with its own URL and status โ€” so a hard scene in one episode never blocks the rest.

How it works

Submit a folder prefix with region detection; the API walks the manifest, erases subtitles per file, and reports per-file status through the batch endpoint.

Submit a job with an input URL (S3, GCS or HTTPS), poll the job URL, and download the rendered output. No GPU, no queues, no ffmpeg builds to babysit.

Code

Python
import requests, time

API = "https://api.mlslabs.io/v1/subtitle-eraser/jobs"
headers = {"X-API-Key": "YOUR_API_KEY"}
payload = {"input": "s3://bucket/shows/", "regions": "auto", "pattern": "*.mp4"}

resp = requests.post(API, json=payload, headers=headers)
job = resp.json()
while job["status"] not in ("succeeded", "failed"):
    time.sleep(3)
    job = requests.get(job["url"], headers=headers).json()

print("Output:", job["output_url"])

Pro tips

  • Smoke-test one episode per show first โ€” region detection per title style varies.
  • Run batches on a schedule so new episodes are cleaned automatically.
  • Keep the mask previews for QC; they double as a change-log for your editors.

Pricing note

Usage is metered per minute of media processed; the first tier is free each month. Volume discounts kick in automatically.

FAQ

Common questions

What patterns can I match?

Prefix plus glob, e.g. s3://bucket/shows/season-1/*.mp4, or an explicit manifest of URLs.

Is there a file size limit?

No hard limit; long episodes are chunked internally and stitched back together.

How is pricing metered for batches?

Per minute of media processed across all files in the batch.