C.W.K.
Stream
Lesson 03 of 07 · published

Embedded Subtitles (Soft, Toggleable)

~8 min · subtitles, soft, embed, mkv

Level 0Viewer
0 XP0/73 lessons0/15 achievements
0/100 XP to next level100 XP to go0% complete

Soft subs — toggleable in the player

Embedding a subtitle stream into a container keeps it as a separate track the viewer can enable/disable. Different containers support different subtitle codecs:

  • MKV — supports SRT (mov_text won't fit), ASS, SSA, PGS bitmap, S_TEXT/UTF8.
  • MP4 — supports the mov_text codec only (a tt-text variant of SRT).
  • WebM — supports WebVTT.

Code

Embed subtitles by container·bash
# MKV — flexible (any subtitle codec)
ffmpeg -i in.mp4 -i captions.srt \
  -map 0 -map 1 \
  -c copy -c:s srt \
  out.mkv

# MP4 — needs mov_text
ffmpeg -i in.mp4 -i captions.srt \
  -map 0 -map 1 \
  -c:v copy -c:a copy -c:s mov_text \
  out.mp4

# WebM — WebVTT
ffmpeg -i in.webm -i captions.vtt \
  -map 0 -map 1 \
  -c copy -c:s webvtt \
  out.webm

# Multiple language tracks
ffmpeg -i in.mp4 -i en.srt -i ko.srt \
  -map 0 -map 1 -map 2 \
  -c copy -c:s mov_text \
  -metadata:s:s:0 language=eng \
  -metadata:s:s:1 language=kor \
  multi.mp4

External links

Exercise

Take a video and two SRT files (English + another language). Embed both into MKV. Open in VLC and verify both tracks appear in the subtitle menu with correct language labels. Then redo as MP4 with mov_text — does Quick Time show both tracks?

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.