Hardcoded subtitles

Burn subtitles into a video, on your Mac.

Burning in draws the text into the picture itself, so it shows everywhere and can never be switched off. On a Mac the dependable free route is one ffmpeg command: ffmpeg -i video.mp4 -vf "subtitles=captions.ass" -c:a copy out.mp4. Give it an ASS file and your font, colour, position and word highlighting come through almost exactly as designed.

Get the Mac app — $9.99 → Try it free in your browser
Before you start

Burned in, or a separate file?

Burning in cannot be undone and costs a re-encode, so it is worth thirty seconds to be sure you want it.

Subtitles come in two forms. Soft subtitles are a separate file — an SRT or VTT — that the player draws on top of the video. Viewers can switch them off, you can fix a typo without touching the video, and one video can carry several languages. Burned-in (or hardcoded) subtitles are part of the pixels. They look exactly the same in every player, on every phone, in every feed, and nobody can switch them off — or correct them, including you.

Burn in when the look is the point or when there is nowhere to put a separate file: short-form social clips with styled captions, a video playing silently in a presentation or on a screen in a shop, a cut you are sending to someone who will open it in whatever player they have. Keep them soft when the platform accepts a subtitle upload, as YouTube does, or when the video may need corrections or a second language later — adding an SRT to an MP4 shows how to embed one as a switchable track without re-encoding.

Either way, keep the subtitle file. A burned-in video plus its source file can always be re-rendered; a burned-in video on its own is the end of the line.

Step 1 — get ffmpeg

ffmpeg is free and does the actual rendering. The simplest install on a Mac is through Homebrew:

brew install ffmpeg

Burning in uses ffmpeg's subtitles filter, which is built on libass, the same renderer many players, such as mpv and VLC, use for styled subtitles. Check your build has it:

ffmpeg -hide_banner -filters | grep subtitles

If that prints a line for subtitles, you are ready.

Step 2 — make the subtitle file

ffmpeg will burn in an SRT, but SRT is the wrong source for a burn-in. It was designed as words and timestamps, so libass draws it in a default face and size, and anything more deliberate — a box behind the text, an outline, an exact position, a highlighted word — has nowhere to live in the file. Advanced SubStation (.ass) was built for exactly this: the font, size, colours, outline or box, position and per-word timing are all part of the file, and libass draws them as written — with one exception, the box, covered under the four problems below. The ASS subtitle file shows what one looks like inside.

This is the part suubbs does. Drop the video in, press Generate, fix whatever was misheard, style the captions against a live preview, and export Advanced SubStation. The style is kept in the document rather than in the preview's own CSS, so the file says what the preview showed:

Step 3 — burn it in

Put the video and the .ass file in one folder, open Terminal there, and run:

ffmpeg -i video.mp4 -vf "subtitles=captions.ass" -c:v libx264 -crf 18 -preset slow -c:a copy out.mp4

What each part does:

On a long video, the Mac's hardware encoder is usually much faster, at the cost of a somewhat larger file for the same quality:

ffmpeg -i video.mp4 -vf "subtitles=captions.ass" -c:v h264_videotoolbox -b:v 10M -c:a copy out.mp4

Before committing to a long encode, preview the result live with ffplay, which comes with ffmpeg: ffplay -vf "subtitles=captions.ass" video.mp4.

When it goes wrong

The four problems everyone hits.

All four are quiet — ffmpeg finishes, and the result is just not what you designed.

The font is wrong

An ASS file names its font; it does not contain it. libass looks the name up among the fonts installed on the machine running ffmpeg and silently substitutes another if it is missing. suubbs' presets use Inter, Inter Tight and Georgia — Georgia ships with macOS, and Inter and Inter Tight are free fonts from Google Fonts. Install them, or point ffmpeg at a folder holding the font files:

ffmpeg -i video.mp4 -vf "subtitles=captions.ass:fontsdir=./fonts" -c:a copy out.mp4

The background box is missing

If you chose the Box treatment — the default look — check the burn-in for its box. ASS draws a box (BorderStyle 3) using the Outline column as its padding and OutlineColour as its colour, and suubbs currently exports that style with an Outline of 0 and the box colour in BackColour. Burned in with ffmpeg 6.1 and libass 0.17, the result with the default Color word highlight is white text with no box behind it at all. Until the export is fixed, add the box at burn-in time: copy the fourth colour on the file's Style: line (the BackColour, &H14100B0C for the default near-black) into a force_style override, with a few pixels of padding:

ffmpeg -i video.mp4 -vf "subtitles=captions.ass:force_style='OutlineColour=&H14100B0C,Outline=8'" -c:a copy out.mp4

That override is reliable with Word highlight set to Color or Off. With the Box highlight, or with words or lines given their own colours, the exported lines carry their own border tags, which take precedence over force_style and already draw a partial box in the outline colour, so check a frame before you render the whole video. The box comes out as a plain rectangle either way: the preview can round its corners, but ASS has no radius setting. If the rounding or the exact colour matters, use an outline or a soft shadow instead; both burn in as previewed.

"No such file" for a file that exists

The path inside subtitles=… goes through ffmpeg's filter parser, which treats colons, commas, quotes and backslashes as syntax. A path with spaces or punctuation in it — very common in a Mac's folders — fails confusingly. Running from the folder that holds the file and using a plain filename like captions.ass sidesteps all of it.

The captions are out of step

Check the subtitle file against the video in a player before burning — a timing fault baked into pixels is a re-render to fix. If every line is off by the same amount, or the gap grows through the video, fix the sync in the file first.

Other routes

If you would rather not use Terminal.

Every route below draws text into pixels. What differs is how much of your styling survives.

One plain limitation, stated here so nobody finds it after buying: suubbs does not have a one-click burn-in button. It makes the subtitle file — transcribed, corrected, timed to the word and styled — and ffmpeg draws it. Nothing in the chain uploads your video: the transcription runs on your own Mac and so does the encode.

Burn-in questions

Asked every time.

Short answers, including the irreversible part.

Can I remove burned-in subtitles later?

No. They are part of the picture, the same as anything else that was filmed. Keep the original video and the subtitle file so you can re-render with changes.

Does burning in subtitles lower the video quality?

It re-encodes the picture, which is a second generation of compression. At CRF 18 with libx264 the loss is hard to see. Copying the audio with -c:a copy means the sound is not touched at all.

Can ffmpeg burn in an SRT file?

Yes — use subtitles=captions.srt. It renders in the default libass look, because SRT has nowhere to keep a style. For a box, outline, exact position or word highlighting, burn in an ASS file instead.

Can I burn in word-by-word highlighted captions?

Yes, from an ASS file that carries them. suubbs writes each word interval as its own event with the spoken word highlighted, and ffmpeg renders that like any other ASS file.

Why does my burned-in caption use the wrong font?

libass substitutes a different face when the named font is not installed on the machine running ffmpeg. Install the font, or add :fontsdir= with a folder of font files to the subtitles filter.

Does it work for vertical video?

The command is identical. What changes is placement: TikTok, Reels and Shorts draw buttons and text over the lower part of the frame, so a caption placed for widescreen can end up underneath them.

Keep reading

Related

Style it here. Burn it anywhere.

[ffmpeg -vf subtitles=captions.ass]