全てのオプションをMPlayer/MEncoderが起動する度に読み込むコンフィギュレーション・ファイルに書いておく事ができます。システムワイドのコンフィギュレーション・ファイル「mplayer.conf」はコンフィギュレーション・ディレクトリにあります(例えば、/etc/mplayer。または、 /usr/local/etc/mplayer)。ユーザー固有のコンフィギュレーション・ファイルは、~/.mplayer/config。MEncoderのコンフィギュレーション・ファイルは「mencoder.conf」で、コンフィギュレーション・ディレクトリ、/etc/mplayer、または、/usr/local/etc/ mplayerに。ユーザー固有のものは「~/.mplayer/mencoder.conf」です。ユーザー固有のオプション指定は、システムワイドのオプション指定に優先し、コマンドラインで与えられたオプションは両方に優先します。コンフィギュレーション・ファイルの書式は「option=
特定ファイル専用のコンフィギュレーション・ファイルも作れます。もし「movie.avi」という名前のファイル用のコンフィギュレーション・ファイルが必要なら、ファイル名「movie.avi.conf」を持つファイルを作って中に設定を書き、それを「~/.mplayer/」に置きます。 -use-filedir-conf オプションを使うなら(コマンドラインで打とうがグローバルコンフィグで指定しようが)、このファイルは再生すべきファイルと同じディレクトリに置いておく事もできます。
EXAMPLE MPLAYER CONFIGURATION FILE:# Use Matrox driver by default. vo=xmga # I love practicing handstands while watching videos. flip=yes # Decode/encode multiple files from PNG, # start with mf://filemask mf=type=png:fps=25 # Eerie negative images are cool. vf=eq2=1.0:-0.8EXAMPLE MENCODER CONFIGURATION FILE:
# Make MEncoder output to a default filename. o=encoded.avi # The next 4 lines allow mencoder tv:// to start capturing immediately. oac=pcm=yes ovc=lavc=yes lavcopts=vcodec=mjpeg tv=driver=v4l2:input=1:width=768:height=576:device=/dev/video0:audiorate=48000 # more complex default encoding option set lavcopts=vcodec=mpeg4:autoaspect=1 lameopts=aq=2:vbr=4 ovc=lavc=1 oac=lavc=1 passlogfile=pass1stats.log noautoexpand=1 subfont-autoscale=3 subfont-osd-scale=6 subfont-text-scale=4 subalign=2 subpos=96 spuaa=20
You can put all of the options in configurationfiles which will be
read every time MPlayer/MEncoder is run. The system-wide configuration
file 'mplayer.conf' is in yourconfiguration directory (e.g. /etc/
mplayer or /usr/local/etc/mplayer), the user specific one is '~/.mplay-
er/config'. The configuration file for MEncoder is 'mencoder.conf' in
your configuration directory (e.g. /etc/mplayer or /usr/local/etc/
mplayer), the user specific one is '~/.mplayer/mencoder.conf. User
specific options override system-wide options and options given on the
command line override either. The syntax of the configuration files is
'option=', everything after a '#' is considered a comment. Op-
tions that work without values can be enabled by setting them to 'yes'
or '1'or 'true' and disabled by settingthem to 'no' or '0' or
'false'. Even suboptions can be specified in this way.
You can also write file-specific configuration files. If you wish to
have a configuration file for a file called 'movie.avi', create a file
named 'movie.avi.conf' with the file-specific options in it and put it
in ~/.mplayer/. You can also put the configuration file in the same
directory as the file to be played, as long as you give the -use-
filedir-conf option (either on the command line or in your global con-
fig file).
EXAMPLE MPLAYER CONFIGURATION FILE:
# Use Matrox driver by default.
vo=xmga
# I love practicing handstands while watching videos.
flip=yes
# Decode/encode multiple files from PNG,
# start with mf://filemask
mf=type=png:fps=25
# Eerie negative images are cool.
vf=eq2=1.0:-0.8
EXAMPLE MENCODER CONFIGURATION FILE:
# Make MEncoder output to a default filename.
o=encoded.avi
# The next 4 lines allow mencoder tv:// to start capturing immediately.
oac=pcm=yes
ovc=lavc=yes
lavcopts=vcodec=mjpeg
tv=driver=v4l2:input=1:width=768:height=576:device=/dev/video0:audiorate=48000
# more complex default encoding option set
lavcopts=vcodec=mpeg4:autoaspect=1
lameopts=aq=2:vbr=4
ovc=lavc=1
oac=lavc=1
passlogfile=pass1stats.log
noautoexpand=1
subfont-autoscale=3
subfont-osd-scale=6
subfont-text-scale=4
subalign=2
subpos=96
spuaa=20