To embed subtitles into an avi to see with your dlna device, you can do as follows
transcode -i name_of_video.avi -x mplayer="-sub name_of_subtitle.srt" -o name_of_subtitled_video.avi -y xvi
After reinsalling my arch box, I had several provems with xvid.so… I found a easier way to do the same with mencoder
$ mencoder -UTF8 -sub movie_subtitle.srt -ovc xvid -xvidencopts bitrate=-700000 -oac copy -o new.movie.name.avi movie.avi
As you will use mplayer to transcode the subtitle, you must configure properly mplayer to show correctly those special characters, like accents, inverted question or exclamation marks. Almost everyone will do with UTF-8 encoding. To configure mplayer, edit ~/.mplayer/config
# Set font.
#set your ttf fonts here, example:
# Set font encoding.
# Set subtitle file encoding.
Note that gmplayer, smplayer and others mplayer-based players, do NOT use that config file, then you MUST edit this file or subtitles will show weird characters and you will transcode the video again. You’re adviced.