Burn subtitles with ffmpeg: the command with size, outline and margin
One ffmpeg command that burns an SRT into a 9:16 video with white text, a dark outline and the block held above the platform UI, plus the check that your ffmpeg build can run it at all.
ffmpeg -i in.mp4 -vf "subtitles=subs.srt:force_style='FontName=Arial,FontSize=11,Bold=1,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,Outline=2,Shadow=0,BorderStyle=1,Alignment=2,MarginV=60,MarginL=20,MarginR=20'" -c:v libx264 -crf 20 -pix_fmt yuv420p -c:a copy -movflags +faststart out.mp4 What each parameter does: - FontSize=11, MarginV=60: ffmpeg gives an SRT a 384x288 script resolution, so these are in that scale and stretch to the frame height. MarginV=60 puts the text bottom about 20 percent up the frame; FontSize=11 is about 4 percent of the height (roughly 73 px on a 1920 px frame). Adjust by eye on a phone. - PrimaryColour / OutlineColour: ASS colours are &HAABBGGRR; &H00FFFFFF is opaque white, &H00000000 opaque black. - Outline=2, Shadow=0, BorderStyle=1: an outline in script units, no drop shadow, no box. - Alignment=2: bottom centre (numpad layout: 2 bottom, 5 middle, 8 top). - MarginL / MarginR: keeps long lines off the edges on a narrow frame. - -c:a copy: the audio is untouched; only the picture is re-encoded, which burning requires. Preview 10 seconds before the full run: ffmpeg -t 10 -i in.mp4 -vf "subtitles=subs.srt:force_style='FontSize=11,Outline=2,MarginV=60,Alignment=2'" -c:a copy preview.mp4
Paste into your assistant as the first message of a new chat; fill the braces first.
Steps
- Check the build: `ffmpeg -filters | grep -w subtitles`. Homebrew's default ffmpeg on a Mac is built without libass and the filter is missing (checked 2026-10-25); `brew install ffmpeg-full` and use `/opt/homebrew/opt/ffmpeg-full/bin/ffmpeg`.
- Clean the SRT first (glossary, merged cues, 2 lines of about 32 characters). The filter wraps long lines on its own and does it badly.
- Render the 10-second preview, open it on a phone in the platform preview, adjust MarginV then FontSize, then run the full file.
- If the SRT path has spaces or colons, rename the file; escaping them inside the filter string is where most 'file not found' errors come from.
Tips
- This is the one re-encode you cannot avoid when the picture changes; a trim, an audio swap or an outro should be a stream copy, never a re-encode.
- Use a .ass file instead of .srt when you need per-cue position or two styles (a speaker and a label); the same filter reads it and force_style still applies as the default.
| works with | ffmpeg: A terminal command you run yourself. |
| skill | npx skills add fortunto2/solo-factory --skill solo-video-edit · skill page · source |
| cost | Free. No API, no key. |
| status | Unverified: written from the technique, not yet run end to end by us. |
| license | CC BY 4.0 for the text here; skills are MIT. |
| updated | 2026-11-10 |
| for agents | ffmpeg-burn-in-subtitles-command.md |
Related
Burned subtitles for 9:16: position, lines, characters, colour, as parameters
Settings for subtitles burned into vertical video for muted feeds: above the platform UI, two lines, about 32 characters each, white with a dark outline. Starting values, checked on a phone.
SRT cleanup: fix names from a glossary, merge short cues, cap line length
An agent prompt that takes a raw speech-to-text SRT and returns one you can publish: names fixed from your glossary, sub-second cues merged, lines wrapped at a character cap, timings untouched.
Beat times and downbeats from a song in Node, with life2film-engine
A short Node script that decodes a song with ffmpeg and prints BPM, beat times and downbeats on your machine, ready to place cuts on. No upload, no API key.
Find the cuts in a video with ffmpeg's scene filter
One ffmpeg command that lists the timestamps where the picture changes, how to set the threshold, and why phone footage often has no cuts to find.
Cut a vertical reel to a song with real beats (/solo-music-reels-cut)
Footage plus a music track becomes a 1080x1920 reel: beats and phrases detected for real, cut density that follows verse and chorus, 14 ffmpeg effects, a flash on every downbeat.
Accessible on-screen text: contrast, the bottom 20 percent, no flashing
A checklist for text that everyone can read, including people watching muted, on a small screen, in sunlight, or with photosensitivity. Eight checks, each with the parameter to test against.