Mercurial > mplayer.hg
annotate DOCS/xml/en/usage.xml @ 10913:49b1a67e7381
Add revision keyword to english xml files, to ease translation synchronization
(as in help/help_mp-en.h)
author | lumag |
---|---|
date | Sun, 21 Sep 2003 13:05:42 +0000 |
parents | 8ec62402a8a3 |
children | 7c0c0f2a1609 |
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 | |
18 <screen>mplayer -vfm 5 movie1.avi movie2.avi -vfm 4</screen> | |
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 Latest versions of <application>MPlayer</application> also accepts VCD and | |
10144 | 88 DVD tracks in URL style, just like <application>xine</application> does: |
9675 | 89 <screen>mplayer dvd://1</screen> |
90 or | |
91 <screen>mplayer vcd://1</screen> | |
92 </para> | |
93 | |
94 <para> | |
95 Examples: | |
96 <screen> | |
97 mplayer -vo x11 /mnt/Films/Contact/contact2.mpg | |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
10144
diff
changeset
|
98 mplayer vcd://2 -cd-rom-device /dev/hdc |
9675 | 99 mplayer -afm 3 /mnt/DVDtrailers/alien4.vob |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
10144
diff
changeset
|
100 mplayer dvd://1 -dvd-device /dev/hdc |
9675 | 101 mplayer -abs 65536 -delay -0.4 -nobps ~/movies/test.avi<!-- |
102 --></screen> | |
103 </para> | |
104 </sect1> | |
105 | |
106 | |
107 <sect1 id="control"> | |
108 <title>Control</title> | |
109 | |
110 <para> | |
111 <application>MPlayer</application> has a fully configurable, command | |
112 driven, control layer which lets you control | |
113 <application>MPlayer</application> with keyboard, mouse, joystick or remote | |
114 control (using LIRC). See the man page for the complete list of keyboard controls. | |
115 </para> | |
116 | |
117 | |
118 <sect2 id="ctrl-cfg"> | |
119 <title>Controls configuration</title> | |
120 | |
121 <para> | |
122 <application>MPlayer</application> allows you bind any key/button to any | |
123 MPlayer command using a simple config file. The syntax consist of a key | |
124 name followed by a command. The default config file location is | |
125 <filename>$HOME/.mplayer/input.conf</filename> but it can be overridden | |
126 using the <option>-input <replaceable>conf</replaceable></option> option | |
127 (relative path are relative to <filename>$HOME/.mplayer</filename>). | |
128 </para> | |
129 | |
130 <example> | |
131 <title>A simple input control file</title> | |
132 <programlisting> | |
133 ## | |
134 ## MPlayer input control file | |
135 ## | |
136 | |
137 RIGHT seek +10 | |
138 LEFT seek -10 | |
139 - audio_delay 0.100 | |
140 + audio_delay -0.100 | |
141 q quit | |
142 > pt_step 1 | |
143 < pt_step -1 | |
144 ENTER pt_step 1 1<!-- | |
145 --></programlisting> | |
146 </example> | |
147 | |
148 | |
149 <sect3 id="ctrl-cfg-keys"> | |
150 <title>Key names</title> | |
151 | |
152 <para> | |
153 You can have a full list by running | |
154 <command>mplayer -input keylist</command>. | |
155 </para> | |
156 | |
157 <itemizedlist> | |
158 <title>Keyboard</title> | |
159 <listitem><simpara>Any printable character</simpara></listitem> | |
160 <listitem><simpara><literal>SPACE</literal></simpara></listitem> | |
161 <listitem><simpara><literal>ENTER</literal></simpara></listitem> | |
162 <listitem><simpara><literal>TAB</literal></simpara></listitem> | |
163 <listitem><simpara><literal>CTRL</literal></simpara></listitem> | |
164 <listitem><simpara><literal>BS</literal></simpara></listitem> | |
165 <listitem><simpara><literal>DEL</literal></simpara></listitem> | |
166 <listitem><simpara><literal>INS</literal></simpara></listitem> | |
167 <listitem><simpara><literal>HOME</literal></simpara></listitem> | |
168 <listitem><simpara><literal>END</literal></simpara></listitem> | |
169 <listitem><simpara><literal>PGUP</literal></simpara></listitem> | |
170 <listitem><simpara><literal>PGDWN</literal></simpara></listitem> | |
171 <listitem><simpara><literal>ESC</literal></simpara></listitem> | |
172 <listitem><simpara><literal>RIGHT</literal></simpara></listitem> | |
173 <listitem><simpara><literal>LEFT</literal></simpara></listitem> | |
174 <listitem><simpara><literal>UP</literal></simpara></listitem> | |
175 <listitem><simpara><literal>DOWN</literal></simpara></listitem> | |
176 </itemizedlist> | |
177 | |
178 <itemizedlist> | |
179 <title>Mouse (only supported under X)</title> | |
180 <listitem><simpara> | |
181 <literal>MOUSE_BTN0</literal> (Left button)</simpara></listitem> | |
182 <listitem><simpara> | |
183 <literal>MOUSE_BTN1</literal> (Right button)</simpara></listitem> | |
184 <listitem><simpara> | |
185 <literal>MOUSE_BTN2</literal> (Middle button)</simpara></listitem> | |
186 <listitem><simpara> | |
187 <literal>MOUSE_BTN3</literal> (Wheel)</simpara></listitem> | |
188 <listitem><simpara> | |
189 <literal>MOUSE_BTN4</literal> (Wheel)</simpara></listitem> | |
190 <listitem><simpara>...</simpara></listitem> | |
191 <listitem><simpara><literal>MOUSE_BTN9</literal></simpara></listitem> | |
192 </itemizedlist> | |
193 | |
194 <itemizedlist> | |
195 <title>Joystick (support must be enabled at compile time)</title> | |
196 <listitem><simpara> | |
197 <literal>JOY_RIGHT</literal> or | |
198 <literal>JOY_AXIS0_PLUS</literal></simpara></listitem> | |
199 <listitem><simpara> | |
200 <literal>JOY_LEFT</literal> or | |
201 <literal>JOY_AXIS0_MINUS</literal></simpara></listitem> | |
202 <listitem><simpara> | |
203 <literal>JOY_UP</literal> or | |
204 <literal>JOY_AXIS1_MINUS</literal></simpara></listitem> | |
205 <listitem><simpara> | |
206 <literal>JOY_DOWN</literal> or | |
207 <literal>JOY_AXIS1_PLUS</literal></simpara></listitem> | |
208 <listitem><simpara><literal>JOY_AXIS2_PLUS</literal></simpara></listitem> | |
209 <listitem><simpara><literal>JOY_AXIS2_MINUS</literal></simpara></listitem> | |
210 <listitem><simpara>...</simpara></listitem> | |
211 <listitem><simpara><literal>JOY_AXIS9_PLUS</literal></simpara></listitem> | |
212 <listitem><simpara><literal>JOY_AXIS9_MINUS</literal></simpara></listitem> | |
213 </itemizedlist> | |
214 </sect3> | |
215 | |
216 | |
217 <sect3 id="ctrl-cfg-commands"> | |
218 <title>Commands</title> | |
219 | |
220 <para> | |
221 You can have a full list of known commands by running | |
222 <command>mplayer -input cmdlist</command>. | |
223 </para> | |
224 | |
225 <itemizedlist> | |
226 <listitem><para><literal>seek</literal> (int) val [(int) type=0]</para> | |
227 <para> | |
228 Seek to some place in the movie. | |
229 Type <literal>0</literal> is a relative seek of +/- val seconds. | |
230 Type <literal>1</literal> seek to val % in the movie. | |
231 </para></listitem> | |
232 <listitem><para><literal>audio_delay</literal> (float) val</para> | |
233 <para> | |
234 Adjust the audio delay of val seconds | |
235 </para></listitem> | |
236 <listitem><para><literal>quit</literal></para> | |
237 <para> | |
238 Quit <application>MPlayer</application> | |
239 </para></listitem> | |
240 <listitem><para><literal>pause</literal></para> | |
241 <para> | |
242 Pause/unpause the playback | |
243 </para></listitem> | |
244 <listitem><para><literal>grap_frames</literal></para> | |
245 <para> | |
246 Somebody know ? | |
247 </para></listitem> | |
248 <listitem><para><literal>pt_step</literal> (int) val [(int) force=0]</para> | |
249 <para> | |
250 Go to next/previous entry in playtree. Val sign tell the direction. If | |
251 no other entry is available in the given direction it won't do anything | |
252 unless force is non 0. | |
253 </para></listitem> | |
254 <listitem><para><literal>pt_up_step</literal> (int) val [(int) force=0]</para> | |
255 <para> | |
256 Like pt_step but it jump to next/previous in the parent list. It's useful | |
257 to break inner loop in the playtree. | |
258 </para></listitem> | |
259 <listitem><para><literal>alt_src_step</literal> (int) val</para> | |
260 <para> | |
261 When more than one source is available it select the next/previous one | |
262 (only supported by asx playlist). | |
263 </para></listitem> | |
264 <listitem><para><literal>sub_delay</literal> (float) val [(int) abs=0]</para> | |
265 <para> | |
266 Adjust the subtitles delay of +/- val seconds or set it to val seconds | |
267 when abs is non zero. | |
268 </para></listitem> | |
269 <listitem><para><literal>osd</literal> [(int) level=-1]</para> | |
270 <para> | |
271 Toggle osd mode or set it to level when level > 0. | |
272 </para></listitem> | |
273 <listitem><para><literal>volume</literal> (int) dir</para> | |
274 <para>Increase/decrease volume | |
275 </para></listitem> | |
276 <listitem><simpara><literal>contrast</literal> (int) val [(int) abs=0] | |
277 </simpara></listitem> | |
278 <listitem><simpara><literal>brightness</literal> (int) val [(int) abs=0] | |
279 </simpara></listitem> | |
280 <listitem><simpara><literal>hue</literal> (int) val [(int) abs=0] | |
281 </simpara></listitem> | |
282 <listitem><para><literal>saturation</literal> (int) val [(int) abs=0]</para> | |
283 <para> | |
284 Set/Adjust video parameters. Val range from -100 to 100. | |
285 </para></listitem> | |
286 <listitem><para><literal>frame_drop</literal> [(int) type=-1]</para> | |
287 <para> | |
288 Toggle/Set frame dropping mode. | |
289 </para></listitem> | |
290 <listitem><para><literal>sub_visibility</literal></para> | |
291 <para> | |
292 Adjust subtitles visibility. | |
293 </para></listitem> | |
294 <listitem><para><literal>sub_pos</literal> (int) val</para> | |
295 <para> | |
296 Adjust subtitles position. | |
297 </para></listitem> | |
298 <listitem><para><literal>vobsub_lang</literal></para> | |
299 <para> | |
300 Change the language of VobSub subtitles. | |
301 </para></listitem> | |
302 <listitem><para><literal>vo_fullscreen</literal></para> | |
303 <para> | |
304 Switch fullscreen mode. | |
305 </para></listitem> | |
306 <listitem><para><literal>tv_step_channel</literal> (int) dir</para> | |
307 <para> | |
308 Select next/previous tv channel. | |
309 </para></listitem> | |
310 <listitem><para><literal>tv_step_norm</literal></para> | |
311 <para> | |
312 Change TV norm. | |
313 </para></listitem> | |
314 <listitem><para><literal>tv_step_chanlist</literal></para> | |
315 <para> | |
316 Change channel list. | |
317 </para></listitem> | |
318 <listitem><simpara><literal>gui_loadfile</literal></simpara></listitem> | |
319 <listitem><simpara><literal>gui_loadsubtitle</literal></simpara></listitem> | |
320 <listitem><simpara><literal>gui_about</literal></simpara></listitem> | |
321 <listitem><simpara><literal>gui_play</literal></simpara></listitem> | |
322 <listitem><simpara><literal>gui_stop</literal></simpara></listitem> | |
323 <listitem><simpara><literal>gui_playlist</literal></simpara></listitem> | |
324 <listitem><simpara><literal>gui_preferences</literal></simpara></listitem> | |
325 <listitem><para><literal>gui_skinbrowser</literal></para> | |
326 <para> | |
327 GUI actions | |
328 </para></listitem> | |
329 </itemizedlist> | |
330 </sect3> | |
331 </sect2> | |
332 | |
333 | |
334 <sect2 id="lirc"> | |
335 <title>Control from LIRC</title> | |
336 | |
337 <para> | |
338 Linux Infrared Remote Control - use an easy to build home-brewn IR-receiver, | |
339 an (almost) arbitrary remote control and control your linux box with it! | |
340 More about it at <ulink url="http://www.lirc.org">www.lirc.org</ulink>. | |
341 </para> | |
342 | |
343 <para> | |
344 If you have installed the lirc-package, configure will autodetect it. If | |
345 everything went fine, <application>MPlayer</application> will print a | |
346 message like "<computeroutput>Setting up lirc support...</computeroutput>" | |
347 on startup. If an error occurs it will tell you. If it doesn't tell you | |
348 anything about LIRC there's no support compiled in. That's it :-) | |
349 </para> | |
350 | |
351 <para> | |
352 The application name for <application>MPlayer</application> is - oh wonder | |
353 - <filename>mplayer</filename>. You can use any mplayer commands and even | |
354 pass more than one command by separating them with <literal>\n</literal>. | |
355 Don't forget to enable the repeat flag in <filename>.lircrc</filename> when | |
356 it make sense (seek, volume, etc). Here's an excerpt from my | |
357 <filename>.lircrc</filename>: | |
358 </para> | |
359 | |
360 <programlisting> | |
361 begin | |
362 button = VOLUME_PLUS | |
363 prog = mplayer | |
364 config = volume 1 | |
365 repeat = 1 | |
366 end | |
367 | |
368 begin | |
369 button = VOLUME_MINUS | |
370 prog = mplayer | |
371 config = volume -1 | |
372 repeat = 1 | |
373 end | |
374 | |
375 begin | |
376 button = CD_PLAY | |
377 prog = mplayer | |
378 config = pause | |
379 end | |
380 | |
381 begin | |
382 button = CD_STOP | |
383 prog = mplayer | |
384 config = seek 0 1\npause | |
385 end<!-- | |
386 --></programlisting> | |
387 | |
388 <para> | |
389 If you don't like the standard location for the lirc-config file | |
390 (<filename>~/.lircrc</filename>) use the <option>-lircconf | |
391 <replaceable>filename</replaceable></option> switch to specify another | |
392 file. | |
393 </para> | |
394 </sect2> | |
395 | |
396 | |
397 <sect2 id="slave-mode"> | |
398 <title>Slave mode</title> | |
399 <para> | |
400 The slave mode allow you to build simple frontend to | |
401 <application>MPlayer</application>. When enabled (with the | |
402 <option>-slave</option> option) <application>MPlayer</application> will | |
403 read commands separated by new line (\n) from stdin. | |
404 </para> | |
405 </sect2> | |
406 </sect1> | |
407 | |
408 | |
409 <sect1 id="streaming"> | |
410 <title>Streaming from network or pipes</title> | |
411 | |
412 <para> | |
413 <application>MPlayer</application> can play files from network, using the | |
10755 | 414 HTTP, FTP, MMS or RTSP/RTP protocol. |
9675 | 415 </para> |
416 | |
417 <para> | |
418 Playing goes by simply using adding the URL to the command line. | |
419 <application>MPlayer</application> also honors the | |
420 <envar>http_proxy</envar> environment variable, and uses proxy if | |
421 available. Proxy usage can also be forced: | |
422 <screen>mplayer http_proxy://proxy.micorsops.com:3128/http://micorsops.com:80/stream.asf</screen> | |
423 </para> | |
424 | |
425 <para> | |
426 <application>MPlayer</application> can read from stdin | |
427 (<emphasis>not</emphasis> named pipes). This can be for example used to | |
428 play from FTP: | |
429 <screen>wget ftp://micorsops.com/something.avi -O - | mplayer -</screen> | |
430 </para> | |
431 | |
432 <para> | |
433 Note: it's also recommended to enable CACHE when playback from network: | |
434 <screen>wget ftp://micorsops.com/something.avi -O - | mplayer -cache 8192 -</screen> | |
435 </para> | |
436 </sect1> | |
9966 | 437 |
438 <sect1 id="mpst" xreflabel="Remote streams"> | |
439 <title>Remote streams</title> | |
440 | |
441 <para> | |
442 Remote streams allow you to access most <application>MPlayer</application> | |
443 stream type from a remote host. The main purpose of this feature is to make | |
444 it possible to directly use the CD or DVD drive of another computer on the | |
445 network (provided you have the required bandwidth). On the downside some | |
446 stream type (currently TV and MF) are not useable remotely because they are | |
447 implemented at the demuxer level. It's sad for MF but TV stream would anyway | |
448 require an insane amount of bandwith. | |
449 </para> | |
450 | |
451 <sect2 id="compile_mpst_server"> | |
452 <title>Compiling the server</title> | |
453 <para> | |
454 After having compiled <application>MPlayer</application> go to the | |
455 <filename>TOOLS/netstream</filename> directory and enter | |
456 <application>make</application> to build the server binary. | |
457 You can then copy the <application>netstream</application> binary | |
9969 | 458 to the right place on your system (usually |
459 <filename class="directory">/usr/local/bin</filename> on Linux). | |
9966 | 460 </para> |
461 </sect2> | |
462 | |
463 <sect2 id="use_mpst"> | |
464 <title>Using remote streams</title> | |
465 <para> | |
466 First you have to start the server on the computer you intend to remotely | |
467 access. Currently the server is very basic and doesn't have any commands | |
468 line arguments so just enter <filename>netstream</filename>. Now you can | |
469 for example play the second track of a VCD on the server with : | |
470 <screen> | |
471 mplayer -cache 5000 mpst://servername/vcd://2 | |
472 </screen> | |
473 You can also access files on this server : | |
474 <screen> | |
475 mplayer -cache 5000 mpst://servername//usr/local/movies/lol.avi | |
476 </screen> | |
477 Note that paths wich aren't starting with a / will be relative to | |
478 the directory where the server is running. The cache option is not | |
479 needed but highly recommended. | |
480 </para> | |
481 | |
482 <para> | |
483 Be aware that currently the server is not secure at all. So don't complain | |
484 about the numerous exploits wich are possible through this. Instead send | |
485 some (good) patch to make it better or start writing your own server. | |
486 </para> | |
487 | |
488 </sect2> | |
489 | |
490 </sect1> | |
9675 | 491 </chapter> |