Working with subtitles (create, edit, embed) in Linux

Updated: June 15, 2009

Like I promised some time ago, here's a tutorial on subtitles. We have had quite a few articles on multimedia by now. We have learned how to manipulate Flash, Video and Audio in three long tutorials, covering subjects like file format conversion, splitting, joining, fixing bitrate, gain normalization, tagging, extraction of audio files from Flash movies, streaming, encoding, compression, mixing, recording, and more. We also studied Wink, a powerful, elegant presentation software that allows you to create Flash tutorials. Then, we examined another desktop-recording software with similar capabilities to Wink, called recordMyDesktop. We also learned how to rip DVD movies with Handbrake and how to create DVD movies with DeVeDe.

But we did not dabble - yet - in subtitles. Today, we are going to do just that. Today, we will learn how to write and edit subtitles, how to configure our media players to use subtitle files when playing movies, and how to hard-code (embed) subtitles into video tracks. We will do this on Linux, using Subtitle Editor, Avidemux, VLC, and Totem.

In a separate article, we will talk on how to achieve the same with VirtualDub on Windows. I also owe you an article on XVidCap, plus there are several more exciting multimedia topics that I have reserved for the future. Now, let's begin.


Edit subtitles with Subtitle Editor

We have tasted this lovely utility when we reviewed Wolvix 2, a handsome Linux distribution. Subtitle Editor is also one of the recommended applications on my New cool list of Linux must-have programs, as it is friendly, powerful and useful. You can find Subtitle Editor in the repositories of most distributions.

Subtitle Editor has a simple, if powerful interface. By default, you use it work on subtitle files, like .sub or .srt. However, most people find it difficult to work on subtitles without video, so Subtitle also has a built-in video player. For instance, you can see a screenshot of Subtitle Editor with the fabulous Turkish sci-fi movie G.O.R.A. open.

Subtitle Editor

Subtitle Editor can also display output in external players via the Preview menu. As to the internal player, you may encounter problems with the video output, specifically Xv. If this happens, you will have to change the video output options under Preferences:

Video output

Once you load your movie, you can start working. Subtitle Editor makes it easy to manipulate the text in reference to the video. Simply select any line of text in the subtitles pane and then go to Video > Seek To Selection. This will move the video to the exact time frame where the selected bit of text is displayed in the movie.

Seek to selection

If there's an out-of-sync problem with the subtitles in regard to video, you can fix the problem by adding or removing a delay to the beginning of the video track.

Add/remove delay

And if you wish to edit the actual subtitle text, just click into the text column for any selected line and type your own text.

Custom edited text

Save the subtitle file:


And then, when you load the new subtitles, they will show on the video track:

Edited playing

Simple and dandy. You can even start from scratch and create your own subtitles.

Embed subtitles with Avidemux

Avidemux is a heavyweight, powerful video editor that allows you to encode, split, join, and filter video files in a wide range of formats. It is similar to VirtualDub on Windows. Like Subtitle Editor, it is available in most repositories, although some distributions, like Dreamlinux, come with Avidemux already installed.

Avidemux allows you to permanently embed subtitles into your video files, making them usable by older DVD players that do not support external subtitle files. Let's see how this can be done.

After loading the desired video file, click on the drop-down button under Video in the sidebar and choose the encoding for your video. After that, the Filters button will become enabled. It's the subtitles filter that we're looking for.

Avdemux main

After you open the Filters menu, navigate to Subtitles:

Add sub

Configure your subtitles, including the font size, color and position:

Subs 1

Subs 2

Then, save the file, start encoding and you're done.


Other options

Avidemux is a powerful tool. Not only can it embed subtitles into movies, it can use an Optical Character Reader (OCR) plugin to extract embedded subtitles into external files, convert subtitle formats, and many other cool tricks.


Subtitles in popular media players

There are so many media players available on Linux, it makes it virtually impossible to cover them all, so I will mention only two: VLC and Totem.

VideoLAN (VLC)

VideoLAN (VLC) is a popular, cross-platform media player with tons of features, including the ability to automatically play subtitle files. I have mentioned VLC on many occasions, including several multimedia articles, so you're welcome to read them for more information on this versatile utility. By default, VLC will play available subtitle files.

VLC playing

If it does not do that, you can check its Preferences, to make sure the right options are selected. You need to enable the On Screen Display (OSD). Additionally, you can configure the preferred subtitles language, font size, color, effects, and position.


You also need to make sure VLC autodetects subtitle files.

Advanced options


Totem is another useful media player. It is simple to operate, good looking and extensible with plugins, like the BBC podcasts or Youtube, both of which allow you to stream video RSS feeds and Flash movies into the player. By default, in most cases, Totem will not play subtitles, even if the files are present. You will have to change the preferences and check the box saying Automatically load ...

Totem preferences

After that, Totem will play subtitles:


And you'll be able to change subtitles, remove them or switch languages.



Working with subtitles in Linux is as simple and pleasant as the rest of multimedia tasks. There is a wide range of excellent utilities available, which will help you achieve your desired goals quickly and easily, whether it's fixing the bitrate on your third wedding video or watching a Hungarian movie with Inuit subtitles.

Subtitle Editor and Avidemux are excellent tools in the hands of an entrepreneuring multimedia fan. As to the rest of us who merely want to watch movies, VLC and Totem will do the trick. There are many other programs available, but we'll talk about them another time. I hope you've learned something new today. Stay tuned for many more articles on multimedia.


You may also like: