Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to extract subtitle from video as .srt file, I used the following command:

FFMPEG -i mytestmovie.mkv -vn -an -codec:s:0.1 srt

But, I got an error as Unrecognized option codec:s:0:1 So, can you tell me the exact command and how to extract a subtitle as .srt file in video?

share|improve this question
umair:shall u tell me in command prompt – vijay Apr 16 '13 at 8:11
I have the same problem. Did you get this to eventually work? – Maxime Labelle Dec 19 '13 at 8:23

Simple: ffmpeg -i Movie.mkv -map 0:s:0

share|improve this answer

-codec:s:0:1 is incorrect. If you use -codec:s:0 then ffmpeg will use the stated codec for the first subtitle stream being passed to the output, if you use -codec:s:1 then it will use it for the second subtitle stream, etc.

You can also use -codec:s to select all output subtitle streams, or -codec:2 to select the third output stream, regardless of what it is.

You are probably confused because the -map option behaves in a different way - there, you have to select which input the selected stream comes from. (so, -map 0:s:0 would take the first subtitle stream from the first input, and feed it to the output). However, -map is for selecting which streams you want to take from the inputs; whereas most of the other options that use stream mapping are for use on the streams after they have been selected (so there's no need to specify which input file they're from), as they are passed to the output.

share|improve this answer
evilsoup:i would using the following command E:\FFMpeg_Latest>ffmpeg -i E:\Routine\routine.mkv -vn -an -map 0:s:0 srt E:\Routine\,it seems an error i got Unable to find a suitable output format for 'srt',can u tell me the command for extracting an subtitle in video... – vijay Apr 16 '13 at 9:38
Try: ffmpeg -i E:\Routine\routine.mkv -map 0:s:0 E:\Routine\ (ffmpeg should detect that you want srt subtitles from the output file name) – evilsoup Apr 16 '13 at 14:31
I used: ffmpeg -i film.mp4 -vn -an -codec:s srt that should copy all the subtitles to the srt file. – Stuart Apr 5 at 19:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.