FFmpeg 7: Unable to Add Multiple Subtitle Streams in MKV (No Longer Possible?)

Abstract: Resolve FFmpeg 7 failing to add multiple subtitle streams to MKV by using explicit -map flags for each input index.

Created: 2026-09-14 by

Adding multiple subtitle streams to an MKV file with FFmpeg requires precise input mapping and distinct output indices. The command must explicitly map each subtitle source to a separate stream index using the -map flag, ensuring that video, audio, and all subtitle files are correctly associated before muxing into the final container.

Understanding the Mapping Requirement

The core issue when adding multiple subtitles is not a limitation of the MKV format or FFmpeg itself, but rather how the muxer handles stream selection. By default, FFmpeg automatically selects one stream per type (video, audio, subtitle) from the inputs if you do not specify otherwise. When you have multiple subtitle sources, such as sub1.srt and sub2.srt, you must manually tell FFmpeg which input corresponds to which output stream. This is achieved through the -map option, which allows granular control over every single stream in your input files. Without explicit mapping, FFmpeg may ignore subsequent subtitle inputs or overwrite previous ones, leading to the perception that only one subtitle track is being added. To successfully include multiple subtitle tracks, you need to treat each subtitle file as a separate input. For example, if you have a video file movie.mp4 and two subtitle files english.srt and french.srt, you will provide three inputs to FFmpeg. The order of these inputs matters because it determines the input indices used in your mapping commands. Typically, the first input is index 0, the second is index 1, and the third is index 2. You then use -map to select specific streams from these inputs to be included in the output.

Distinguishing Stream Types

It is crucial to distinguish between video, audio, and subtitle streams in your mapping. A common mistake is to assume that all streams from a subtitle file are subtitles; however, some formats might carry metadata or other data types. Using the -c:s copy instruction tells FFmpeg to copy the subtitle codec without re-encoding, which is safe for text-based formats like SRT or ASS. For binary subtitle formats like PGS (used in Blu-rays), copying is also generally safe, but encoding might be required for compatibility with certain players. Understanding this distinction helps prevent errors where the muxer fails to recognize a stream as a subtitle. For more context on handling subtitles during conversion, see Converting VOB to MKV with Subtitles and Audio Preserved.

Constructing the Correct Command

A valid command structure starts by listing all inputs, followed by the mapping instructions, and finally the output file. Let us break down a robust command line that adds two subtitle tracks to a video. Assume your inputs are arranged as follows:
  • 0: movie.mp4 (contains video and audio)
  • 1: english.srt
  • 2: french.srt
You would construct the command as follows:
ffmpeg -i movie.mp4 -i english.srt -i french.srt \
-map 0:v -map 0:a -map 1:s -map 2:s \
-c copy \
output.mkv
In this example, -map 0:v selects the video stream from the first input. -map 0:a selects the audio stream from the first input. -map 1:s selects the subtitle stream from the second input (English), and -map 2:s selects the subtitle stream from the third input (French). The -c copy flag ensures that no streams are re-encoded, preserving quality and speed. Note that -c copy applies to all mapped streams unless overridden by specific codec settings.

Handling Complex Inputs

If your video file contains multiple audio tracks or chapters, you may need to be more specific with your maps. Instead of -map 0:a, you might use -map 0:a:0 to select only the first audio track. Similarly, for subtitles, if a file contains multiple subtitle streams, you can target them individually using :0, :1, etc. This level of detail prevents accidental inclusion of unwanted streams and ensures that the output MKV file has exactly the tracks you intend. When dealing with burned-in captions, character rendering issues can arise. See The Challenge of Rendering Characters with FFmpeg for troubleshooting text display problems.

Verifying the Output

After running the command, verify that both subtitle streams are present in the output file. You can use ffprobe to inspect the media file:
ffprobe output.mkv
Look for the "Stream" lines that indicate Subtitle type. You should see two distinct subtitle streams, each with its own index and language tag if available. If only one subtitle stream appears, review your mapping commands to ensure that both subtitle inputs were correctly referenced. It is also helpful to check the metadata tags within the subtitle streams, as some players rely on these tags to identify the language of each track.

Language Tags

To assign language tags to your subtitle streams, you can add -metadata:s:s:0 lang=eng and -metadata:s:s:1 lang=fre to your command. This ensures that media players like VLC or MPV correctly label the tracks as English and French, improving the user experience for viewers switching between languages.

Common Pitfalls and Solutions

One frequent error is mixing up the input indices. If you accidentally map -map 1:s when the English subtitle is actually input 2, the wrong file will be included. Always count your inputs carefully from zero. Another pitfall is using -c:s mov_text incorrectly; while this converts subtitles to a native MOV text format, it may not be compatible with all MKV players. Sticking to -c copy for standard SRT or ASS files is usually the safest approach. For information on merging different media types, refer to Merging Three Audio Files into One: A Tech Support Guide, which shares similar mapping principles.

Frequently Asked Questions

Why does FFmpeg only keep one subtitle track?

FFmpeg defaults to selecting one stream per type if you do not use the -map flag. To keep multiple subtitles, you must explicitly map each subtitle input to a separate output stream using -map indices.

Can I burn multiple subtitles into the video simultaneously?

No, FFmpeg cannot burn multiple independent subtitle layers into a single video pixel stream simultaneously. You would need to merge the subtitle files into one before burning, or use external tools to composite them, though this is rarely supported natively in playback.

What is the difference between -c copy and -c:s mov_text?

-c copy preserves the original subtitle format (e.g., SRT, ASS) inside the MKV container, which is ideal for flexibility. -c:s mov_text converts subtitles to a simpler text format, which may improve compatibility with older players but reduces formatting options.

How do I check if my subtitles are correctly tagged?

Use ffprobe output.mkv and look for the language tag in the subtitle stream details. You can also set these tags manually using the -metadata:s:s:X lang=XXX parameter in your FFmpeg command.

Does this method work for PGS subtitle streams?

Yes, you can map PGS subtitle streams just like SRT files using -map. Ensure you use -c copy to preserve the bitmap nature of PGS subtitles, as re-encoding them can lead to significant quality loss or incompatibility.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More