Pages

Thursday, 7 January 2010

Playing divx/xvid movies with subtitles on N900

We all know N900's outstanding multimedia capabilities, right? Built-in media player can chew full-blown divx movies without hesitation. However, it doesn't support subtitles useful to foreign-language-impaired people. Fear not, solution is there.

All you need is install kmplayer and mplayer packages for extras-testing. Widely recognized mplayer is ultimate media player for Linux with built-in support for subtitles in plain txt format. Kmplayer is just a front-end for mplayer - quite rough, to be honest - but since we're planning to watch movies, not an UI of a player, it should not be an issue.

Having both applications installed basically concludes this solution. Playing any divx file with associated subtitles file (ie. FancyMovie.avi & FancyMovie.txt both in same directory) should make subs appear automagically.

Troubleshooting


Making sure kmplayer uses correct backend player
Open up kmplayer's options menu, get into 'Select Player' option and make sure mplayer is chosen there.



National characters not appearing in subs correctly
A little X-Terminal trickery is required here, not much tough. You need to know encoding of subtitle file, for example most of Polish subtitles are encoded with windows/cp-1250. That needs to be added to mplayer's config file located at /home/user/.mplayer/config in following manner:
subfont-encoding=windows-1250

or perhaps using a single command in X-Terminal:
echo "subfont-encoding=windows-1250" >> /home/user/.mplayer/config

Now go and enjoy subtitle-powered movies on your shiny N900. :)

8 comments:

  1. Thank you very much for this post. It works great, together with special characters, like Slovenian are. Many thanks again, Rok.

    ReplyDelete
  2. Thx for ur help...but, I can't make it work. I have XviD file and *.sub file. I have changed *.sub file to forman *txt, but subtitles doesn't work :(

    ReplyDelete
  3. I think .sub and .txt are two different subtitle formats, so simply changing file extension might not work. I might be wrong, tough. I always have and use .txt subs in the first place, so don't know how .sub are actually working.

    ReplyDelete
  4. Wow im glad i came upon this website. Now i can play my fav videos with subtitles (.srt) on my n900. Thanks a lot!

    ReplyDelete
  5. well i have an arabic subtitle and it doesnt work... but still thank you so much... ^_^

    ReplyDelete
  6. I can go to /home/user/.mplayer but I can't go inside for config. Is it wrong when I write "cd config"? It says "can't cd to config" but I don't know what I should do. I should encode it for Turkish subtitles, it is windows-1254. Help please!!!

    ReplyDelete
  7. Because "config" is a file, not directory :)

    ReplyDelete
  8. this also works
    $ mplayer videoFilename -sub subtitleFilename

    ReplyDelete