Tutorial · Python · ~10 min
Batch Upscale Videos
A catalog of 480p/720p clips to 4K — the batch queue does the walking.
Why this matters
Upscaling one clip is a demo; a library is a pipeline problem. Folder-prefix batch jobs give queueing, retries, and per-file status without a scheduler.
Staging by value (hero content first) means the visible win lands on day one.
How it works
Submit the folder with your scale and model; each file becomes a job with its own status and output URL.
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
import requests, time
API = "https://api.mlslabs.io/v1/super-resolution/jobs"
headers = {"X-API-Key": "YOUR_API_KEY"}
payload = {"input": "s3://bucket/library/", "scale": 2, "model": "real-esrgan-x4", "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
- Stage by value: hero titles first, then the long tail.
- Batch in 2x by default — 4x on select titles where it matters.
- Log per-file model+settings so QC can reproduce any output.
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
Can I pause or resume a batch?
Yes — batches are pausable; resume continues remaining files.
What reports come back?
Per-file status, output URL, and any failures with reasons.
Is there a daily quota?
Soft concurrency limits apply; contact us to raise them for large catalogs.
Keep exploring