TubeSum ← Transcribe a video

How to Add Subtitles to a Video with FFmpeg

0h 06m video Published Jun 25, 2026 Transcribed Jul 1, 2026 B Bannerbear
70
Views
1
Likes
0
Comments
0
Dislikes
1.4%
📊 Average

✂️ Creator Tools: Viral Hooks

AI-generated clip ideas for Shorts based on the transcript

83% Watch Without Sound – Add Subtitles Now!

40s

High-impact statistic grabs attention and immediately shows value of subtitles for video success.

▶ Play Clip

How to Add Hard Subtitles with FFmpeg

49s

Clear step-by-step tutorial on burning subtitles into video, valuable for developers and creators.

▶ Play Clip

Soft Subtitles: Toggle On/Off in FFmpeg

43s

Explains how to embed removable subtitles, crucial for accessibility and multi-language support.

▶ Play Clip

Add Multiple Language Subtitles in One Video

60s

Shows how to include Chinese and English subtitles, appealing to global creators.

▶ Play Clip

Hard vs Soft Subtitles: Which to Use?

55s

Direct comparison helps viewers make informed decisions, perfect for ending summary.

▶ Play Clip

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

[00:14] office, 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.

[00:27] If you're a developer building a video editing tool, or anything that handles video, this is your sign to add subtitle support. In this video, I'm going to show you how to add subtitles

[00:40] to any video file using FFMPEG, 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.

[00:54] Let's start with hard subtitles. These subtitles are permanently backed into the video frames. Once they're added, they can't be removed. An SRT file has four parts per subtitle entry.

[01:10] An index number, a start and time stamp, the subtitle text, the blank line to indicate the end of the subtitle. Make sure the SRT file is in the same folder as your video

[01:25] and run this FFMPEG command. Here's what the command means. dashiimput.mp4 specifies the source video. dashvfsubtitles equal subtitle.srt

[01:43] applies the subtitles filter and specify the name of the SRT subtitle file. And finally, output underscoresrt.mp4 specifies the name of the output file.

[02:00] 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.

[02:16] The ASS format gives you control 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 ASS filter.

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

[02:50] 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 supporting multiple languages.

[03:04] Before we start, rename your subtitle file to subtitle.en.srt. Then run this command.

[03:17] Here's the result. You can see the subtitle stream is there in the player, and you can switch it on or off. Let's break down the command that we just run. Two files following dash i are the video and subtitle files.

[03:34] Dash C copy tells ffmpeg not to re-incode the video. Dash csmov underscore text converts the SRT stream

[03:47] to mov underscore text format, which is what mp4 containers use. And dash metadata ss0 language, argument tags the subtitle stream as English using the ISO 639 language code.

[04:06] Basically, the command takes the video and embeds the subtitle file as a toggleable English subtitle stream without re-incoding the video, outputting it as output underscore English dot mp4.

[04:23] Now, let's add a Chinese subtitle to the video we just created. Create another file name subtitle.ch i.srt with Chinese subtitles inside.

[04:37] We'll use dash map flag to tell ffmpeg which streams to include. Dash map 0 includes everything from the previous output video,

[04:51] including the English subtitle stream and dash map 1 adds the Chinese srt as an additional stream. Metadata ss1 language tag marks the second subtitle stream as Chinese.

[05:06] Let's run the command. 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,

[05:20] here's the one liner. Before we end this video, let's quickly compare the two methods. Hard subtitles burn the text permanently into the video frames.

[05:35] You can't remove them and viewers can't toggle 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.

[05:49] On the other hand, soft subtitles are embedded as a separate stream. Viewers can turn them on or off and you can pack multiple languages into a single file.

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

[06:15] like a video app, 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

[06:31] see, 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.