If you have a movie, then sometimes it comes with a subtitle file. However, there are several formats of subtitle files. We subtitle movies we use in training and usually we use Final Cut for that and they produce a movie file like the one attached, which is in STL format.
However, if you attach subtitle to a mkv file, then the format that is required is SRT. They are quite different, but the type of information is same (similar)
STL file format: http://documentation.apple.com/en/dvdstudiopro/usermanual/index.html#chapter=19%26section=13%26tasks=true
SRT file format: http://wiki.videolan.org/SubRip
*** Installation
gem install subtitle_converter