Mercurial > mplayer.hg
annotate DOCS/xml/en/usage.xml @ 15981:c20bd4b50521
Remove rencently added FAQ entry because we now have a much better and detailed doc elsewhere.
author | gpoirier |
---|---|
date | Sat, 16 Jul 2005 18:04:31 +0000 |
parents | 2b9a8966c53f |
children | 7a5d36c0633b |
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> | |
15463 | 40 Another way to play a file: |
41 <synopsis> | |
42 <command>mplayer</command><!-- | |
43 --> [<replaceable>options</replaceable>]<!-- | |
44 --> <replaceable>file:///uri-escaped-path</replaceable> | |
45 </synopsis> | |
46 </para> | |
47 | |
48 <para> | |
9675 | 49 Playing more files: |
50 <synopsis> | |
51 <command>mplayer</command><!-- | |
52 --> [<replaceable>default options</replaceable>]<!-- | |
53 --> [<replaceable>path</replaceable>/]<replaceable>filename1</replaceable><!-- | |
54 --> [<replaceable>options for filename1</replaceable>]<!-- | |
55 --> <replaceable>filename2</replaceable><!-- | |
56 --> [<replaceable>options for filename2</replaceable>] ... | |
57 </synopsis> | |
58 </para> | |
59 | |
60 <para> | |
61 Playing VCD: | |
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 --> vcd://<replaceable>trackno</replaceable><!-- |
9675 | 65 --> [-cdrom-device <replaceable>/dev/cdrom</replaceable>] |
66 </synopsis> | |
67 </para> | |
68 | |
69 <para> | |
70 Playing DVD: | |
71 <synopsis> | |
72 <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
|
73 --> dvd://<replaceable>titleno</replaceable><!-- |
9675 | 74 --> [-dvd-device <replaceable>/dev/dvd</replaceable>] |
75 </synopsis> | |
76 </para> | |
77 | |
78 <para> | |
79 Playing from the WWW: | |
80 <synopsis> | |
81 <command>mplayer</command> [<replaceable>options</replaceable>]<!-- | |
82 --> http://<replaceable>site.com/file.asf</replaceable> | |
83 </synopsis> | |
84 (playlists can be used, too) | |
85 </para> | |
86 | |
87 <para> | |
88 Playing from RTSP: | |
89 <synopsis> | |
90 <command>mplayer</command> [<replaceable>options</replaceable>]<!-- | |
91 --> rtsp://<replaceable>server.example.com/streamName</replaceable> | |
92 </synopsis> | |
93 </para> | |
94 | |
95 <para> | |
96 Examples: | |
97 <screen> | |
11713 | 98 mplayer -vo x11 <replaceable>/mnt/Films/Contact/contact2.mpg</replaceable> |
12833 | 99 mplayer vcd://<replaceable>2</replaceable> -cdrom-device <replaceable>/dev/hdc</replaceable> |
11713 | 100 mplayer -afm 3 <replaceable>/mnt/DVDtrailers/alien4.vob</replaceable> |
101 mplayer dvd://<replaceable>1</replaceable> -dvd-device <replaceable>/dev/hdc</replaceable> | |
102 mplayer -abs 65536 -delay -0.4 -nobps <replaceable>~/movies/test.avi</replaceable><!-- | |
9675 | 103 --></screen> |
104 </para> | |
105 </sect1> | |
106 | |
107 | |
108 <sect1 id="control"> | |
109 <title>Control</title> | |
110 | |
111 <para> | |
112 <application>MPlayer</application> has a fully configurable, command | |
113 driven, control layer which lets you control | |
114 <application>MPlayer</application> with keyboard, mouse, joystick or remote | |
115 control (using LIRC). See the man page for the complete list of keyboard controls. | |
116 </para> | |
117 | |
118 | |
119 <sect2 id="ctrl-cfg"> | |
120 <title>Controls configuration</title> | |
121 | |
122 <para> | |
123 <application>MPlayer</application> allows you bind any key/button to any | |
11540 | 124 <application>MPlayer</application> command using a simple config file. |
125 The syntax consist of a key name followed by a command. The default config file location is | |
9675 | 126 <filename>$HOME/.mplayer/input.conf</filename> but it can be overridden |
127 using the <option>-input <replaceable>conf</replaceable></option> option | |
128 (relative path are relative to <filename>$HOME/.mplayer</filename>). | |
129 </para> | |
130 | |
13717
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
131 <para> |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
132 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
|
133 <command>mplayer -input keylist</command> |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
134 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
|
135 <command>mplayer -input cmdlist</command>. |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
136 </para> |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
137 |
9675 | 138 <example> |
139 <title>A simple input control file</title> | |
140 <programlisting> | |
141 ## | |
142 ## MPlayer input control file | |
143 ## | |
144 | |
145 RIGHT seek +10 | |
146 LEFT seek -10 | |
147 - audio_delay 0.100 | |
148 + audio_delay -0.100 | |
149 q quit | |
150 > pt_step 1 | |
151 < pt_step -1 | |
152 ENTER pt_step 1 1<!-- | |
153 --></programlisting> | |
154 </example> | |
155 </sect2> | |
156 | |
157 | |
158 <sect2 id="lirc"> | |
159 <title>Control from LIRC</title> | |
160 | |
161 <para> | |
162 Linux Infrared Remote Control - use an easy to build home-brewn IR-receiver, | |
13873
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
163 an (almost) arbitrary remote control and control your Linux box with it! |
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
164 More about it on the <ulink url="http://www.lirc.org">LIRC homepage</ulink>. |
9675 | 165 </para> |
166 | |
167 <para> | |
13873
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
168 If you have the LIRC package installed, <filename>configure</filename> will |
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
169 autodetect it. If everything went fine, <application>MPlayer</application> |
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
170 will print "<systemitem>Setting up LIRC support...</systemitem>" |
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
171 on startup. If an error occurs it will tell you. If there is no message about |
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
172 LIRC there is no support compiled in. That's it :-) |
9675 | 173 </para> |
174 | |
175 <para> | |
13873
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
176 The application name for <application>MPlayer</application> is - surprise - |
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
177 <filename>mplayer</filename>. You can use any <application>MPlayer</application> |
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
178 commands and even pass more than one command by separating them with |
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
179 <literal>\n</literal>. |
9675 | 180 Don't forget to enable the repeat flag in <filename>.lircrc</filename> when |
13873
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
181 it makes sense (seek, volume, etc). Here's an excerpt from a sample |
9675 | 182 <filename>.lircrc</filename>: |
183 </para> | |
184 | |
185 <programlisting> | |
186 begin | |
187 button = VOLUME_PLUS | |
188 prog = mplayer | |
189 config = volume 1 | |
190 repeat = 1 | |
191 end | |
192 | |
193 begin | |
194 button = VOLUME_MINUS | |
195 prog = mplayer | |
196 config = volume -1 | |
197 repeat = 1 | |
198 end | |
199 | |
200 begin | |
201 button = CD_PLAY | |
202 prog = mplayer | |
203 config = pause | |
204 end | |
205 | |
206 begin | |
207 button = CD_STOP | |
208 prog = mplayer | |
209 config = seek 0 1\npause | |
210 end<!-- | |
211 --></programlisting> | |
212 | |
213 <para> | |
214 If you don't like the standard location for the lirc-config file | |
215 (<filename>~/.lircrc</filename>) use the <option>-lircconf | |
216 <replaceable>filename</replaceable></option> switch to specify another | |
217 file. | |
218 </para> | |
219 </sect2> | |
220 | |
221 | |
222 <sect2 id="slave-mode"> | |
223 <title>Slave mode</title> | |
224 <para> | |
13717
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
225 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
|
226 <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
|
227 <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
|
228 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
|
229 The commands are documented in the |
10acb5e309e2
Remove incomplete key list and command list and update the other sections
diego
parents:
13710
diff
changeset
|
230 <ulink url="../../tech/slave.txt">slave.txt</ulink> file. |
9675 | 231 </para> |
232 </sect2> | |
233 </sect1> | |
234 | |
235 | |
236 <sect1 id="streaming"> | |
237 <title>Streaming from network or pipes</title> | |
238 | |
239 <para> | |
13873
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
240 <application>MPlayer</application> can play files from the network, using the |
10755 | 241 HTTP, FTP, MMS or RTSP/RTP protocol. |
9675 | 242 </para> |
243 | |
244 <para> | |
13873
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
245 Playing works simply by passing the URL on the command line. |
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
246 <application>MPlayer</application> honors the <envar>http_proxy</envar> |
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
247 environment variable, using a proxy if available. Proxies can also be forced: |
11713 | 248 <screen>mplayer <replaceable>http_proxy://proxy.micorsops.com:3128/http://micorsops.com:80/stream.asf</replaceable></screen> |
9675 | 249 </para> |
250 | |
251 <para> | |
252 <application>MPlayer</application> can read from stdin | |
13873
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
253 (<emphasis>not</emphasis> named pipes). This can for example be used to |
9675 | 254 play from FTP: |
11713 | 255 <screen>wget <replaceable>ftp://micorsops.com/something.avi</replaceable> -O - | mplayer -</screen> |
9675 | 256 </para> |
257 | |
11035
094e0838e5a7
<para>Note:.... </para> really should be <note><para>....</para></note>
lumag
parents:
10968
diff
changeset
|
258 <note><para> |
13903 | 259 It's also recommended to enable <option>-cache</option> when playing |
13873
89bbd098cfda
slight grammar/wording/spelling/markup improvements
diego
parents:
13717
diff
changeset
|
260 from the network: |
11713 | 261 <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
|
262 </para></note> |
15499 | 263 |
264 <sect2 id="streaming-save"> | |
265 <title>Saving streamed content</title> | |
266 <para> | |
267 Once you succeed in making <application>MPlayer</application> play | |
15506
2b9a8966c53f
Clarify that -dumpstream works for video as well as audio and mention
diego
parents:
15499
diff
changeset
|
268 your favorite internet stream, you can use the option |
15499 | 269 <option>-dumpstream</option> to save the stream into a file. |
270 For example: | |
271 <screen> | |
15506
2b9a8966c53f
Clarify that -dumpstream works for video as well as audio and mention
diego
parents:
15499
diff
changeset
|
272 mplayer <replaceable>http://217.71.208.37:8006</replaceable> -dumpstream -dumpfile <replaceable>stream.asf</replaceable> |
15499 | 273 </screen> |
274 will save the content streamed from | |
275 <replaceable>http://217.71.208.37:8006</replaceable> into | |
15506
2b9a8966c53f
Clarify that -dumpstream works for video as well as audio and mention
diego
parents:
15499
diff
changeset
|
276 <replaceable>stream.asf</replaceable>. |
2b9a8966c53f
Clarify that -dumpstream works for video as well as audio and mention
diego
parents:
15499
diff
changeset
|
277 This works with all protocols supported by |
15499 | 278 <application>MPlayer</application>, like MMS, RSTP, and so forth. |
15506
2b9a8966c53f
Clarify that -dumpstream works for video as well as audio and mention
diego
parents:
15499
diff
changeset
|
279 If you only wish to save audio or video, use <option>-dumpaudio</option> |
2b9a8966c53f
Clarify that -dumpstream works for video as well as audio and mention
diego
parents:
15499
diff
changeset
|
280 or <option>-dumpvideo</option> respectively, but be aware that |
2b9a8966c53f
Clarify that -dumpstream works for video as well as audio and mention
diego
parents:
15499
diff
changeset
|
281 <application>MPlayer</application> will ignore all but the last |
2b9a8966c53f
Clarify that -dumpstream works for video as well as audio and mention
diego
parents:
15499
diff
changeset
|
282 <option>-dump*</option> option given on the command line. |
15499 | 283 </para> |
284 </sect2> | |
285 | |
9675 | 286 </sect1> |
9966 | 287 |
288 <sect1 id="mpst" xreflabel="Remote streams"> | |
289 <title>Remote streams</title> | |
290 | |
291 <para> | |
292 Remote streams allow you to access most <application>MPlayer</application> | |
293 stream type from a remote host. The main purpose of this feature is to make | |
294 it possible to directly use the CD or DVD drive of another computer on the | |
295 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
|
296 stream type (currently TV and MF) are not usable remotely because they are |
9966 | 297 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
|
298 require an insane amount of bandwidth. |
9966 | 299 </para> |
300 | |
301 <sect2 id="compile_mpst_server"> | |
302 <title>Compiling the server</title> | |
303 <para> | |
304 After having compiled <application>MPlayer</application> go to the | |
305 <filename>TOOLS/netstream</filename> directory and enter | |
306 <application>make</application> to build the server binary. | |
307 You can then copy the <application>netstream</application> binary | |
9969 | 308 to the right place on your system (usually |
309 <filename class="directory">/usr/local/bin</filename> on Linux). | |
9966 | 310 </para> |
311 </sect2> | |
312 | |
313 <sect2 id="use_mpst"> | |
314 <title>Using remote streams</title> | |
315 <para> | |
316 First you have to start the server on the computer you intend to remotely | |
317 access. Currently the server is very basic and doesn't have any commands | |
318 line arguments so just enter <filename>netstream</filename>. Now you can | |
319 for example play the second track of a VCD on the server with : | |
320 <screen> | |
11713 | 321 mplayer -cache 5000 <replaceable>mpst://servername/vcd://2</replaceable> |
9966 | 322 </screen> |
323 You can also access files on this server : | |
324 <screen> | |
11713 | 325 mplayer -cache 5000 <replaceable>mpst://servername//usr/local/movies/lol.avi</replaceable> |
9966 | 326 </screen> |
11271
252fb0cf331a
spelling fixes, mostly by <ismail.donmez@boun.edu.tr>
diego
parents:
11143
diff
changeset
|
327 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
|
328 the directory where the server is running. The <option>-cache</option> option is not |
9966 | 329 needed but highly recommended. |
330 </para> | |
331 | |
332 <para> | |
333 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
|
334 about the numerous exploits which are possible through this. Instead send |
9966 | 335 some (good) patch to make it better or start writing your own server. |
336 </para> | |
337 | |
338 </sect2> | |
339 | |
340 </sect1> | |
11786 | 341 |
342 <sect1 id="edl" xreflabel="Edit Decision Lists (EDL)"> | |
343 <title>Edit Decision Lists (EDL)</title> | |
344 | |
345 <para> | |
346 The edit decision list (EDL) system allows you to automatically skip | |
347 or mute sections of videos during playback, based on a movie specific | |
348 EDL configuration file. | |
349 </para> | |
350 | |
351 <para> | |
352 This is useful for those who may want to watch a film in "family-friendly" | |
353 mode. You can cut out any violence, profanity, Jar-Jar Binks .. from a movie | |
354 according to your own personal preferences. Aside from this, there are other | |
355 uses, like automatically skipping over commercials in video files you watch. | |
356 </para> | |
357 | |
358 <para> | |
359 The EDL file format is pretty bare-bones. Once the EDL system has reached a | |
360 certain level of maturity, an XML-based file format will probably be implemented | |
361 (keeping backwards compatibility with previous EDL formats). | |
362 </para> | |
363 | |
364 <sect2 id="edl_using"> | |
365 <title>Using an EDL file</title> | |
366 <para> | |
367 Include the <option>-edl <filename></option> flag when you run | |
368 <application>MPlayer</application>, with the name of the EDL file you | |
369 want applied to the video. | |
370 </para> | |
371 </sect2> | |
372 | |
373 <sect2 id="edl_making"> | |
374 <title>Making an EDL file</title> | |
375 <para> | |
376 The current EDL file format is: | |
377 <programlisting> | |
378 [begin second] [end second] [action] | |
379 </programlisting> | |
380 Where the seconds are floating-point numbers and the action is either | |
381 <literal>0</literal> for skip or <literal>1</literal> for mute. Example: | |
382 <programlisting> | |
383 5.3 7.1 0 | |
384 15 16.7 1 | |
385 420 422 0 | |
386 </programlisting> | |
387 This will skip from second 5.3 to second 7.1 of the video, then mute at | |
388 15 seconds, unmute at 16.7 seconds and skip from second 420 to second 422 | |
389 of the video. These actions will be performed when the playback timer | |
390 reaches the times given in the file. | |
391 </para> | |
392 | |
393 <para> | |
394 To create an EDL file to work from, use the <option>-edlout <filename></option> | |
395 flag. During playback, when you want to mark the previous two seconds to skip over, | |
396 hit <keycap>i</keycap>. A corresponding entry will be written to the file for | |
397 that time. You can then go back and fine-tune the generated EDL file. | |
398 </para> | |
399 </sect2> | |
400 | |
401 </sect1> | |
402 | |
9675 | 403 </chapter> |