Exports and subtitle files
How do I burn styled ASS subtitles into a video with FFmpeg?
Short answer
Use FFmpeg's ass or subtitles video filter, which draws the subtitles onto every frame with libass: ffmpeg -i input.mp4 -vf ass=captions.ass -c:a copy output.mp4. The ASS file keeps its fonts, colors, position and animation, but the fonts must be installed or passed with the fontsdir option. Burning re-encodes the video, so keep a copy of the original.
3 min read
What command burns an ASS file into a video?
ffmpeg -i input.mp4 -vf "ass=captions.ass" -c:a copy output.mp4
-vf "ass=captions.ass"draws the subtitles onto the video with libass.-c:a copykeeps the audio as it is. The video is always re-encoded, because the subtitles become part of the picture.
If the fonts used in the ASS file are in a folder, point FFmpeg to it:
ffmpeg -i input.mp4 -vf "ass=captions.ass:fontsdir=./fonts" -c:a copy output.mp4
Both filters need an FFmpeg build with libass, configured with --enable-libass; most packaged builds include it (FFmpeg filters documentation).
What's the difference between the ass and subtitles filters?
- ass renders an ASS file exactly as styled.
- subtitles accepts other formats too, such as SRT, converting them to ASS first. With SRT you can set a style with
force_style, for examplesubtitles=captions.srt:force_style='FontName=Montserrat,FontSize=24'(FFmpeg filters documentation).
Use ass for a styled ASS file; use subtitles with force_style when you only have SRT.
Why do my fonts or styles look wrong?
- Missing fonts. An ASS file names its fonts but doesn't contain them. If a font isn't installed or in
fontsdir, libass picks a substitute. Install the fonts or pass the folder. - Different video size. ASS positions and sizes are set for a specific canvas. Burn the file into the video it was made for.
- Unsupported effects. Some players support only part of the ASS format; libass, which FFmpeg uses, supports most of it.
- Wrong timing. If you trimmed the video after making the ASS file, the captions drift; make a new file from the final cut.
How to do it with CaptionBolt
CaptionBolt exports styled ASS files for FFmpeg workflows, built with the same compiler it uses for its own burned-in captions, or a finished MP4 if you don't need FFmpeg at all.
- Upload your video, choose a style and check the text in the Text Editor.
- Download the ASS file. ASS is included in Pro and Max.
- Install the fonts the style uses. Built-in styles use fonts such as Montserrat, Anton or Poppins, which are free on Google Fonts. If you use your own uploaded font, install that font file too.
- Run the FFmpeg command above on the same video you uploaded.
If you just need the captioned video, export the MP4 from CaptionBolt instead; it already has the captions burned in. See which subtitle files CaptionBolt can export.
When another approach is better
- You're editing in Premiere Pro, DaVinci Resolve or Final Cut Pro. They don't import ASS; use SRT or the captioned MP4. See how to get captions into editing apps.
- You want viewers to be able to turn captions off. Keep the subtitles as a separate track instead of burning them in.
Related questions
Can I upload an SRT file to TikTok, Instagram, YouTube or LinkedIn?
YouTube, LinkedIn and Facebook accept SRT files; TikTok and Instagram don't take a subtitle file and generate their own captions instead. For TikTok, Reels and Shorts you also post elsewhere, burn the captions into the video so they look the same everywhere, and keep the SRT for YouTube and LinkedIn, where viewers can turn captions on and off.
How do I add an SRT file to my video?
Decide whether viewers should be able to turn the captions off. To keep them optional, upload the SRT next to the video on YouTube, LinkedIn or Facebook, or add it as a subtitle track in a player or video file. To make them permanent, burn the SRT into the picture with HandBrake, FFmpeg or an editing app. TikTok and Instagram don't accept subtitle files, so burn the captions in for those.
How do I convert an SRT file to VTT, or VTT to SRT?
Change three things: VTT files start with a WEBVTT line, use a period before the milliseconds instead of a comma, and can carry cue settings and notes that SRT doesn't support. A converter does this in seconds without touching the text or timing. Renaming the file isn't enough. Use VTT for web players and HTML5 video; use SRT for LinkedIn, Facebook and most editing apps.
How do I create an SRT subtitle file from my video?
Let speech recognition write a first draft, then correct it and export SRT. If the video is on your YouTube channel, YouTube Studio can download its captions as a file for free. Otherwise use a caption or transcription tool that exports SRT, such as CaptionBolt on the Pro plan, or type the captions yourself in a subtitle editor. Always check names, numbers and timing before you use the file.