Go SDK Official, built by Rendobar

Process video with Go

Use the rendobar-go module to call Rendobar's FFmpeg API, Compose API and every other job type from Go. It waits for the output and verifies webhook signatures.

View on pkg.go.dev Read the docs
main.go
rb := rendobar.New() // reads RENDOBAR_API_KEY
// Each input name is a file the command reads with -i.
job, err := rb.Jobs.Run(ctx, rendobar.CreateParams{
Params: rendobar.FfmpegParams{Command: "ffmpeg -i source.mp4 -vf scale=1280:-2 out.mp4"},
Inputs: map[string]rendobar.Input{"source.mp4": rendobar.URL("https://cdn.rendobar.com/assets/examples/sample.mp4")},
}, nil)
if err != nil {
return err // a failed job is a *rendobar.JobFailedError
}
fmt.Println(job.Complete.Output.File.URL) // signed URL of out.mp4

Overview

rendobar-go makes every Rendobar job a call from Go: FFmpeg commands, timeline videos, captions and AI images. Jobs.Run submits a job and waits until it ends, following the job's own time limit from your plan. A retried submit never creates a second job, because each Jobs.Create call sends one idempotency key on every retry. Errors are *rendobar.Error with the code, status and the request id support asks for, and Jobs.All ranges over every job with Go's iterators. The webhooks package checks a delivery's signature with the standard library only.

Set up

  1. Install

    Add the module and put a new API key in RENDOBAR_API_KEY.

    go get github.com/rendobar/rendobar-go
  2. Create a client

    Make one client and reuse it across goroutines. It retries 429 and 5xx responses twice, honouring Retry-After.

    rb := rendobar.New()
  3. Run a job

    Jobs.Run returns the finished job. A failed job comes back as *rendobar.JobFailedError with the job attached.

    job, err := rb.Jobs.Run(ctx, rendobar.CreateParams{Params: rendobar.FfprobeParams{Command: url}}, nil)

Questions

Which Go versions does rendobar-go support?

The two newest Go releases, the same window Go itself supports. CI runs on both.

How do I tell a missing job from other errors in Go?

Use rendobar.IsNotFound(err), or errors.As(err, &apiErr) with a *rendobar.Error to read its code, status and request id.

How do I verify a Rendobar webhook in Go?

Read the raw body and call webhooks.Verify(body, r.Header, secret). It rejects deliveries older than 5 minutes and accepts the previous secret during a rotation.

All integrations