Mplayer With Arabic Subtitles FIX
Well, this is my first contribution to “HackRoot” The CAT Distro - Based on Fedora.
There is a very common problem regarding arabic subtitles in Linux video players, I’ve googled and found some old patches with ugly ideas (it was best at their time, because fribidi didn’t support arabic shaping), but now after fribidi2 (beta) which has a almost-finished arabic shaping support I thought I could hack Mplayer and fribidi2 and get things to work together for the complete Linux beginner.![]()
I’ve compiled fribidi2 and hacked it’s configuration alittle and prepared a RPM as there is no RPMS for fribidi2 (because it’s still beta).
I Also hacked the Mplayer to work with my new fribidi2 RPM and to use the arabic shaping capabilities, and here is how you can get arabic subtitles working in Linux:![]()
- You’ll have to remove mplayer if you already have it installed
rpm -e mplayer mplayer-gui
- Download Mplayer RPMs and Fribidi rpms into a new empty directory, aka. /opt/mplayer
- Install all the packages, use force if neccessary (libfribidi may have some conflicts, don’t worry about using force with it)
- Make sure that you have fonts-arabic already installed, if not, Install them via yum.
- Now you need to convert the subtitles for your movie into UTF-8 encoding before playing, let’s see how can you do this
#assume the .sub or srt file is named movie.sub
$ mv movie.sub movie.sub.old
$ iconv -f windows-1256 -t utf8 movie.sub.old > movie.sub
# rm movie.sub.old
OR:
you can download convert_sub script and chmod +x convert_sub.sh and just pass the subtitles file to it and it’ll do the conversion.
then you are ready to play
Basically you’ll need to install mplayer, mplayer-gui and fribidi0 RPMS and you’ll have everything setuped. you can download the tree rpms in an empty directory and install them as follows *Please make sure that you have Livna Repo. setuped*
# cd /opt/empty_directory
# yum localinstall *
while /opt/empty_directory is an example for an empty directory you copied the RPMS into.
please don’t hesitate to tell me any comments or problems..
Download RPMS:
mplayer-1.0-0.72.20070325svn.AhmedSoliman.com.i386.rpm
mplayer-gui-1.0-0.72.20070325svn.AhmedSoliman.com.i386.rpm
mplayer-doc-1.0-0.72.20070325svn.AhmedSoliman.com.i386.rpm
mencoder-1.0-0.72.20070325svn.AhmedSoliman.com.i386.rpm
fribidi0-0.19-1.AhmedSoliman.com.i386.rpm
libfribidi0-0.19-1.AhmedSoliman.com.i386.rpm
libfribidi0-devel-0.19-1.AhmedSoliman.com.i386.rpmSource RPMS:
fribidi-0.19-1.AhmedSoliman.com.src.rpm
mplayer-1.0-0.72.20070325svn.AhmedSoliman.com.src.rpm
NOTE1: Those packages are based on rpm.livna.org packages and are completely compliant with Fedora Core 6
NOTE2: If you chose to install fribidi0-0.19-1.AhmedSoliman.com.i386.rpm then you shouldn’t install libfribidi0 and libfribidi0-devel as they are self-contained in fribidi0, this package was made to make the installation thing easier.
NOTE3: You may face conflicts with original fribidi package while installation, you can rpm -ivh –force fribidi0* before installing mplayer, then do the normal installation and remove fribidi0 from directory.
NOTE4: You may face a problem that my packages aren’t signed during installation using yum localinstall, edit /etc/yum.conf and change gpgcheck=0



