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