Process video with Python
Use the rendobar package to call Rendobar's FFmpeg API, Compose API and every other job type from Python 3.10 or later, sync or asyncio. It waits for the output and verifies webhook signatures.
from rendobar import Rendobar
with Rendobar() as rb: # reads RENDOBAR_API_KEY # Each input name is a file the command reads with -i. job = rb.jobs.run({ "type": "ffmpeg", "inputs": {"source.mp4": "https://cdn.rendobar.com/assets/examples/sample.mp4"}, "params": {"command": "ffmpeg -i source.mp4 -vf scale=1280:-2 -c:v libx264 -crf 23 out.mp4"}, })
# run() raises JobFailedError if the job fails, so this is a JobComplete.print(job.output.files[0].url) # signed URL of out.mp4Overview
Install rendobar and every Rendobar job becomes a typed call from Python: FFmpeg commands, timeline videos, captions and AI images. rb.jobs.run submits a job and waits until it completes, fails or is cancelled, following the job's own time limit from your plan. A retried submit never creates a second job, because each jobs.create call carries one idempotency key across its retries. Errors are typed, from NotFoundError to RateLimitError, and each carries the request id support asks for. AsyncRendobar has the same methods for asyncio, and rendobar.webhooks.verify checks a delivery's signature.
Set up
Install
Add the package and put a new API key in
RENDOBAR_API_KEY.pip install rendobarCreate a client
Make one client and reuse it. It reads RENDOBAR_API_KEY and retries 429 and 5xx responses twice.
rb = Rendobar()Run a job
rb.jobs.runsubmits the job and returns it once it ends. It raises JobFailedError if the job fails.job = rb.jobs.run({"type": "ffprobe", "params": {"command": "https://cdn.rendobar.com/assets/examples/sample.mp4"}})
Questions
Which Python versions does the rendobar package support?
Python 3.10 to 3.13, each tested in CI. A version is dropped only after its end of life.
Does the Python SDK support asyncio?
Yes. AsyncRendobar has the same methods as Rendobar, awaited, including jobs.run, jobs.wait and jobs.list_all as an async iterator.
What happens when a submit is retried?
The SDK sends the same idempotency key on every retry of one jobs.create call, so the API returns the job the first attempt created instead of starting a second one.
How do I verify a Rendobar webhook in Python?
Call rendobar.webhooks.verify with the raw body, the headers and your secret. It rejects deliveries older than 5 minutes and accepts the previous secret during a rotation.
Related
- TypeScript SDK Submit any job and await the finished file with one typed call.
- NestJS Inject a Rendobar client and guard your webhook routes.
- Go SDK Run any job from Go, with typed errors and webhook checks.
