5

How can I change the subtitle format of a movie to .srt for example?

I have any movie (sound, video and an embedded subtitle). I just want to change the subtitles to .srt while leaving everything else the same. If there is a better way to do that than with ffmpeg, then I'd be fine with that too.

Current state

audio codec: x, video codec: y, subtitle format: z

Desired state

audio codec: x, video codec: y, subtitle format: .srt

3 Answers 3

7
+50

FFmpeg has a SubRip encoder, so

ffmpeg -i input.mkv -c copy -c:s srt out.mkv
4
  • Error while opening encoder for output stream #0:2 - maybe incorrect parameters such as bit_rate, rate, width or height. Any idea why this is happening? Jun 27, 2016 at 16:36
  • Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Stream #0:3 -> #0:2 (dvd_subtitle (dvdsub) -> subrip (srt)) Error while opening encoder for output stream #0:2 - maybe incorrect parameters such as bit_rate, rate, width or height Jun 27, 2016 at 18:29
  • See here.
    – Gyan
    Jun 27, 2016 at 18:32
  • 1
    Full list of subtitle formats supported by ffmpeg: ffmpeg.org/ffmpeg-all.html#Subtitle-Formats
    – ccpizza
    Aug 13, 2021 at 15:04
7

Assuming 'z' is a supported format, something as simple as this should work:

ffmpeg -i input.z output.srt

List your codecs with ffmpeg -codecs to make sure your 'z' type is supported.

2

You can try to convert the subtitles using a simple tool called Avidemux. I've used it before and it works fine. Find more about it here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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