How to ‘burn’ a subtitle track onto an mp4 video file

video editingvideo-subtitles

I would like to make a subtitle file to be a part of an mp4 video file, so that I don't have to deal with two separate files.

I imagine two ways:

  • Make the subtitle an intrinsic part of the video. This will require video re-encoding.
  • Make the subtitle a separate stream, but still embedded in the same video file. This is far more preferable, especially because I can disable it (unlike the other approach), or even play with the font type/size.

How do I do things the 2nd way? It would also be kool to know how the 1st approach works.

Best Answer

The Matroska (mkv) container format supports text-based subtitles embedded as a separate stream into the file.

You could use mkvmerge to remux the file to .mkv and include the subtitles in the output, which you can enable/disable when playing the video. Note that this method will NOT re-encode the video or audio, it's just putting the same data into a different container format, so it will not decrease the quality of the video.

mkvmerge -o output.mkv video.mp4 subtitles.srt
Related Question