Thai Subtitles on Mac OSX

Posted by Garth on Tuesday, November 3, 2009

Update (18/01/11): I recently developed an online tool to do this conversion for you. Read the rest of this post if you want to go old school, otherwise stop by and use the Thai Subtitle Converter brought to you by Grinning Gecko Labs.

Original Post:
After some searching and experimenting I believe I've found a solution. I realized early on that it was a character encoding issue, but didn't really know how to resolve it. Well, after reading this thread I've managed to make it work in MPlayer OSX Extended (loading either the pre-converted or post-converted subtitles in VLC just crashes it... oh well). As I'm sure you already know if you're reading this post, is the place to go for Thai subtitles. However, according to the above thread, it encodes its SSA files as ANSI (TIS-620) instead of UTF-8. This causes issues. The solution, though, is rather simple. Using iconv (included in OSX; 10.6 at least, but I'm sure it's kicking around in earlier versions as well) you just run a quick little Terminal command and you're off to the races.  So, let's say for example that your downloaded subtitle filename is subtitle.ssa and your movie filename is movie.avi.  Open a Terminal window, navigate to the folder containing both of these files and type the following:
iconv -f tis-620 -t utf-8 subtitle.ssa > movie.ssa
Now when you launch movie.avi in MPlayer, it automatically loads the subtitle of the same name (movie.ssa) and the characters render correctly.  Sweet!

For the record, on Windows just use Media Player Classic Home Cinema and switch the font/encoding to Thai or use VobSub and do the same.  Both are included as part of the K-Lite Codec Pack.


Anonymous said...

iconv is alive and kicking in Mac OS X 10.4.11

Subscribe to: Post Comments (Atom)