subtitles=subs.srt burns an SRT into the picture, and force_style sizes are on a 384x288 canvas: FontSize=12 is 80 px on 1080x1920. ReelSDK runs it for $0.02 per compute minute, or transcribes and burns captions at $0.03 per output minute.
Burn subtitles into a video with ffmpeg
libass paints the SRT into every frame, so our 11-second clip was re-encoded at CRF 20 while its audio was copied. ReelSDK bundles fonts like Anton and Montserrat Black for it; a soft mov_text track skips the re-encode and adds a few hundred bytes.
GuidesUpdated
ffmpeg -i in.mp4 -vf "subtitles=subs.srt:fontsdir=fonts:\
force_style='FontName=Montserrat Black,FontSize=12,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=1.2,Shadow=0,MarginV=60'" \
-c:v libx264 -crf 20 -c:a copy burned.mp4Montserrat Black, white with a thin black outline, 400 px up from the bottom. The video is re-encoded; the audio is copied.
Variations
The other commands you will need
Soft subtitles instead
Adds the SRT as a track the viewer can turn on and off. Nothing is re-encoded, and the file grows by a few hundred bytes.
soft ffmpeg -i in.mp4 -i subs.srt -map 0 -map 1 -c copy -c:s mov_text \ -metadata:s:s:0 language=eng soft.mp4Convert to ASS to style by hand
Writes the cues with a default style block you can edit, then burn with the
assfilter.ass ffmpeg -i subs.srt subs.ass ffmpeg -i in.mp4 -vf "ass=subs.ass:fontsdir=fonts" -c:v libx264 -crf 20 -c:a copy ass.mp4
The flags
The options in these commands
| Flag | What it does | Used here |
|---|---|---|
subtitles=subs.srt | Draws the subtitle file onto every frame with libass | Burn |
fontsdir=fonts | Folder to load fonts from; on the API, /usr/share/fonts/reelsdk | Burn, ASS |
force_style='...' | Overrides the default style, comma-separated | Burn |
FontName=Montserrat Black | Font family name, not the file name | Burn |
FontSize=12 | Size in style units: 80 px on this 1920-pixel-tall video | Burn |
PrimaryColour=&H00FFFFFF | Text color as &HAABBGGRR; 00 alpha is opaque | Burn |
BorderStyle=1, Outline=1.2 | An outline around the letters, 1.2 units wide; 3 draws a box | Burn |
MarginV=60 | Distance from the bottom edge in style units: 400 px here | Burn |
-c:s mov_text | The subtitle codec MP4 can hold | Soft |
-metadata:s:s:0 language=eng | Language tag players show in their menu | Soft |
Source: ffmpeg filters: subtitles, checked November 2026.
Why FontSize=12 is 80 pixels
An SRT has no canvas size. When ffmpeg converts it for libass it uses a 384x288 canvas, and every size and margin is scaled from that to the real frame. On a 1920-pixel-tall video one unit is about 6.7 px, so FontSize=12 asks for 80 px and MarginV=60 puts the text 400 px up.
We measured it: one line of Montserrat Black sat just over 400 px above the bottom edge, as the scale predicts. That is why sizes copied from a desktop player look huge on vertical video. Pick small values and check a frame.
Colors are backwards
ASS colors are written &HAABBGGRR: alpha, blue, green, red. &H0000FFFF looks like cyan if you read it as RGB, but it rendered yellow in our test. Alpha is reversed too: 00 is opaque and FF is invisible.
For a box behind the text instead of an outline, use BorderStyle=3 and set the box color with BackColour. With BackColour=&H80000000 we got a half-transparent black box behind the line.
Fonts must be findable
FontName is the family name the font reports, such as Montserrat Black, not the file name. libass searches the system fonts and the fontsdir folder; if the name does not match, it falls back to another font without an error. Keep the .ttf files next to the job and point fontsdir at them.
On the API, Anton, Bebas Neue, Montserrat Black and ExtraBold, Poppins Bold, ExtraBold and Black, and Noto Sans JP, SC, KR, Arabic, Hebrew, Thai, Devanagari, Lao and Myanmar in Bold are installed. A frame from the API output matched our local render, with the caption in the same place at the same size.
Cutting and burning in one command
Put -ss 3 before -i and the video starts at 0 again, but the SRT still starts at its own 0. Our frame at 3 s showed the first cue, which ends before 2 s. Put -ss after -i, or add -copyts, and the right cue appears. Or cut first and burn second.
Burned or soft
Burned subtitles are part of the picture: they show in every player and every app, and nobody can turn them off or fix a typo later. Soft subtitles are a separate track: the player must support it and the viewer must switch it on. For social video, burn them. For a video library with several languages, ship soft tracks.
Without installing ffmpeg
The same command as one API call
Send the same args to POST /v1/ffmpeg with the video and the SRT in inputs. The subtitles filter is allowed, and the fonts we bundle sit in /usr/share/fonts/reelsdk. Each job runs ffmpeg 8.1 on a fresh machine at $0.02 per compute minute, billed per second; this one finished in about 16 seconds and cost under three quarters of a cent. No SRT yet? POST /v1/captions transcribes the speech and burns the captions in one call.
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"in.mp4": "https://api.reelsdk.com/f/lib/demo/clip.mp4",
"subs.srt": "https://api.reelsdk.com/f/lib/demo/subs.srt"
},
"args": [
"-i", "in.mp4", "-vf",
"subtitles=subs.srt:fontsdir=/usr/share/fonts/reelsdk:force_style='\''FontName=Montserrat Black,FontSize=12,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=1.2,Shadow=0,MarginV=60'\''",
"-c:v", "libx264", "-crf", "20", "-c:a", "copy", "burned.mp4"
],
"outputs": ["burned.mp4"]
}'FAQ
Questions, answered
How do I burn subtitles into a video with ffmpeg?
Run ffmpeg -i in.mp4 -vf subtitles=subs.srt -c:v libx264 -c:a copy out.mp4. Add force_style='FontName=...,FontSize=...' to change the look.
Why are my burned subtitles so big?
Sizes are scaled from a 384x288 canvas to your video. On 1920-pixel-tall video FontSize=12 is 80 px, so use smaller numbers than you would in a player.
Why are my subtitles out of sync after -ss?
With -ss before -i the video timestamps restart at 0 but the subtitle file does not. Put -ss after -i, add -copyts, or trim first and burn in a second step.
Can I burn subtitles with an API?
Yes. POST the same args to https://api.reelsdk.com/v1/ffmpeg with the video and SRT URLs in inputs. To make the subtitles from speech, use POST /v1/captions instead.
- Burn subtitlesHard-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.
- What is captioning?Captioning puts speech and key sounds on screen as synced text. Closed, open and burned-in captions, subtitles, and caption files.
- Add captions to a videoBurn word-by-word captions into a video for TikTok, Reels or Shorts and get SRT and VTT files back: free here, or one POST /v1/captions call.
- Add text to a video with ffmpeg drawtextDraw a title or a running clock on video with drawtext: font, size, a box behind it, position, timing and the colon you have to escape.
- Best free captioning appFree caption apps compared by watermark, export quality and limits: Clipchamp, CapCut, Kapwing, Descript, Captions and more.
- Add a watermark or logo to a video with ffmpegPut a PNG logo in a corner with overlay: scale it, make it semi-transparent, keep it off the edge, or show it only for the first seconds.
- Video to SRT APISend a video URL and get SRT and VTT subtitle files, a word-timed transcript and a captioned copy of the video back.
- Subtitle generatorMake SRT and VTT subtitles from a video, with a preview MP4: free here, or one POST /v1/captions call from your code.
- Subtítulos con FFmpegIncrusta un SRT en la imagen con el filtro subtitles y force_style, o añádelo como pista que se puede quitar, sin perder tildes ni eñes.
Sources, checked November 2026
Ready to build?
Ship video from your app today
Your first $0.50 is free, and one key covers every endpoint.
