TubeSum

Add Subtitles with FFmpeg — Full Breakdown & Transcript

How to Add Subtitles to a Video with FFmpeg

0h 06m video Published Jun 25, 2026 Transcribed Jul 28, 2026 Bannerbear Bannerbear
Intermediate 3 min read For: Video creators and developers familiar with command-line tools.
AI Trust Score 100/100
✅ Highly Legit

"The title accurately describes the tutorial content."

AI Summary

This video explains how to add subtitles to video files using FFmpeg, covering both hard (burned-in) and soft (embedded as a separate stream) subtitles. It provides step-by-step commands and explains the differences between the two methods.

[00:00]
Why Subtitles Matter

83% of people watch videos with sound off, making subtitles essential for engagement.

[00:44]
Hard Subtitles Overview

Hard subtitles are permanently burned into video frames and cannot be removed.

[01:12]
SRT File Structure

An SRT file has four parts per entry: index number, start/end timestamps, text, and a blank line.

[01:25]
FFmpeg Command for Hard Subtitles

Use `-vf subtitles=subtitle.srt` to burn SRT subtitles into the video.

[01:59]
Styling with ASS Format

Convert SRT to ASS for control over font, size, color, alignment, etc., then apply with `-vf ass=subtitle.ass`.

[02:34]
Soft Subtitles Overview

Soft subtitles are embedded as a separate stream, allowing viewers to toggle them on/off.

[03:01]
FFmpeg Command for Soft Subtitles

Use `-c copy -c:s mov_text` to embed SRT as a soft subtitle stream without re-encoding.

[04:05]
Adding Multiple Language Subtitles

Use `-map` flags to include multiple subtitle streams, e.g., English and Chinese.

[05:24]
Comparison: Hard vs Soft Subtitles

Hard subtitles are permanent and compatible everywhere; soft subtitles are toggleable and support multiple languages.

FFmpeg provides flexible options for adding subtitles, with hard subtitles ensuring visibility and soft subtitles offering viewer control and multi-language support.

Mentioned in this Video

Tutorial Checklist

1 01:25 Place SRT file in same folder as video, then run: ffmpeg -i input.mp4 -vf subtitles=subtitle.srt output_srt.mp4
2 01:59 For styled subtitles, convert SRT to ASS: ffmpeg -i subtitle.srt subtitle.ass, then apply: ffmpeg -i input.mp4 -vf ass=subtitle.ass output_ass.mp4
3 03:01 For soft subtitles, rename subtitle file to match video name, then run: ffmpeg -i input.mp4 -i subtitle.srt -c copy -c:s mov_text -metadata:s:s:0 language=eng output_english.mp4
4 04:21 To add another language, run: ffmpeg -i output_english.mp4 -i subtitle.chi.srt -map 0 -map 1 -c copy -c:s mov_text -metadata:s:s:1 language=chi output_bilingual.mp4
5 05:10 For a single-pass multi-language soft subtitles: ffmpeg -i input.mp4 -i subtitle.eng.srt -i subtitle.chi.srt -map 0 -map 1 -map 2 -c copy -c:s mov_text -metadata:s:s:0 language=eng -metadata:s:s:1 language=chi output.mp4

Study Flashcards (7)

What percentage of people watch videos with sound off?

easy Click to reveal answer

83%

What are the four parts of an SRT subtitle entry?

easy Click to reveal answer

Index number, start and end timestamps, subtitle text, and a blank line.

01:12

What FFmpeg filter is used to burn hard subtitles from an SRT file?

medium Click to reveal answer

subtitles filter: -vf subtitles=subtitle.srt

01:25

How do you apply styled subtitles using an ASS file in FFmpeg?

medium Click to reveal answer

Use the ass filter: -vf ass=subtitle.ass

02:18

What is the difference between hard and soft subtitles?

easy Click to reveal answer

Hard subtitles are burned into video frames and cannot be removed; soft subtitles are embedded as a separate stream and can be toggled on/off.

05:24

What codec is used for soft subtitles in MP4 containers?

hard Click to reveal answer

mov_text

03:40

How do you add multiple language subtitle streams in a single FFmpeg command?

hard Click to reveal answer

Use -map flags for each input and -metadata to set language tags.

05:10

💡 Key Takeaways

📊

83% Watch Without Sound

Highlights the critical need for subtitles in video content.

💡

Hard vs Soft Subtitles

Core distinction that affects usability and compatibility.

00:44
🔧

FFmpeg Hard Subtitle Command

Practical command for burning subtitles into video.

01:25
🔧

Soft Subtitle Command Without Re-encoding

Efficient method to add toggleable subtitles.

03:01
⚖️

Comparison Summary

Clear guidance on when to use each subtitle type.

05:24

[00:00] Hey, welcome back. Here's a stat that should make every video creator stop and think. 83% of people watch videos with sound off. They could be commuting, sitting in a quiet office,

[00:15] multitasking, or simply don't have their headphones with them when they're outside. If there are no subtitles to follow along with, they're likely to scroll past it. If you're a developer building a video editing tool,

[00:30] or anything that handles video, this is your phone to add subtitle support. In this video, I'm going to show you how to add subtitles to any video file using FFM tape,

[00:44] a free, powerful command line tool. By the end of the video, you'll know how to add both hard and soft subtitles to videos. Let's start with hard subtitles. These subtitles are permanently

[00:58] backed into the video frames. Once they're added they can't be removed. An SRT file has four parts per subtitle entry. An index number, a start and end

[01:12] timestamp, the subtitle text, and a blank line to indicate the end of the subtitle. Make sure the SRT file is in the same folder as your video and run this

[01:25] Here's what the command means. dash i inputs dot mp4 specifies the source video dash vf subtitles equals subtitle dot srt applies the subtitles filter

[01:46] and specify the name of the srt subtitles file and finally output underscore srt dot mp4 specifies the name of the output file.

[01:59] This adds the hard coded subtitle to the video using the default font style. If you want more styling control, convert your SRT file to an .ass file first using the command. The .ass format gives you control

[02:18] over font name, size, color, bold, italic, alignment, margins and more. Once you've configured the styles in the file, apply it to your video with an AFF filter.

[02:34] The styling will be applied to the subtitles, like how it's defined in the AFF file. Now, let's add soft subtitles. Unlike hard subtitles, these are not burned into the

[02:48] video. They're embedded as a separate stream, so viewers can turn them on or off using their media player. This is great for accessibility and also for

[03:01] supporting multiple languages. Before we start, rename your subtitle file to subtitle Then run this command Here the result You can see the subtitle stream is there in the player and you can switch it on or off

[03:25] Let's break down the command that we just learned. Two files following "-i", are the video and subtitle files. "-ccopy", tells FFmpeg not to re-encode the video.

[03:40] "-csmaz", converts the SRT stream to MOV underscore text format, which is what MP4 containers use.

[03:52] And dash metadata SS0 language argument tags the subtitle stream as English using the ISO639 language code.

[04:05] Basically, the command takes the video and embeds the subtitle file as a toggleable English subtitle stream without re-encoding the video, outputting it as output underscore English

[04:21] dot mp4. Now let's add a Chinese subtitle to the video we just created. another file name subtitle.chi.srt with Chinese subtitles inside, we'll use

[04:37] dash map flag to tell FFmpeg which streams to include. Dash map 0 includes everything from the previous output video including the English subtitle

[04:52] stream and dash map one adds the Chinese SRP as an additional stream metadata ss one language tag marks the second subtitle stream as Chinese Let run the command

[05:10] Now you can choose which subtitle to show. If you want to go from scratch and add both language subtitle streams in a single pass, here's the one-liner. Before we end

[05:24] this video, let's quickly compare the two methods. Hard subtitles burn the text permanently into the video frames. You can't remove them and viewers can't toggle

[05:38] them off, but they'll show up on any media player without any compatibility concerns. Use these when you need the subtitles to always be there. On the

[05:50] other hand, SCUF subtitles are embedded as a separate stream. Viewers can turn them on or off and you can pack multiple languages into a single file. They're

[06:02] also faster to process since FFmpeg skips re-encoding entirely. Use these when you're producing content for platforms that support subtitle tracks like a video app,

[06:16] a streaming platform or a downloadable file where your audience speaks different languages. And that's a wrap. If you have any questions or any tutorials that you want to see,

[06:31] drop them in the comments below. I'll see you for the next one.

⚡ Saved you 0h 06m reading this? Transcribe any YouTube video for free — no signup needed.