Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm told it's possible to embed subtitles (.srt) into video files (.avi) using ffmpeg, but I can't find any mention of it in the man page. Is this possible? What command do I use?

share|improve this question
up vote 3 down vote accepted

From man ffmpeg:

Subtitle options:

-scodec codec Force subtitle codec ('copy' to copy stream).

-newsubtitle Add a new subtitle stream to the current output stream.

-slang code Set the ISO 639 language code (3 letters) of the current subtitle stream.

So: ffmpeg -newsubtitle subtitles.srv -i video.avi ...

share|improve this answer
If I use instead of ... result.avi this command does not work At least one output file must be specified – xralf Oct 27 '11 at 11:01
Of course, ... means "and whatever other options you need". – Shawn J. Goff Oct 27 '11 at 11:09
Sufficient is ffmpeg -newsubtitle subtitles.srt -i video.avi result.avi but this ends with the message above. I hoped that result.avi is output file. I tried it with -o result.avi too but without success. – xralf Oct 27 '11 at 11:22
I don't know why this didn't work for me (maybe wrong file or problem with ffmpeg). I tried this command instead mencoder movie.avi -sub movie.srt -o movie.hardsubs.avi -oac copy -ovc lavc -lavcopts vbitrate=1200 – xralf Nov 8 '11 at 10:07
@ShawnJ.Goff: This did not work for me either. What version of ffmpeg are you using, and what OS? – Faheem Mitha Apr 7 '12 at 20:52

ffmpeg developers are working with subtitle support, but as far as I know it's only working in the latest ffmpeg. mencoder will burn subtitles instantly, if you want to try that instead.

share|improve this answer

From Pier's link, specifically:

ffmpeg -i video.avi -vf subtitles=subtitle.srt out.avi

I've used this successfully with the current static git ffmpeg release.

share|improve this answer

Your Answer


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.