Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a video file (in the format of .mp4, .mkv, .avi or whatever) and a subtitle file (.srt). I want to embed the subtitle file into the video file so that I have only one file - the video file in contrast to the video and the subtitle file.

Is it possible? How?

share|improve this question
    
Soft embedded subs that can be turned off are the way to go (might not be possible with AVI though); hard subs are really irritating and not only does adding them cause quality loss, but removing them is not possible without further significant loss. –  Karan Dec 17 '12 at 17:39
add comment

3 Answers

up vote 4 down vote accepted

MKVtoolnix is another easy to use option since you already have the files you want. You can combine them into an MKV container without altering the originals in anyway. It has a nice GUI to guide you through the combination process as well.

I see user1301428 had mentioned Handbrake, which is also a very common/popular tool. I'm not as familiar with it, but if it doesn't re-encode your source AVI then it should be great.

share|improve this answer
add comment

A free, cross-platform solution with FFmpeg, which does bitstream copy and therefore doesn't take more than a few seconds, even for large files:

ffmpeg -i input.mp4 -i subtitles.srt -c:s mov_text -c:v copy -c:a copy output.mp4

This works for MP4. Be aware that some subtitle formats might not automatically be compatible with the chosen output formats, so you have to change the codec after -c:s:

  • MP4: Use the mov_text subtitle codec (as in the example above), which implements MPEG-4 Part 17.

  • MKV: Use srt, subrip, ssa or ass. MKV does not support mov_text.

  • AVI: Very problematic with embedded subtitles. In theory they support SubRip and SSA/ASS subtitles, but only through third party software.

See Wikipedia for a list of containers and their supported subtitle formats.

Using dedicated video encoding programs such as Handbrake will re-encode your video, which reduces its quality and could take you hours to encode – this is why you should check whether the tools support copying the video and audio bitstreams.

share|improve this answer
    
I have found -f srt to be necessary sometimes, otherwise great! –  Steven Penny Jul 11 '13 at 2:57
add comment

You can use Handbrake. In the "Subtitles" tab you simply need to select the subtitles file and then launch the encoding.

share|improve this answer
2  
This wil re-encode the video, which a) takes a lot of time and b) deteriorates the quality. –  slhck Dec 17 '12 at 17:31
add comment

Your Answer

 
discard

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.