Site Tools


Sidebar

languages:japanese:linux:mplayer

mplayer/Japanese

I hit issues with the default mplayer setups and subtitles in Japanese. mplayer from rpmfusion is already compiled with the required with fontconfig support, but an appropriate font has to be installed and mplayer started with special parameters:

# install the appropriate fonts and mplayer, i.e. on
# Fredora 19 with rpmfusion repository:
yum -y install vlgothic-fonts mplayer

# Debian unstable with non-free repository
apt-get install fonts-ipafont-nonfree-uigothic

# find out the name of the font
fc-list | grep -i gothic
[...]ipagui.ttf: IPAUIGothic,IPA UIゴシック:style=Regular

# now play the file with parameters.  file.avi (the video file) and
# file.srt (with the subtitles) is used here.
mplayer -subcp utf8 -subfont "VL Gothic" -subfont-text-scale 4 \
  -subfont-outline 1 -slang ja file.avi

# on Debian unstable:
mplayer -subcp utf8 -subfont "IPAUIGothic,IPA UIゴシック" \
  -subfont-text-scale 4 \
  -subfont-outline 1 -slang ja file.avi

mplayer, using the Adobe Source Han Sans font

mkdir -p /usr/share/fonts/opentype/sourcehans/
cp SourceHanSansJP* /usr/share/fonts/opentype/sourcehans/
mkfontdir /usr/share/fonts/opentype/sourcehans/

# verify it is found
fc-list|grep hans
[...]
/usr/[..]/sourcehans/SourceHanSansJP-Light.otf: 源ノ角ゴシック JP,Source Han Sans JP,Source Han Sans JP Light,源ノ角ゴシック JP Light:style=Light,Regular
/usr/[..]/sourcehans/SourceHanSansJP-Heavy.otf: 源ノ角ゴシック JP,Source Han Sans JP,Source Han Sans JP Heavy,源ノ角ゴシック JP Heavy:style=Heavy,Bold
[...]

# use it in mplayer
mplayer -subcp utf8 -subfont-text-scale 3 -subfont-outline 1 \
  -slang ja -subfont "Source Han Sans JP Normal" <file>

xterm, using the Adobe Source Han Sans font

xterm -en UTF-8 -fg white -bg black -fa 'Source Han Sans JP Regular' -e bash
xterm -en UTF-8 -fg white -bg black -fa 'Source Han Sans JP Heavy' -e bash
languages/japanese/linux/mplayer.txt · Last modified: 2022/11/13 12:06 by 127.0.0.1