C.W.K.
Stream
Lesson 02 of 07 · published

Hardcoding Subtitles (Burn-In)

~10 min · subtitles, burn, hardcode

Level 0Viewer
0 XP0/73 lessons0/15 achievements
0/100 XP to next level100 XP to go0% complete

When to burn subtitles into the picture

Hardcoded subs are pixels — they can't be turned off. Use them when:

  • The destination platform doesn't support sidecar subtitles (some social platforms).
  • You need exact font / color / positioning that softsubs can't carry.
  • You're shipping a 'always-on' caption version (TikTok-style).

Two filters

  • subtitles=file.srt — burns SRT/ASS/SSA into the video. Honors ASS styling.
  • ass=file.ass — explicit ASS rendering. Same backend.

Code

Burn-in recipes·bash
# Plain SRT burned in (default white text with black outline)
ffmpeg -i in.mp4 \
  -vf "subtitles=captions.srt" \
  -c:v libx264 -crf 20 -preset slow \
  -c:a copy \
  burned.mp4

# Custom font + size for SRT (force_style overrides)
ffmpeg -i in.mp4 \
  -vf "subtitles=captions.srt:force_style='FontName=Arial,FontSize=28,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=2,Shadow=0,MarginV=50'" \
  -c:v libx264 -crf 20 -preset slow \
  -c:a copy \
  styled.mp4

# ASS file with all its styling preserved
ffmpeg -i in.mp4 \
  -vf "ass=fancy.ass" \
  -c:v libx264 -crf 20 -preset slow \
  -c:a copy \
  ass_burn.mp4

External links

Exercise

Take any video and a SRT file. Burn the SRT into the video with default styling. Then re-burn with custom force_style — bigger font, yellow text, larger outline, lower vertical margin. Compare the two outputs. Bonus: convert your SRT to ASS in Aegisub, add a color/position effect, burn that in too.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.