Tutorial · Python · ~6 min
How to Upscale Video in Python
Turn a 480p clip into a 4K master in about five minutes — sample footage included, no GPU on your side.
What you'll build
480p source → 4K output with the cloud sample archive-480p.mp4.
Step 1 — Get your API key
- Sign up (free tier included)
- Copy the key from the dashboard
- pip install mlslabs
Step 2 — Submit the job
scene_mode=anime keeps line art clean for stylized content; enhancement=conservative trades a little detail for maximum artifact safety.
Python
import mlslabs
client = mlslabs.Client("YOUR_API_KEY")
job = client.super_resolution.submit(
input_url="s3://bucket/archive-480p.mov",
output_url="s3://bucket/upscaled/",
scale=4,
target_resolution="2160p",
scene_mode="auto", # auto | anime | film
enhancement="full", # full | conservative
denoise=0.4,
detail=0.6,
)
print(job.job_id)Step 3 — Poll for the result
Python
job.wait()
print(job.status) # done | failedStep 4 — Download and verify
Bash
curl -L -o out-4k.mp4 <output_url>
ffprobe -show_streams out-4k.mp4 | grep -E "width|height"
# => width=3840 height=2160Go further
- Batch-upscale a whole catalog
- Migrate from Real-ESRGAN
- Chain: upscale → SDR2HDR for a full remaster
Keep exploring