Very Good FFmpeg
How it worksPricingCompareFAQDocs
Guide #8

Add subtitles with FFmpeg

Subtitles can be burned into pixels or attached as a selectable track. The right choice depends on platform support and whether viewers need control.

Copy + paste this:

Render captions directly into the video pixels.

ffmpeg -i input -vf subtitles=captions.srt -c:v libx264 -crf 23 -c:a copy subtitled.mp4

When this is the right tool

Start by checking whether this operation matches the job you actually need.

Use this when

3 Good fit
  • You need captions for accessibility, localization, or social clips.

  • A platform expects subtitle tracks or burned-in text.

  • You want speech content to work without sound.

Be careful when

2 Watch out
  • You burn subtitles before proofreading the caption file.

  • You need viewer-selectable languages but burn only one language into the video.

Examples

Use these as starting points, then tune quality, size, and timing on real input files.

Burn in SRT subtitles

Render captions directly into the video pixels.

ffmpeg -i input -vf subtitles=captions.srt -c:v libx264 -crf 23 -c:a copy subtitled.mp4

Command breakdown

input input
Reads this input file.
-vf subtitles=captions.srt
Applies a video filter chain.
-c:v libx264
Sets the video codec.
-crf 23
Controls visual quality. Lower values make larger, higher-quality files.
-c:a copy
Copies streams without re-encoding.
output subtitled.mp4
Writes this output file.

Attach soft subtitles

Add a selectable subtitle track to an MP4.

ffmpeg -i input -i captions.srt -c:v copy -c:a copy -c:s mov_text captioned.mp4

Command breakdown

input input
Reads this input file.
input captions.srt
Reads this input file.
-c:v copy
Copies streams without re-encoding.
-c:a copy
Copies streams without re-encoding.
-c:s mov_text
Sets the subtitle codec.
output captioned.mp4
Writes this output file.

Helpful tips

These details prevent most bad outputs and confusing FFmpeg results.

Burned-in subtitles always show

Burning text into the video works almost everywhere, but viewers cannot hide or switch it.

Soft subtitles stay separate

Attached subtitle tracks can be toggled, but support depends on the container and player.

Caption format matters

SRT is common. ASS gives more styling control for burned-in subtitles.

Related guides

Useful next steps when this operation is part of a larger workflow.

Trim video with FFmpeg

Learn FFmpeg trimming with fast stream-copy cuts, accurate re-encoded cuts, and timestamp basics.

Convert video format with FFmpeg

Learn how to convert MOV, MKV, WebM, and AVI files to MP4 with FFmpeg, when to copy streams, and when to re-encode.

Need to run this at scale?

Run the same FFmpeg commands through a hosted API.

Keep the FFmpeg command surface. Very Good FFmpeg handles machines, logs, long jobs, outputs, and webhooks.

Try free →Read API docs
Very Good FFmpegChecking status...
Product
  • How it works
  • Pricing
  • Comparison
  • FAQ
Developers
  • Documentation
  • API Reference
  • MCP Server
  • TypeScript SDK
  • Python SDK
Company
  • Contact
  • Sign in
  • Sign up
Legal
  • Terms
  • Privacy
Compare
  • vs Rendi
  • vs RenderIO
  • vs ffmpeg-api.com
  • vs FFmpeg Micro
  • vs AWS MediaConvert
  • vs Google Transcoder API
  • vs Self-Hosted FFmpeg
  • vs Cloudinary
Integrations
  • Zapier
  • Make
  • n8n
Use Cases
  • Video SaaS Platforms
  • Content Creators & UGC Platforms
  • AI Video Startups
  • Agencies & Freelancers
  • Podcasts & Audio Pipelines
Guides
  • Convert video format with FFmpeg
  • Compress video with FFmpeg
  • Extract audio with FFmpeg
  • Trim video with FFmpeg
  • Create video thumbnails with FFmpeg
  • Resize video with FFmpeg
  • Add subtitles with FFmpeg
Best APIs
  • Best Video Transcoding API (2026)
  • Best Video Compression API (2026)
  • Best Audio Extraction API (2026)
  • Best API for Trimming Video (2026)
  • Best Video Thumbnail API (2026)
  • Best Video Resizing API (2026)
  • Best API for Adding Subtitles to Video (2026)
  • Best FFmpeg API (2026)
© 2026 Very Good FFmpeg