1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.3.Control</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="MPlayer - The Movie Player"><link rel="up" href="usage.html" title="Chapter3.Usage"><link rel="prev" href="subosd.html" title="3.2.Subtitles and OSD"><link rel="next" href="streaming.html" title="3.4.Streaming from network or pipes"><link rel="preface" href="howtoread.html" title="How to read this documentation"><link rel="chapter" href="intro.html" title="Chapter1.Introduction"><link rel="chapter" href="install.html" title="Chapter2.Installation"><link rel="chapter" href="usage.html" title="Chapter3.Usage"><link rel="chapter" href="cd-dvd.html" title="Chapter4.CD/DVD usage"><link rel="chapter" href="faq.html" title="Chapter5.Frequently Asked Questions"><link rel="chapter" href="containers.html" title="Chapter6.Containers"><link rel="chapter" href="codecs.html" title="Chapter7.Codecs"><link rel="chapter" href="video.html" title="Chapter8.Video output devices"><link rel="chapter" href="audio.html" title="Chapter9.Audio output devices"><link rel="chapter" href="tv.html" title="Chapter10.TV"><link rel="chapter" href="radio.html" title="Chapter11.Radio"><link rel="chapter" href="ports.html" title="Chapter12.Ports"><link rel="chapter" href="mencoder.html" title="Chapter13.Basic usage of MEncoder"><link rel="chapter" href="encoding-guide.html" title="Chapter14.Encoding with MEncoder"><link rel="appendix" href="bugreports.html" title="AppendixA.How to report bugs"><link rel="appendix" href="bugs.html" title="AppendixB.Known bugs"><link rel="appendix" href="skin.html" title="AppendixC.MPlayer skin format"><link rel="appendix" href="history.html" title="AppendixD.History"><link rel="subsection" href="control.html#ctrl-cfg" title="3.3.1.Controls configuration"><link rel="subsection" href="control.html#lirc" title="3.3.2.Control from LIRC"><link rel="subsection" href="control.html#slave-mode" title="3.3.3.Slave mode"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.3.Control</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="subosd.html">Prev</a></td><th width="60%" align="center">Chapter3.Usage</th><td width="20%" align="right"><a accesskey="n" href="streaming.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="control"></a>3.3.Control</h2></div></div></div><p>
<span class="application">MPlayer</span> has a fully configurable, command
driven, control layer which lets you control
<span class="application">MPlayer</span> with keyboard, mouse, joystick or remote
control (using LIRC). See the man page for the complete list of keyboard controls.
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ctrl-cfg"></a>3.3.1.Controls configuration</h3></div></div></div><p>
<span class="application">MPlayer</span> allows you bind any key/button to any
<span class="application">MPlayer</span> command using a simple config file.
The syntax consist of a key name followed by a command. The default config file location is
<tt class="filename">$HOME/.mplayer/input.conf</tt> but it can be overridden
using the <tt class="option">-input <em class="replaceable"><code>conf</code></em></tt> option
(relative path are relative to <tt class="filename">$HOME/.mplayer</tt>).
</p><p>
You can get a full list of supported key names by running
<span><strong class="command">mplayer -input keylist</strong></span>
and a full list of available commands by running
<span><strong class="command">mplayer -input cmdlist</strong></span>.
</p><div class="example"><a name="input_control_file"></a><p class="title"><b>Example3.1.A simple input control file</b></p><pre class="programlisting">
##
## MPlayer input control file
##
RIGHT seek +10
LEFT seek -10
- audio_delay 0.100
+ audio_delay -0.100
q quit
> pt_step 1
< pt_step -1
ENTER pt_step 1 1</pre></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="lirc"></a>3.3.2.Control from LIRC</h3></div></div></div><p>
Linux Infrared Remote Control - use an easy to build home-brewn IR-receiver,
an (almost) arbitrary remote control and control your Linux box with it!
More about it on the <a href="http://www.lirc.org" target="_top">LIRC homepage</a>.
</p><p>
If you have the LIRC package installed, <tt class="filename">configure</tt> will
autodetect it. If everything went fine, <span class="application">MPlayer</span>
will print "<code class="systemitem">Setting up LIRC support...</code>"
on startup. If an error occurs it will tell you. If there is no message about
LIRC there is no support compiled in. That's it :-)
</p><p>
The application name for <span class="application">MPlayer</span> is - surprise -
<tt class="filename">mplayer</tt>. You can use any <span class="application">MPlayer</span>
commands and even pass more than one command by separating them with
<code class="literal">\n</code>.
Do not forget to enable the repeat flag in <tt class="filename">.lircrc</tt> when
it makes sense (seek, volume, etc). Here is an excerpt from a sample
<tt class="filename">.lircrc</tt>:
</p><pre class="programlisting">
begin
button = VOLUME_PLUS
prog = mplayer
config = volume 1
repeat = 1
end
begin
button = VOLUME_MINUS
prog = mplayer
config = volume -1
repeat = 1
end
begin
button = CD_PLAY
prog = mplayer
config = pause
end
begin
button = CD_STOP
prog = mplayer
config = seek 0 1\npause
end</pre><p>
If you do not like the standard location for the lirc-config file
(<tt class="filename">~/.lircrc</tt>) use the <tt class="option">-lircconf
<em class="replaceable"><code>filename</code></em></tt> switch to specify another
file.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="slave-mode"></a>3.3.3.Slave mode</h3></div></div></div><p>
The slave mode allows you to build simple frontends to
<span class="application">MPlayer</span>. When run with the
<tt class="option">-slave</tt> option <span class="application">MPlayer</span> will
read commands separated by a newline (\n) from stdin.
The commands are documented in the
<a href="../../tech/slave.txt" target="_top">slave.txt</a> file.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="subosd.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="usage.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="streaming.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.2.Subtitles and OSD</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">3.4.Streaming from network or pipes</td></tr></table></div></body></html>
|