7

I am trying to add an srt file(s) to mp4 files. Is there a way to do it without re-encoding the file.

What I have tried:

  • Added subtitles with the handbrake-cli. While this technically worked, it obliterated the quality of the video and took a long time to re-encode the file
  • I tried an ffmpeg approach as found on this SO answer, but I apparently dont have the mov_text codec and no one else seems to either

There is another SuperUser Answer which suggests that I may need to look for a muxer. But that answer pertains to Mac OS only.

3
  • With VLC you could play your mp4 with srt subtitles while saving the resulting output stream to another file. That's practically re-encoding, though.
    – user260419
    Mar 1, 2014 at 18:30
  • What OS are you using? I mean, what distro & what version.
    – pepoluan
    Mar 1, 2014 at 18:34
  • @pepoluan I am using an ubuntu saucy release at the moment Mar 2, 2014 at 13:21

3 Answers 3

3

Try downloading the static build of ffmpeg from their download site: http://ffmpeg.org/download.html

Note, though, that mov_text seems to be a hit-and-miss situation; sometimes it works, sometimes it doesn't. You might have much better results re-muxing into a matroska container (.mkv), and play it using VLC.

2
  • 1
    OK, that did it!... great suggestion. To clarify what I did for posterity: I downloaded a newer build, 64-bit version of ffmpeg from http://ffmpeg.org/download.html. Once on my machine I ran the command found at this SO Answer referencing the newly acquired version of ffmpeg. The command did its thing, and the outcome was a new mp4 with perfect subtitles. Mar 4, 2014 at 23:26
  • @Hari thanks for the clarification; great to hear that it works :-) ... happy subtitling!
    – pepoluan
    Mar 5, 2014 at 1:46
4

As explained by @axel_c, you could use mkvmerge to create a Matroska container and include the subtitles in the output:

mkvmerge -o output.mkv video.mp4 subtitles.srt
0

If you're looking to embed subtitles (rather than burn) then try a free GPL software called Video Updater Tools.

It uses other tools behind the scene (like ffmpeg, mkvmerge, mp4box etc) but packaged nicely into a GUI and CLI. It works on directories recursively so you can completely automate the entire process. You can drag and drop files/folder in the GUI version or use the CLI for scripting.

It can embed SRT subtitles (and chapters from EDL) in MP4/M4V/MKV containers from EDL and SRT files.

(It can also extract subtitles from most container formats if required)

You can download it at: https://videoupdatertools.codeplex.com

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .