blob: 5e421a587bd24582ec05c409d863506bce6c0b31 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
---
title: "Dumping subtitles using FFmpeg"
date: 2020-05-17T14:00:00
tags: ["formats", "languages", "linux", "media", "snippets", "software"]
---
As part of my ongoing [language learning](/languages/) attempts, I tend to enable subtitles in the language I'm wanting to learn, and when I see a word I don't recognise in the context I do I'll make a note of it.
This manual approach though can get a bit tiresome, so if you want a quick way to dump an entire subtitle file from a video, you can do the following:
```
ffmpeg -i video.mkv
```
This will list the streams available, video, audio and subtitles if available. If labels are available it will show them here too. Make a note of the stream you want. In the above example, we're seeing `Stream #0:5(nor)` in our original command output which would be Norwegian. To dump this stream to a subrip `srt` file you'll run the following:
```
ffmpeg -i video.mkv -c copy -map 0:5 subtitles.srt
```
You should now have a single `srt` file with your subtitles as expected in them.
I'll write another post for how to format these files to a usable list type format later.
**Edit:** [Follow up article posted here](/blog/2020/05/28/formatting-dumped-subtitles/).
|