In this episode you'll extract and convert subtitles, burn subtitles into video, set metadata and chapters, and get to know EXIF metadata support in newer FFmpeg versions.

In episode 10 you produced images and animations from video — now it's time to tidy up text and identity: subtitles, metadata, and chapters. Subtitles let content reach a wider audience; metadata and chapters keep files organized like a neat library, not a pile of unnamed files.
This episode closes "single-file processing" with three practical capabilities: manipulating subtitles, writing metadata, and structuring chapters — then we'll be ready to scale up in the next episodes.
Subtitles are stored as text streams, each with its own format. The three most common ones:
| Format | Main characteristics |
|---|---|
| SRT | Simplest, millisecond-comma timing, broadly compatible |
| ASS | Rich styling: position, color, font, karaoke effects |
| VTT | Web variant, browser player standard |
SRT is the safe choice for almost any need; ASS is needed when you want "classy" subtitle styling — like anime and karaoke video styles. VTT for web content.
Like audio and video, subtitles are streams that can be mapped and copied. To extract a subtitle from a file:
ffmpeg -i input.mkv -map 0:s:0 subtitle.srt0:s:0 is the first subtitle stream of the first file. Without -c:s and with a clear output extension, FFmpeg infers the SRT format from the extension. To convert between subtitle formats, -c:s is the key:
ffmpeg -i input.mkv -c:s ass output.assSubtitle conversion is a text operation — nearly instant, no video decoding. This is the same -c:s pattern for all subtitle format conversions (SRT, ASS, VTT, and others).
Subtitles can also be added to a video file as a separate stream — viewers can choose to turn them on or off. For MP4, the subtitle format must be mov_text:
ffmpeg -i input.mp4 -i subtitle.srt -c copy -c:s mov_text output.mp4Notice the codec combination: video and audio are copied (-c copy), while subtitles are converted to mov_text so MP4 accepts them. For MKV, native SRT is accepted directly — -c:s copy alone is enough. The container again sets the rules, as you learned in episode 8.
Tip
"Soft" subtitles (separate stream) are always more flexible than "hard" subtitles (burned into the picture): viewers can turn them off, switch language, or change font size. Use subtitle streams when possible — burn into the picture only when the target format (e.g., GIF or certain platforms) genuinely doesn't support subtitles.
Sometimes subtitles must become a permanent part of the picture — e.g., for videos uploaded to platforms that don't read subtitle streams. This is called burn-in, done with the subtitles filter:
ffmpeg -i input.mp4 -vf "subtitles=subtitle.srt" -c:a copy output.mp4The subtitles filter requires re-encoding the video (subtitles are drawn onto every frame) — that's why audio is copied separately with -c:a copy. Note that this filter treats the subtitle file path relative to the working directory; if the file is elsewhere, use an absolute path or a properly escaped path.
Important
The subtitles filter depends on libass and the fonts installed on your system. If the font for a given language isn't present, characters can render as boxes (tofu). Make sure the right fonts are installed before burning in non-Latin languages — and always check one result frame with ffplay -vf "subtitles=subtitle.srt" input.mp4 before a full render.
Metadata is a media file's "ID card": title, artist, comment, date, and other information attached to the file. When files are moved between players, it's this metadata that makes a file well recognized.
ffmpeg -i input.mp4 -metadata title="Video Tutorial FFmpeg" -metadata comment="seri belajar ffmpeg" -c copy output.mp4With -c copy, the bitstream is untouched — FFmpeg only rewrites metadata into a new container. This is a safe way to "tag" a file without re-encoding. To remove all metadata — e.g., for a file about to be published where you don't want to leak internal data:
ffmpeg -i input.mp4 -map_metadata -1 -c copy clean.mp4-map_metadata -1 tells FFmpeg: don't copy any metadata. The result is a file clean of titles, comments, and other identity traces.
Chapters are time-position markers with titles — like chapters in a book or segments in a film. Supporting players (MP4, MKV) show a list of chapters that can be jumped to. Chapters are written in the FFMETADATA format:
;FFMETADATA1
[CHAPTER]
TIMEBASE=1/1000
START=0
END=120000
title=Intro
[CHAPTER]
TIMEBASE=1/1000
START=120000
END=420000
title=Isi UtamaTIMEBASE=1/1000 means time is in milliseconds — so END=120000 equals 2 minutes. Each [CHAPTER] block defines one chapter. To embed them into a file:
ffmpeg -i input.mkv -f ffmetadata -i chapters.txt -map_chapters 1 -c copy output.mkv-map_chapters 1 takes the chapter definitions from the second input (chapters.txt), while -c copy keeps video and audio untouched. Result: the exact same file, now with chapter navigation.
Finally, one refinement arriving in newer FFmpeg versions: handling EXIF metadata on images. EXIF is metadata embedded in JPEG/PNG — orientation, capture time, camera settings, even GPS coordinates. Since FFmpeg 8.1, EXIF metadata support has been improved so orientation and image information are preserved when files are processed through FFmpeg's metadata path.
ffmpeg -i foto.jpg -map_metadata 0 -c copy foto-copy.jpgWith this pattern, metadata (including EXIF) is copied from input to output without losing information — very useful when you change an image's format or container and don't want orientation or EXIF traces to vanish. Check your version with ffmpeg -version to make sure the feature is available, and verify results with ffprobe -v quiet -show_format foto-copy.jpg.
Note
EXIF metadata is a continuously evolving feature in FFmpeg. If your version is older than 8.1, some EXIF operations may be unavailable or behave differently — don't hesitate to update FFmpeg for full support.
In episode 11 you've completed the "single-file" toolbox: extracting and converting subtitles with -c:s, embedding them as streams or burning them with the subtitles filter, writing and removing metadata with -metadata and -map_metadata, structuring chapters via the FFMETADATA file, and getting to know the EXIF metadata improvements in FFmpeg 8.1+.
The key takeaway: subtitles and metadata are part of the media file, not a separate add-on. Managing both deliberately makes your files professional — easy to play, easy to index, and viewer-friendly.
In the next episode 12 we'll join many files into one: concat and segmenting — combining video clips, and splitting a long file into segments. See you in episode 12!