Mercurial > mplayer.hg
annotate DOCS/xml/en/usage.xml @ 13717:10acb5e309e2
Remove incomplete key list and command list and update the other sections
accordingly, commands are documented in DOCS/tech/slave.txt.
author | diego |
---|---|
date | Thu, 21 Oct 2004 11:17:42 +0000 |
parents | d7af73cc38da |
children | 89bbd098cfda |
rev | line source |
---|---|
9675 | 1 <?xml version="1.0" encoding="iso-8859-1"?> |
10913
49b1a67e7381
Add revision keyword to english xml files, to ease translation synchronization
lumag
parents:
10755
diff
changeset
|
2 <!-- $Revision$ --> |
9675 | 3 <chapter id="usage"> |
4 <title>Usage</title> | |
5 | |
6 <sect1 id="commandline"> | |
7 <title>Command line</title> | |
8 | |
9 <para> | |
10 <application>MPlayer</application> utilizes a complex playtree. It consists | |
11 of global options written as first, for example | |
12 | |
13 <screen>mplayer -vfm 5</screen> | |
14 | |
15 and options written after filenames, that apply only to the given | |
16 filename/URL/whatever, for example: | |
17 | |
11737 | 18 <screen>mplayer -vfm 5 <replaceable>movie1.avi</replaceable> <replaceable>movie2.avi</replaceable> -vfm 4</screen> |
9675 | 19 </para> |
20 | |
21 <para> | |
22 You can group filenames/URLs together using <literal>{</literal> and | |
23 <literal>}</literal>. It's useful with option <option>-loop</option>: | |
24 | |
10643 | 25 <screen>mplayer { 1.avi -loop 2 2.avi } -loop 3</screen> |
9675 | 26 |
27 The above command will play files in this order: 1, 1, 2, 1, 1, 2, 1, 1, 2. | |
28 </para> | |
29 | |
30 <para> | |
31 Playing a file: | |
32 <synopsis> | |
33 <command>mplayer</command><!-- | |
34 --> [<replaceable>options</replaceable>]<!-- | |
35 --> [<replaceable>path</replaceable>/]<replaceable>filename</replaceable> | |
36 </synopsis> | |
37 </para> | |
38 | |
39 <para> | |
40 Playing more files: | |
41 <synopsis> | |
42 <command>mplayer</command><!-- | |
43 --> [<replaceable>default options</replaceable>]<!-- | |
44 --> [<replaceable>path</replaceable>/]<replaceable>filename1</replaceable><!-- | |
45 --> [<replaceable>options for filename1</replaceable>]<!-- | |
46 --> <replaceable>filename2</replaceable><!-- | |
47 --> [<replaceable>options for filename2</replaceable>] ... | |
48 </synopsis> | |
49 </para> | |
50 | |
51 <para> | |
52 Playing VCD: | |
53 <synopsis> | |
54 <command>mplayer</command> [<replaceable>options</replaceable>]<!-- | |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
10144
diff
changeset
|
55 --> vcd://<replaceable>trackno</replaceable><!-- |
9675 | 56 --> [-cdrom-device <replaceable>/dev/cdrom</replaceable>] |
57 </synopsis> | |
58 </para> | |
59 | |
60 <para> | |
61 Playing DVD: | |
62 <synopsis> | |
63 <command>mplayer</command> [<replaceable>options</replaceable>]<!-- | |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
10144
diff
changeset
|
64 --> dvd://<replaceable>titleno</replaceable><!-- |
9675 | 65 --> [-dvd-device <replaceable>/dev/dvd</replaceable>] |
66 </synopsis> | |
67 </para> | |
68 | |
69 <para> | |
70 Playing from the WWW: | |
71 <synopsis> | |
72 <command>mplayer</command> [<replaceable>options</replaceable>]<!-- | |
73 --> http://<replaceable>site.com/file.asf</replaceable> | |
74 </synopsis> | |
75 (playlists can be used, too) | |
76 </para> | |
77 | |
78 <para> | |
79 Playing from RTSP: | |
80 <synopsis> | |
81 <command>mplayer</command> [<replaceable>options</replaceable>]<!-- | |
82 --> rtsp://<replaceable>server.example.com/streamName</replaceable> | |
83 </synopsis> | |
84 </para> | |
85 | |
86 <para> | |
87 Examples: | |
88 <screen> | |
11713 | 89 mplayer -vo x11 <replaceable>/mnt/Films/Contact/contact2.mpg</replaceable> |
12833 | 90 mplayer vcd://<replaceable>2</replaceable> -cdrom-device <replaceable>/dev/hdc</replaceable> |
11713 | 91 mplayer -afm 3 <replaceable>/mnt/DVDtrailers/alien4.vob</replaceable> |
92 mplayer dvd://<replaceable>1</replaceable> -dvd-device <replaceable>/dev/hdc</replaceable> | |
93 mplayer -abs 65536 -delay -0.4 -nobps <replaceable>~/movies/test.avi</replaceable><!-- | |
9675 | 94 --></screen> |
95 </para> | |
96 </sect1> | |
97 | |
98 | |
99 <sect1 id="control"> | |
100 <title>Control</title> | |
101 | |
102 <para> | |
103 <application>MPlayer</application> has a fully configurable, command | |
104 driven, control layer which lets you control | |
105 <application>MPlayer</application> with keyboard, mouse, joystick or remote | |
106 control (using LIRC). See the man page for the complete list of keyboard controls. | |
107 </para> | |
108 | |
109 | |
110 <sect2 id="ctrl-cfg"> | |
111 <title>Controls configuration</title> | |
112 | |
113 <para> | |
114 <application>MPlayer</application> allows you bind any key/button to any | |
11540 | 115 <application>MPlayer</application> command using a simple config file. |
116 The syntax consist of a key name followed by a command. The default config file location is | |
9675 | 117 <filename>$HOME/.mplayer/input.conf</filename> but it can be overridden |
118 using the <option>-input <replaceable>conf</replaceable></option> option | |
119 (relative path are relative to <filename>$HOME/.mplayer</filename>). | |
120 </para> | |
121 | |
13717
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
122 <para> |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
123 You can get a full list of supported key names by running |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
124 <command>mplayer -input keylist</command> |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
125 and a full list of available commands by running |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
126 <command>mplayer -input cmdlist</command>. |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
127 </para> |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
128 |
9675 | 129 <example> |
130 <title>A simple input control file</title> | |
131 <programlisting> | |
132 ## | |
133 ## MPlayer input control file | |
134 ## | |
135 | |
136 RIGHT seek +10 | |
137 LEFT seek -10 | |
138 - audio_delay 0.100 | |
139 + audio_delay -0.100 | |
140 q quit | |
141 > pt_step 1 | |
142 < pt_step -1 | |
143 ENTER pt_step 1 1<!-- | |
144 --></programlisting> | |
145 </example> | |
146 </sect2> | |
147 | |
148 | |
149 <sect2 id="lirc"> | |
150 <title>Control from LIRC</title> | |
151 | |
152 <para> | |
153 Linux Infrared Remote Control - use an easy to build home-brewn IR-receiver, | |
154 an (almost) arbitrary remote control and control your linux box with it! | |
155 More about it at <ulink url="http://www.lirc.org">www.lirc.org</ulink>. | |
156 </para> | |
157 | |
158 <para> | |
159 If you have installed the lirc-package, configure will autodetect it. If | |
160 everything went fine, <application>MPlayer</application> will print a | |
161 message like "<computeroutput>Setting up lirc support...</computeroutput>" | |
162 on startup. If an error occurs it will tell you. If it doesn't tell you | |
163 anything about LIRC there's no support compiled in. That's it :-) | |
164 </para> | |
165 | |
166 <para> | |
167 The application name for <application>MPlayer</application> is - oh wonder | |
168 - <filename>mplayer</filename>. You can use any mplayer commands and even | |
169 pass more than one command by separating them with <literal>\n</literal>. | |
170 Don't forget to enable the repeat flag in <filename>.lircrc</filename> when | |
171 it make sense (seek, volume, etc). Here's an excerpt from my | |
172 <filename>.lircrc</filename>: | |
173 </para> | |
174 | |
175 <programlisting> | |
176 begin | |
177 button = VOLUME_PLUS | |
178 prog = mplayer | |
179 config = volume 1 | |
180 repeat = 1 | |
181 end | |
182 | |
183 begin | |
184 button = VOLUME_MINUS | |
185 prog = mplayer | |
186 config = volume -1 | |
187 repeat = 1 | |
188 end | |
189 | |
190 begin | |
191 button = CD_PLAY | |
192 prog = mplayer | |
193 config = pause | |
194 end | |
195 | |
196 begin | |
197 button = CD_STOP | |
198 prog = mplayer | |
199 config = seek 0 1\npause | |
200 end<!-- | |
201 --></programlisting> | |
202 | |
203 <para> | |
204 If you don't like the standard location for the lirc-config file | |
205 (<filename>~/.lircrc</filename>) use the <option>-lircconf | |
206 <replaceable>filename</replaceable></option> switch to specify another | |
207 file. | |
208 </para> | |
209 </sect2> | |
210 | |
211 | |
212 <sect2 id="slave-mode"> | |
213 <title>Slave mode</title> | |
214 <para> | |
13717
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
215 The slave mode allows you to build simple frontends to |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
216 <application>MPlayer</application>. When run with the |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
217 <option>-slave</option> option <application>MPlayer</application> will |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
218 read commands separated by a newline (\n) from stdin. |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
219 The commands are documented in the |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
220 <ulink url="../../tech/slave.txt">slave.txt</ulink> file. |
9675 | 221 </para> |
222 </sect2> | |
223 </sect1> | |
224 | |
225 | |
226 <sect1 id="streaming"> | |
227 <title>Streaming from network or pipes</title> | |
228 | |
229 <para> | |
230 <application>MPlayer</application> can play files from network, using the | |
10755 | 231 HTTP, FTP, MMS or RTSP/RTP protocol. |
9675 | 232 </para> |
233 | |
234 <para> | |
235 Playing goes by simply using adding the URL to the command line. | |
236 <application>MPlayer</application> also honors the | |
237 <envar>http_proxy</envar> environment variable, and uses proxy if | |
238 available. Proxy usage can also be forced: | |
11713 | 239 <screen>mplayer <replaceable>http_proxy://proxy.micorsops.com:3128/http://micorsops.com:80/stream.asf</replaceable></screen> |
9675 | 240 </para> |
241 | |
242 <para> | |
243 <application>MPlayer</application> can read from stdin | |
244 (<emphasis>not</emphasis> named pipes). This can be for example used to | |
245 play from FTP: | |
11713 | 246 <screen>wget <replaceable>ftp://micorsops.com/something.avi</replaceable> -O - | mplayer -</screen> |
9675 | 247 </para> |
248 | |
11035
094e0838e5a7
<para>Note:.... </para> really should be <note><para>....</para></note>
lumag
parents:
10968
diff
changeset
|
249 <note><para> |
11143
ebf702420f9b
Add some missing <option> tags, patch by Torinthiel.
diego
parents:
11035
diff
changeset
|
250 Note: it's also recommended to enable <option>-cache</option> when playback from network: |
11713 | 251 <screen>wget <replaceable>ftp://micorsops.com/something.avi</replaceable> -O - | mplayer -cache 8192 -</screen> |
11035
094e0838e5a7
<para>Note:.... </para> really should be <note><para>....</para></note>
lumag
parents:
10968
diff
changeset
|
252 </para></note> |
9675 | 253 </sect1> |
9966 | 254 |
255 <sect1 id="mpst" xreflabel="Remote streams"> | |
256 <title>Remote streams</title> | |
257 | |
258 <para> | |
259 Remote streams allow you to access most <application>MPlayer</application> | |
260 stream type from a remote host. The main purpose of this feature is to make | |
261 it possible to directly use the CD or DVD drive of another computer on the | |
262 network (provided you have the required bandwidth). On the downside some | |
11271
252fb0cf331a
spelling fixes, mostly by <ismail.donmez@boun.edu.tr>
diego
parents:
11143
diff
changeset
|
263 stream type (currently TV and MF) are not usable remotely because they are |
9966 | 264 implemented at the demuxer level. It's sad for MF but TV stream would anyway |
11271
252fb0cf331a
spelling fixes, mostly by <ismail.donmez@boun.edu.tr>
diego
parents:
11143
diff
changeset
|
265 require an insane amount of bandwidth. |
9966 | 266 </para> |
267 | |
268 <sect2 id="compile_mpst_server"> | |
269 <title>Compiling the server</title> | |
270 <para> | |
271 After having compiled <application>MPlayer</application> go to the | |
272 <filename>TOOLS/netstream</filename> directory and enter | |
273 <application>make</application> to build the server binary. | |
274 You can then copy the <application>netstream</application> binary | |
9969 | 275 to the right place on your system (usually |
276 <filename class="directory">/usr/local/bin</filename> on Linux). | |
9966 | 277 </para> |
278 </sect2> | |
279 | |
280 <sect2 id="use_mpst"> | |
281 <title>Using remote streams</title> | |
282 <para> | |
283 First you have to start the server on the computer you intend to remotely | |
284 access. Currently the server is very basic and doesn't have any commands | |
285 line arguments so just enter <filename>netstream</filename>. Now you can | |
286 for example play the second track of a VCD on the server with : | |
287 <screen> | |
11713 | 288 mplayer -cache 5000 <replaceable>mpst://servername/vcd://2</replaceable> |
9966 | 289 </screen> |
290 You can also access files on this server : | |
291 <screen> | |
11713 | 292 mplayer -cache 5000 <replaceable>mpst://servername//usr/local/movies/lol.avi</replaceable> |
9966 | 293 </screen> |
11271
252fb0cf331a
spelling fixes, mostly by <ismail.donmez@boun.edu.tr>
diego
parents:
11143
diff
changeset
|
294 Note that paths which aren't starting with a / will be relative to |
11143
ebf702420f9b
Add some missing <option> tags, patch by Torinthiel.
diego
parents:
11035
diff
changeset
|
295 the directory where the server is running. The <option>-cache</option> option is not |
9966 | 296 needed but highly recommended. |
297 </para> | |
298 | |
299 <para> | |
300 Be aware that currently the server is not secure at all. So don't complain | |
11271
252fb0cf331a
spelling fixes, mostly by <ismail.donmez@boun.edu.tr>
diego
parents:
11143
diff
changeset
|
301 about the numerous exploits which are possible through this. Instead send |
9966 | 302 some (good) patch to make it better or start writing your own server. |
303 </para> | |
304 | |
305 </sect2> | |
306 | |
307 </sect1> | |
11786 | 308 |
309 <sect1 id="edl" xreflabel="Edit Decision Lists (EDL)"> | |
310 <title>Edit Decision Lists (EDL)</title> | |
311 | |
312 <para> | |
313 The edit decision list (EDL) system allows you to automatically skip | |
314 or mute sections of videos during playback, based on a movie specific | |
315 EDL configuration file. | |
316 </para> | |
317 | |
318 <para> | |
319 This is useful for those who may want to watch a film in "family-friendly" | |
320 mode. You can cut out any violence, profanity, Jar-Jar Binks .. from a movie | |
321 according to your own personal preferences. Aside from this, there are other | |
322 uses, like automatically skipping over commercials in video files you watch. | |
323 </para> | |
324 | |
325 <para> | |
326 The EDL file format is pretty bare-bones. Once the EDL system has reached a | |
327 certain level of maturity, an XML-based file format will probably be implemented | |
328 (keeping backwards compatibility with previous EDL formats). | |
329 </para> | |
330 | |
331 <para> | |
332 The maximum number of EDL entries for the current incarnation of EDL is 1000. | |
333 If you happen to need more, change the <systemitem>#define MAX_EDL_ENTRIES</systemitem> | |
334 in the <filename>edl.h</filename> file. | |
335 </para> | |
336 | |
337 <sect2 id="edl_using"> | |
338 <title>Using an EDL file</title> | |
339 <para> | |
340 Include the <option>-edl <filename></option> flag when you run | |
341 <application>MPlayer</application>, with the name of the EDL file you | |
342 want applied to the video. | |
343 </para> | |
344 </sect2> | |
345 | |
346 <sect2 id="edl_making"> | |
347 <title>Making an EDL file</title> | |
348 <para> | |
349 The current EDL file format is: | |
350 <programlisting> | |
351 [begin second] [end second] [action] | |
352 </programlisting> | |
353 Where the seconds are floating-point numbers and the action is either | |
354 <literal>0</literal> for skip or <literal>1</literal> for mute. Example: | |
355 <programlisting> | |
356 5.3 7.1 0 | |
357 15 16.7 1 | |
358 420 422 0 | |
359 </programlisting> | |
360 This will skip from second 5.3 to second 7.1 of the video, then mute at | |
361 15 seconds, unmute at 16.7 seconds and skip from second 420 to second 422 | |
362 of the video. These actions will be performed when the playback timer | |
363 reaches the times given in the file. | |
364 </para> | |
365 | |
366 <para> | |
367 To create an EDL file to work from, use the <option>-edlout <filename></option> | |
368 flag. During playback, when you want to mark the previous two seconds to skip over, | |
369 hit <keycap>i</keycap>. A corresponding entry will be written to the file for | |
370 that time. You can then go back and fine-tune the generated EDL file. | |
371 </para> | |
372 </sect2> | |
373 | |
374 </sect1> | |
375 | |
9675 | 376 </chapter> |