Hard-code an SRT, VTT or ASS file into a video with one POST /v1/ffmpeg call to ReelSDK: 30 seconds of 1080p costs under half a cent at $0.02 per compute minute. Send the video and subtitle URLs plus a force_style.

Burn subtitles API

Yes: one request hard-codes the text in any of ReelSDK's 10 bundled fonts, Japanese, Chinese and Korean included, and a half-minute 1080p clip needs about 13 seconds of compute.

Use casesUpdated

subtitled.mp4: 5 cues from subs.srt burned into a 30-second 1080p clip in Poppins Black.Input: launch.mp4subtitled.mp4 (15.9 MB)subs.srt

The request

POST /v1/ffmpeg

Hard-code an SRT, ASS or VTT file into a video with one ffmpeg call and 10 bundled fonts, for well under a cent a clip.

terminalTry it
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
  -H "Authorization: Bearer $REELSDK_KEY" \
  --json '{
    "inputs": {
      "launch.mp4": "https://api.reelsdk.com/f/lib/in/use-cases/launch.mp4",
      "subs.srt": "https://api.reelsdk.com/f/lib/in/use-cases/subs.srt"
    },
    "args": [
      "-i", "launch.mp4", "-vf",
      "subtitles=subs.srt:fontsdir=/usr/share/fonts/reelsdk:force_style='\''FontName=Poppins Black,FontSize=22,Outline=2,MarginV=24'\''",
      "-c:v", "libx264", "-crf", "20", "-preset", "veryfast", "-c:a", "copy",
      "-movflags", "+faststart", "subtitled.mp4"
    ],
    "outputs": ["subtitled.mp4"]
  }'
request.mjsTry it
const res = await fetch("https://api.reelsdk.com/v1/ffmpeg?wait=60", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.REELSDK_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "inputs": {
      "launch.mp4": "https://api.reelsdk.com/f/lib/in/use-cases/launch.mp4",
      "subs.srt": "https://api.reelsdk.com/f/lib/in/use-cases/subs.srt"
    },
    "args": [
      "-i", "launch.mp4", "-vf",
      "subtitles=subs.srt:fontsdir=/usr/share/fonts/reelsdk:force_style='FontName=Poppins Black,FontSize=22,Outline=2,MarginV=24'",
      "-c:v", "libx264", "-crf", "20", "-preset", "veryfast", "-c:a", "copy",
      "-movflags", "+faststart", "subtitled.mp4"
    ],
    "outputs": ["subtitled.mp4"]
  }),
});
const { job } = await res.json();
response.json
{
  "job": {
    "id": "job_fgs25o2ulme85i0y9lzn",
    "op": "ffmpeg",
    "status": "succeeded",
    "stage": null,
    "created_at": "2026-11-07T01:20:08.740Z",
    "finished_at": "2026-11-07T01:20:23.779Z",
    "outputs": {
      "subtitled.mp4": "https://api.reelsdk.com/f/out/job_fgs25o2ulme85i0y9lzn/subtitled.mp4?s=..."
    },
    "result": null,
    "duration_s": 30,
    "error": null,
    "usage": {
      "output_seconds": 30,
      "audio_seconds": 0,
      "tts_characters": 0,
      "images": 0
    },
    "poll_url": "https://api.reelsdk.com/v1/jobs/job_fgs25o2ulme85i0y9lzn"
  }
}

Setting up the subtitles filter

In the command above, -vf subtitles=subs.srt reads subs.srt straight from the files you passed in inputs. By itself, an srt file has no styling, so fontsdir=/usr/share/fonts/reelsdk points the filter at the 10 bundled fonts on the worker, and force_style sets FontName=Poppins Black, FontSize=22, Outline=2 and MarginV=24.

If you already have an ass file with its own fonts, colors and positioning baked in, swap subtitles for the ass filter so it keeps its styles instead of overriding them with force_style. Because burning text into the frames only touches the video stream, the command re-encodes the video with -c:v libx264 -crf 20 -preset veryfast and uses -c:a copy so the AAC audio track is copied over untouched.

WebVTT and ASS files go through the same filter: test runs with subtitles=subs.vtt and subtitles=subs.ass burned the same 5 cues. An ASS file brings its own styles, and force_style overrides them.

  • FontName=Poppins Black picks one of the 10 bundled fonts in /usr/share/fonts/reelsdk: Anton, Bebas Neue, Montserrat Black and ExtraBold, Poppins Bold, ExtraBold and Black, and Noto Sans JP, SC and KR Bold.
  • FontSize=22 and Outline=2 set the text size and the black border thickness around each letter.
  • MarginV=24 sets the vertical margin from the bottom edge of the 1920x1080 frame.

At a glance

Ways to burn subtitles into a video

Ways to burn subtitles into a video
OptionPriceLimitsWhat you run
ffmpeg on your own machineFree; LGPL 2.1 or later, or GPL 2 or later with GPL libraries such as libx264Your CPU, disk and bandwidthffmpeg builds, a job queue, storage
AWS Lambda with an ffmpeg layer$0.0000166667 per GB-second plus $0.20 per 1M requests (x86, US East)900 s per run, 10,240 MB memory and /tmp, 250 MB of code and layers, 6 MB sync payloadThe layer, S3 in and out, retries
FFmpeg Micro1 token per 10 s of input, 500 tokens for $5; this 30 s input: 3 tokens, $0.03100 MB input on the free plan, 1,024 MB on Starter and ProAPI calls
ReelSDK$0.02 per compute minute; under half a cent for this 30 s input500 MB per file, 1 GB per job, 10 minutes of run timeOne HTTP call

Sources: FFmpeg license and legal, AWS Lambda quotas, AWS Lambda pricing, FFmpeg Micro pricing, checked November 2026.

When you don't have a subtitle file yet

POST /v1/ffmpeg expects a finished srt, vtt or ass file in inputs. If all you have is the raw video, use POST /v1/captions instead.

That endpoint transcribes the speech in the video and burns styled word-by-word captions directly into the output MP4 in one call. It also returns the generated srt, vtt and ass files alongside the video, and costs $0.03 per output minute.

Cost, fonts and limits

This job billed about 13 seconds of compute to fetch the inputs, burn the text into the 30-second video and store subtitled.mp4, which comes to under half a cent at $0.02 per compute minute. Machine start-up isn't billed, jobs are billed per second with a 1 s minimum, and failed jobs cost $0.

The /usr/share/fonts/reelsdk directory includes Noto Sans JP, SC and KR Bold alongside the Latin fonts, so Japanese, Chinese and Korean subtitles render out of the box without uploading a font file.

What it costs

What this job cost

Compute: fetching the inputs, running ffmpeg and storing the file
12.7 s
Rate
$0.02 per compute minute
Charged
$0.0042

Billed per second with a 1 s minimum. Machine start-up is not billed, and failed jobs cost $0.

Limits

What one request takes

Input files
500 MB each, 1 GB per job
Job run time
Up to 10 minutes
Subtitle files
srt, ass, vtt
Fonts
10 bundled, Latin, Japanese, Chinese and Korean
Waiting for a result
60 s by default, up to 300 s
Output retention
7 days

How it works

From request to file

  1. Host the input

    Any public http or https URL on the default port works, as long as it has no username or password in it; ReelSDK downloads it before ffmpeg starts. A local file goes up with POST /v1/uploads?filename=clip.mp4 first: up to 100 MiB per upload, kept 7 days, and larger files go up as a multipart upload.

  2. Send the arguments

    subtitles=subs.srt reads the file listed under inputs. fontsdir=/usr/share/fonts/reelsdk points at the bundled fonts, and force_style sets the font, size, outline and margin. The video is re-encoded with the text in it, and -c:a copy keeps the sound.

  3. Download the result

    Every file is listed under job.outputs, and the links work for 7 days, so copy what you keep. For long jobs, send ?wait=0 with a webhook_url and fetch GET /v1/jobs/{id} when the webhook arrives.

FAQ

Questions, answered

Can I use my own font file instead of the 10 bundled fonts?

Yes. Pass your .ttf or .otf file by public URL in the inputs object alongside launch.mp4 and subs.srt (POST /v1/uploads doesn't take font files), and point fontsdir=. at the working directory in your POST /v1/ffmpeg args. Then set FontName in force_style (or inside your ass file) to match the family name inside that font file. A job can take up to 50 inputs, so you can pass several font weights at once if your subtitle file switches styles.

How do I change the output video quality or file size?

This run used -c:v libx264 -crf 20 -preset veryfast and turned an 18.6 MB 1080p input into a 15.9 MB output. Because args is handed straight to ffmpeg 8.1, you can raise -crf for a smaller file, lower it for higher quality, or change -preset veryfast if you want to trade compute time for compression efficiency. Keep -c:a copy so you don't spend compute re-encoding the audio stream, and -movflags +faststart so the returned MP4 starts playing right away in a browser.

How does the cost compare to FFmpeg Micro and AWS Lambda?

On ReelSDK this 30-second video billed about 13 seconds of compute, under half a cent at $0.02 per compute minute, and new accounts start with $0.50 of free credit. FFmpeg Micro charges 1 token per 10 seconds of input (500 tokens for $5 on top-ups), so a 30 s input costs 3 tokens, or $0.03, and its free plan caps inputs at 100 MB. On AWS Lambda you pay $0.0000166667 per GB-second plus $0.20 per 1M requests.

Ready to build?

Ship video from your app today

Your first $0.50 is free, and one key covers every endpoint.

Moonlit lake with a lit cabin under the mountains