yuyunko's blog

ぼうびろく

mplayer オプション

mplayer にはいろんなオプションがあって,かなりわかりにくい.

自分が作業しながら,ながら見するのに使えるオプションを書いておく.

mplayer -loop 0 -fixed-vo -geometry 100%:100% -ontop -shuffle -framedrop -vf dsize=400:-3 ~/Videos/*
-loop 0 ループ回数.0を指定すると無限
-fixed-vo 一つのファイルが再生終わっても,ウィンドウはそのまま(デフォルトだと一回一回ウィンドウが消えて初期化されて,フォーカスを奪われる)
-geometry hoge:fuga プレイヤーの位置.座標指定,もしくはパーセント指定.上の例だと右下
-ontop 最前面
-shuffle ランダム再生
-framedrop フレーム落ちを許す.ボロいマシンなど
-vf ビデオフィルタを用いる宣言
dsize ビデオフィルタの一つでサイズ指定dsize=w:h:aspect-method

aspect-methodは以下
New display width and height. Can also be these special values:
0: original display width and height
-1: original video width and height (default)
-2: Calculate w/h using the other dimension and the original display aspect ratio.
-3: Calculate w/h using the other dimension and the original video aspect ratio.
EXAMPLE:
dsize=800:-2
Specifies a display resolution of 800x600 for a 4/3 aspect video, or 800x450 for a 16/9 aspect video.

まぁ英語なんとなくで・・・-3にしとく