Log in

View Full Version : totem and subtitle codepages


echo
29th November 2005, 15:49
Hi all!

I moved to Ubuntu recently and I've been having problems with viewing greek subtitles in totem(-xine). All I get is questionmarks all over the place.

Now I can view the subtitles fine with mplayer using cp=cp1253 in mplayer's config, I just want to be able to use totem for this. I did some search and I found that there are two options in totem_config. These were

subtitles.separate.font:sans
subtitles.separate.src_encoding:iso-8859-1

I know that I should use windows-1253 for the subtitle encoding but that doesn't work. I also tried iso-8859-7 and UTF-8 but those didn't work either. I'm thinking that it's probably the font (sans) that doesn't contain the required encoding. I do have some .ttf fonts from windows that contain the encoding but I have no idea how to tell totem to use those. :confused:

So, any ideas on how I might fix this?

echo
1st December 2005, 12:23
Nevermind I got it. Just in case anybody else has this kind of problem here's what it takes (the following should be applicable to debian too if you just use debian repositories):

You need to have freetype1-tools and zlib1g installed. You alse need gcc. Check it with synaptic.
sudo /etc/apt/sources.list
and add/edit this line:
deb-src http://archive.ubuntu.com/ubuntu/ breezy main restricted universe multiverse
Then you need to compile xine-fontconv:
sudo apt-get update
sudo apt-get source libxine1c2
cd xine-lib-1.0.1/misc/
sudo gcc -o /usr/local/bin/xine-fontconv xine-fontconv.c `freetype-config --cflags --libs` -lz
Now to create the font for xine:
cd /usr/share/xine/libxine1/fonts
sudo xine-fontconv /path/to/font.ttf myfont iso-8859-7 cp1253
You can change iso-8859-7 and cp1253 with any encoding you need (I need greek).
Finally tell totem to use this font:
gedit ~/.gnome2/totem_config
and change the following lines to:
subtitles.separate.font:myfont
subtitles.separate.src_encoding:iso-8859-7
Done! ;)