This is an old revision of the document!


mplayer

mplayer is my multimedia player of choice.

blu-ray

Playing Blu-Rays (unencrypted)

mplayer br:// -bluray-device /path/to/disc

Dolby Digital (AC3) through SPDIF

Send audio through the SPDIF device to the audio receiver

mplayer movie.mkv -ao alsa:device=spdif -ac hwac3

PAL playback

For movies with the wrong aspect (PAL), that should be flat but show up in 4/3 try this:

mplayer airborne.vob -monitoraspect 1.00

That should straighten it out. :)

Also, sometimes mplayer dvd:// will play them correctly.

archives: ~/.mplayer/config

# *** Please leave notes as to reasons for each config
#
# MythVideo does *not* call any profiles by default.
# Default player setting is: mplayer-resume --filename

# *** DEFAULTS ***

# Testing VDPAU by default
vo=vdpau
display=:0
# This will also use "mplayer.conf" in current working directory
use-filedir-conf=1
# Could try cache-min x% instead
cache=24576
fontconfig=1
fs=1
# Make sure to unmute "IEC598 1" in alsamixer
ao=alsa:device=hdmi
ac=hwac3,hwdts,

# *** PROFILES: IN USE ***

# Redundant
[hdmi]
ao=alsa:device=hdmi

# TODO: Experiment with -vf crop exact measures
[panscan]
panscan=1
aspect=4:3

[spdif]
ao=alsa:device=spdif
ac=hwac3,hwdts,

# All my wishlist features have been ported to LAVF demuxer.  Upstream will
# play around with switching it on and off as the default.  Flip it on here
# always.
[extension.mkv]
demuxer=lavf

[extension.mpg]
demuxer=lavf

# .mov files can be HD trailers
[extension.mov]
vo=vdpau,xv

# .mp4 files can be HD trailers
[extension.mp4]
vo=vdpau,xv

# You can assume this is BD content
[extension.m2ts]
vo=vdpau,xv

# Called by MythVideo on Series_Name.sh
[series]


# *** PROFILES: EXPERIMENTAL ***

[vo.xvmc]
vo=xvmc,
vc=ffmpeg12mc,
#hardframedrop=1

# Much to my annoyance, mplayer will not use the vdpau playback video codecs by default.
[vo.vdpau]
vo=vdpau
vc=ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau,

[letterbox]
vf=crop=720:368
#vf=crop=704:272:10:104
#aspect=4:3

[playlist]
lircconf=/home/steve/.mplayer/lirc/music

[extension.mp3]
ac=mp3
lircconf=/home/steve/.mplayer/lirc/music

archives: ~/.mplayer/input.conf

RIGHT seek +3
LEFT seek -2
UP seek +30
DOWN seek -30

archives: ~/.mplayer/lircrc

begin
	prog = irexec
	button = 1
	config = date > /tmp/steve
end

begin
	flags = startup_mode
	mode = mplayer
end
begin osd_menu
begin
	prog = mplayer
	button = up
	config = menu up
	flags = quit
end
begin
	prog = mplayer
	button = down
	config = menu down
	flags = quit
end
begin
	prog = mplayer
	button = left
	config = menu left
	flags = quit
end
begin
	prog = mplayer
	button = right
	config = menu right
	flags = quit
end
begin
	prog = mplayer
	button = ok
	config = menu ok
	flags = quit
end
begin
	prog = mplayer
	button = exit
	config = menu hide
	mode = mplayer
	flags = quit
end
begin
	prog = mplayer
	button = menu
	config = menu hide
	mode = mplayer
	flags = quit
end
begin
	prog = mplayer
	button = stop
	config = menu hide
	mode = mplayer
	flags = quit
end
end osd_menu



begin
	prog = mplayer
	button = power
	config = quit
end
begin
	prog = mplayer
	button = play
	config = seek +0
	config = speed_set 1
end
begin
	prog = mplayer
	button = pause
	config = pause
end
begin
	prog = mplayer
	button = stop
	config = quit
end
begin
	prog = mplayer
	button = |<<
	config = seek_chapter -1 0
end
begin
	prog = mplayer
	button = >>|
	config = seek_chapter +1 0
end
# cc / red
begin
	prog = mplayer
	button = red
	config = vobsub_lang eng
	config = vobsub_lang -1
end
# menu / menu
begin
	prog = mplayer
	button = green
	config = switch_ratio 1.3333
	config = switch_ratio 1.77778
end
# guide / green
begin
	prog = mplayer
	button = menu
	config = osd_show_property_text "${metadata/title}" 2400
	config = osd_show_text ""
	#config = osd_show_property_text "${filename}" 2400
	#config = set_menu view_metadata
	#config = menu cancel
	#mode = osd_menu
end
# info / yellow
begin
	prog = mplayer
	button = yellow
	config = osd 3
	config = osd 1
end
# exit / exit
begin
	prog = mplayer
	button = exit
	# old
	config = get_time_pos
	# new
	# config = get_property time_pos
end
begin
	prog = mplayer
	button = exit
	config = get_property filename
end
begin
	prog = mplayer
	button = exit
	config = quit
end
# prev / blue
# exit; if using series-resume will reset playlist
begin
	prog = mplayer
	button = blue
	config = quit 255
end
begin
	prog = mplayer
	button = up
	config = seek +30
end
begin
	prog = mplayer
	button = down
	config = seek -10
end
begin
	prog = mplayer
	button = right
	config = seek +30
end
begin
	prog = mplayer
	button = left
	config = seek -10
end
begin
	prog = mplayer
	button = >>
	config = seek +60
end
begin
	prog = mplayer
	button = <<
	config = seek -60
end
begin
	prog = mplayer
	button = mute
	config = mute
end
begin
	prog = mplayer
	button = ch_up
	config = audio_delay 0.1
end
begin
	prog = mplayer
	button = ch_down
	config = audio_delay -0.1
end
begin
	prog = mplayer
	button = 1
	config = seek +60
end
begin
	prog = mplayer
	button = 2
	config = seek +120
end
begin
	prog = mplayer
	button = 3
	config = seek +180
end
begin
	prog = mplayer
	button = 4
	config = seek +240
end

archives: ~/.mplayer/menu.conf

<keybindings name="default">
    <binding key="UP" cmd="menu up" />
    <binding key="DOWN" cmd="menu down" />
    <binding key="LEFT" cmd="menu left" />
    <binding key="RIGHT" cmd="menu right" />
    <binding key="ENTER" cmd="menu ok" />
    <binding key="ESC" cmd="menu cancel" />
    <binding key="HOME" cmd="menu home" />
    <binding key="END" cmd="menu end" />
    <binding key="PGUP" cmd="menu pageup" />
    <binding key="PGDWN" cmd="menu pagedown" />
    <binding key="MOUSE_BTN0" cmd="menu click" />
    <binding key="MOUSE_BTN2" cmd="menu cancel" />
</keybindings>
<keybindings name="filesel" parent="list">
    <binding key="BS" cmd="menu left" />
</keybindings>
<keybindings name="chapsel" parent="list" />
<keybindings name="txt" parent="list" />
<keybindings name="pt" parent="list" />
 
<txt name="man" file="manpage.txt"/>
 
<filesel name="open_file"/>
<filesel name="open_list" file-action="loadlist '%p'" 
	 title="Open a playlist: %p"
	 filter="/etc/mplayer/extensions_filter"
	 actions="d:run 'mp_loader \'%p\' d',c:run 'mp_loader \'%p\' c'" />
 
<chapsel name="select_chapter" />
 
<pt name="jump_to"/>
 
<console name="console0" height="80" vspace="0">Welcome to MPlayer</console>
 
<txt name="man" file="manpage.txt"/>
 
<pref name="general_pref" title="General">
      <e property="osdlevel" name="OSD level"/>
      <e property="speed" name="Speed"/>
      <e property="loop" name="Loop"/>
</pref>
 
<pref name="demuxer_pref" title="Demuxer">
</pref>
 
 
<pref name="osd_sub_pref" title="Subtitles">
      <e property="sub" name="Subtitles"/>
      <e property="sub_visibility" name="Visibility"/>
      <e property="sub_forced_only" name="Forced sub only"/>
      <e property="sub_alignment" name="Alignment"/>
      <e property="sub_pos" name="Position"/>
      <e property="sub_delay" name="Delay"/>
      <e property="sub_scale" name="Scale"/>
</pref>
 
<pref name="audio_pref" title="Audio">
      <e property="volume" name="Volume"/>
      <e property="balance" name="Balance"/>
      <e property="mute" name="Mute"/>
      <e property="audio_delay" name="Delay"/>
</pref>
 
<pref name="colors_pref" title="Colors">
      <e property="gamma" name="Gamma"/>
      <e property="brightness" name="Brightness"/>
      <e property="contrast" name="Contrast"/>
      <e property="saturation" name="Saturation"/>
      <e property="hue" name="Hue"/>
</pref>
 
<pref name="video_pref" title="Video">
      <e property="fullscreen" name="Fullscreen"/>
      <e property="panscan" name="Panscan"/>
      <menu menu="colors_pref" name="Colors ..."/>
      <e property="ontop" name="Always on top"/>
      <e property="rootwin" name="Root window"/>
      <e property="framedropping" name="Frame dropping"/>
      <e property="vsync" name="VSync"/>
 </pref>
 
 
<cmdlist name="pref_main" title="Preferences" ptr="<>" >
    <e name="General ..." ok="set_menu general_pref"/>
    <e name="Audio ..." ok="set_menu audio_pref"/>
    <e name="Video ..." ok="set_menu video_pref"/>
    <e name="Subtitles ..." ok="set_menu osd_sub_pref"/>
    <e name="Back" ok="menu cancel"/>
</cmdlist>
 
<pref name="properties" title="Stream Properties">
      <e txt="${filename}" name="Name"/>
      <e txt="${video_format}" name="Video Codec"/>
      <e txt="${video_bitrate}" name="Video Bitrate"/>
      <e txt="${width} x ${height}" name="Resolution"/>
      <e txt="${audio_codec}" name="Audio Codec"/>
      <e txt="${audio_bitrate}" name="Audio Bitrate"/>
      <e txt="${samplerate}, ${channels}" name="Audio Samples"/>
</pref>
 
<pref name="view_metadata" title="">
      <e txt="${metadata/collection/title}" name="Series"/>
      <e txt="${metadata/title}" name="Title"/>
      <e txt="${metadata/season/part_number}" name="Season"/>
      <e txt="${metadata/episode/part_number}" name="Episode"/>
      <!-- <e txt="Season ${metadata/season/part_number}, Episode ${metadata/episode/part_number}" name="Track"/> -->
      <e name="Properties" ok="set_menu properties" />
</pref>
 
<cmdlist name="main" title="MPlayer OSD menu" >
      <e name="Pause" ok="pause"/>
      <e name="Chapter ..." ok="set_menu select_chapter"
                            left="seek_chapter -1" right="seek_chapter +1"/>
      <e name="Prev/Next ..." ok="set_menu jump_to"
                            left="pt_step -1" right="pt_step 1"/>
      <e name="Open ..." ok="set_menu open_file"/>
      <e name="Open playlist ..." ok="set_menu open_list"/>
      <e name="Help" ok="set_menu man"/>
      <e name="Pref" ok="set_menu pref_main"/>
      <e name="Properties" ok="set_menu properties"/>
      <e name="Metadata" ok="set_menu view_metadata"/>
      <e name="Console" ok="set_menu console0"/>
      <e name="Quit" ok="quit"/>
</cmdlist>

Navigation