How to Embed Subtitles to Movies with mencoder and ffmpeg

If you watch movies with mplayer or vlc, you do not need to know that this trick even exists. But if you want to watch a video on a tablet, or your smartphone, you may need to embed the subtitle to the avi file.

In this article I will show you how to embed subtitle to videos, with both mencoder and ffmpeg.

For both this methods, move the video and the subtitle file in the same directory, to make your work easier:

$ mkdir -p ~/videos/linuxg_example
cp ~/downloads/video.avi ~/videos/linuxg_example
cp ~/downloads/ ~/video/linuxg_example

Go to the folder where you have the video and the subtitle:

$ cd ~/videos/linuxg_example

Method one, with ffmpeg:

$ ffmpeg -i video.avi -vf output_video.avi

Method two: with mencoder:

$ mencoder video.avi -oac copy -ovc lavc -sub -subfont-text-scale 3 -o output_video.avi

Tagged with: , ,
Posted in The Linux and Unix Articles!
One comment on “How to Embed Subtitles to Movies with mencoder and ffmpeg

Leave a Reply to cimaonline Cancel reply

Your email address will not be published. Required fields are marked *




Subscribe to get the latest Linux news and how to guides directly on your e-mail!