FFmpeg recipe
FFmpeg: Burn Subtitles into a Video (Hard-Subs)
subtitles filter renders the SRT directly into the video pixels. The result has subtitles baked in, regardless of player settings.
Command
ffmpeg -i input.mp4 -vf "subtitles=subs.srt:force_style='Fontsize=28,PrimaryColour=&Hffffff&,OutlineColour=&H000000&'" -c:v libx264 -crf 23 -c:a copy -y output.mp4Prefer no terminal?
Use the Subtitle Burner in your browser
What each flag does
| -i | Input file. Can be a video, audio, or image. Repeat for multiple inputs. |
|---|---|
| -vf | Video filter chain. e.g. scale=1280:720, crop=, fps=30. |
| -c:v | Video codec for output. e.g. libx264, libx265, libvpx-vp9. |
| -crf | Constant Rate Factor — quality target (lower = better, larger file). 23 is visually lossless for libx264. |
| -c:a | Audio codec for output. e.g. aac, libmp3lame, copy. |
| subtitles=subs.srt | Path to the SRT file. Also accepts ASS/SSA for advanced styling. |
| force_style | Inline ASS-style overrides: Fontsize, PrimaryColour, OutlineColour, Bold, Italic, etc. |
Notes & gotchas
- For ASS subtitles with embedded styling, you don't need force_style — the file controls appearance.
- On Windows, escape the colon in paths: subtitles=subs.srt → subtitles=subs.srt:fontsdir=...
Related recipes
Add watermark / logo · Any video
Add a PNG logo or watermark to a video with FFmpeg overlay filter. Position it in any corner with W and H math.
Trim · MP4
Trim an MP4 with FFmpeg using stream-copy for lossless, instant output. Copy-paste command with explanations.
Trim (frame-accurate) · MP4
Frame-accurate MP4 trim with FFmpeg. Re-encodes for exact-frame precision — use when -c copy keyframe snapping is not OK.
Convert MOV → MP4 · MOV → MP4
Convert MOV to MP4 with FFmpeg using H.264 video and AAC audio. CRF 23 default keeps quality visually identical.