Rendered by the captions.js engine, not a mock-up.

Midnight Serif caption style

Midnight Serif is a free animated caption style for captions.js: Playfair Display bold, the spoken word in #f3ca72, with the "box" word animation at the bottom of the frame. Use it live in the browser or burn it into an MP4 with FFmpeg.

Use it

Browser: overlay on a <video>
import captionsjs, { getPreset } from "captions.js";

captionsjs({
  video: document.querySelector("video")!,
  captions, // word timings: see the Whisper and Deepgram guides
  preset: getPreset("Midnight Serif"),
});
Burn into an MP4 (needs ffmpeg)
npx captions.js burn video.mp4 words.json --preset "Midnight Serif"

No servers? Render it through the captions.js Cloud API (early access).

Node.js
import { burnCaptions } from "@captionsjs/server";

await burnCaptions({ video: "video.mp4", captions: "words.json", preset: "Midnight Serif" });

Style details

FontPlayfair Display, bold
CaseAs spoken
Text color#f7f4ed
Active word#f3ca72
Outline#0f1324
Shadow#0f1324
Animationbox
Positionbottom
Lines on screen2

Box: A colored box sits behind the current line, keeping the text readable over busy footage.

Make it yours

A preset is a plain object. Clone it and change colors, font or animation; the browser and the FFmpeg render both take the result.

const base = getPreset("Midnight Serif");
const mine = {
  ...base,
  captionsSettings: {
    ...base.captionsSettings,
    style: { ...base.captionsSettings.style, highlightColor: "#ff2e88" },
  },
};

More box styles

All caption styles