Most video players (Kodi/VLC/GOM etc) will pick the external subtitle file automatically if its base name is the same as the movie file e.g.
Women.on.the.Verge.of.a.Nervous.Breakdown.1988.MP4 Women.on.the.Verge.of.a.Nervous.Breakdown.1988.SRT |
|
It is quite easy to insert the SRT file inside the movie container using FFmpeg. This saves the need for the sidecar file and is perfect task for a lazy sunday with nothing better to do <g> FFmpeg can embed an .srt subtitle file directly into a video as a proper subtitle stream. This is called muxing the subtitle into the container. This is easiest for MKV movies that support SRT natively. The command line is:
ffmpeg -i movie.mkv -i subtitles.srt -c copy -c:s srt output.mkv
It combines the original movie and its srt into a single output file. The option -c copy will ensure that no re-encoding is done, so embedding the subtitles will be quick and preserve the video quality.
What about MP4 movies? I have read about converting the SRT stream into mov_text (-c:s mov_text) but the player I tried didn't recognize the subtitle stream. The best bet is to convert the MP4 into MKV, that can be done at the same time (and fast, no reencoding) as such:
ffmpeg -i movie.MP4 -i subtitles.srt -c copy -c:s srt output.MKV
Finally for older AVI movies the only option is to burn-in the subtitles inside the video stream — this is slow. Or even better, convert AVI to MKV and then add the subtitles as a soft stream as above.
To add subtitles to several MKV/MP4 movies automatically, use xplorer² user commands. Assuming the movie and the subtitles have the same name, the command template is:
c:\tools\ffmpeg -i "$N" -i "$B.srt" -c copy -c:s srt -metadata:s:s:0 language=eng "subs_$B.mkv"
The extra metadata command line switch adds a description of the subtitle language. Note that the output movie file is going to be called subs_(old name).MKV (using the $B base name token). Once you make sure the embedding works, you can delete the source movie and external SRT file.
Post a comment on this topic »