There are a lot of questions out there about how to play movies in mplayer with subtitles. When searching with google I get links to forums, mailinglists and so on, but noone seems to have a solution that works, but a lot of stupid attempts like having the movie in the same directory as the movie, or add the subtitle file to the playlist. It seems like nobody has a clue what they are talking about, but rather guess a lot and really don't know what they are talking about. No offense, but I guess this is one of the consequences with we get with the popularity of Ubuntu.
What is important to know, is to know if the subtitle format is text based or image based, and if it's supported by mplayer. You can find info about the different subtitle formats here. The supported mplayer formats are VOBsub, OGM, CC (closed caption), MicroDVD, SubRip, SubViewer, Sami, VPlayer, RT, SSA, PJS (Phoenix Japanimation Society), MPsub, AQTitle and JACOsub.
To view the movie with the text based subtitles, use this command to start mplayer:
$ mplayer movie.avi -sub subtitle.txt
Note that the file extension of the movie and subtitle don't have to be .avi and .txt. Ut the file extensions which matches your files.
You might have to set the preferred language on the command line as well. Use «en» to get the english subtitle:
$ mplayer movie.avi -sub subtitle.txt -slang en
The Vosob sub title format differ a bit, and an example on image based subtitles. It has a both a .sub file and a .divx file. Especially here people on different forums and mailinglists struggle to find to come up with a reasonable solution. Well guys, how about reading the man pages?
$ man mplayer
.....
-vobsub
Specify a VOBsub file to use for subtitles. Has to be the full pathname without extension, i.e. without the '.idx', '.ifo' or '.sub'.
-vobsubid <0-31>
Specify the VOBsub subtitle ID.
And lucky for you lazy guys out there, I'll give you a command line example:
$ mplayer name_of_movie.avi -vobsub name_of_subtitle -vobsubid 1
This time do NOT write the file extension of the subtitle file name. The .idx and .sub file should have the same filename, except from the .idx and .sub extension off course. The vobsubid is an integer which represents the language you want on your subtitles.
Remember: man mplayer is probably more helpful than google, mailinglists and forums on this issue, so please use it!
I hope I helped you guys, without pissing you off too much Have fun watching your movies with subtitles then!