All major Linux media players (Totem, mplayer, VLC player) allow you to add subtitles to a movie while watching it. This post describes how you can permanently add the subtitles in an AVI file, which is useful if you want to burn the movie to a video DVD. (Notice however that this technique does not allow you to add more than one subtitle streams to the movie, or disable the subtitles while watching the movie; the subtitles are hard-wired to the movie).
The software package we are going to use is called avidemux and it can be easily installed through aptitude if the universe/multiverse packages are enabled.
The procedure required to add the subtitles is this:
- Open the .avi file. With all files I have tried so far, I get these warnings: It is best to let avidemux do what it wants to do - it only takes a few seconds.
- Select a video encoder from the pull-down menu on the left pane, where it says Video. I believe this can be anything, but it is preferable to choose the same encoder as the one used in the original movie. I normally use Xvid4 and it works just fine.
- Configure the encoder by clicking the "Configure" button. In my opinion, no configuration is actually require in order to get an acceptable result. Even one-pass encoding works fine. The only thing that you might want to adjust is the size of the output file.
Add a subtitler filter. First click on the "Filters" button in the left pane (under Video). This brings up the following window:
Select Subtitles→Subtitler. You can now configure your subtitles using the window shown in the image below.
This window allows you to select the subtitles file, the encoding (it supports UTF-8, so it works fine with non-latin alphabets), and the font, color, size and position of the subtitles.
- It appears that there is no need to select an audio encoder; "COPY" works just fine (since we do not wish to make any changes to the sound). Make sure that the "Format" is set to "AVI". The result can be previewed by clicking on the far right icon and then pressing play.
- To finalize the process, click Save and type in a name for the output file. Note that the whole process can take a while. For example in my laptop it took maybe more than an hour to encode a 40min movie file, at an average speed of 16FPS (while doing other stuff as well).