Replace a mention of MPlayer by MEncoder in the MEncoder section.
[mplayer/glamo.git] / DOCS / xml / en / faq.xml
blob4381561ca0bf2975f1fbbee27e329b84fee40797
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- $Revision$ -->
3 <chapter id="faq" xreflabel="FAQ">
4 <title>Frequently Asked Questions</title>
6 <qandaset defaultlabel="qanda">
8 <qandadiv id="faq-development">
9 <title>Development</title>
11 <qandaentry>
12 <question><para>
13 How do I create a proper patch for <application>MPlayer</application>?
14 </para></question>
15 <answer><para>
16 We made a <ulink url="../../tech/patches.txt">short document</ulink>
17 describing all the necessary details. Please follow the instructions.
18 </para></answer>
19 </qandaentry>
21 <qandaentry>
22 <question><para>
23 How do I translate <application>MPlayer</application> to a new language?
24 </para></question>
25 <answer><para>
26 Read the <ulink url="../../tech/translations.txt">translation HOWTO</ulink>,
27 it should explain everything. You can get further help on the
28 <ulink url="http://lists.mplayerhq.hu/mailman/listinfo/mplayer-translations">MPlayer-translations</ulink>
29 mailing list.
30 </para></answer>
31 </qandaentry>
33 <qandaentry>
34 <question><para>
35 How can I support <application>MPlayer</application> development?
36 </para></question>
37 <answer><para>
38 We are more than happy to accept your hardware and software
39 <ulink url="http://www.mplayerhq.hu/donations.html">donations</ulink>.
40 They help us in continuously improving <application>MPlayer</application>.
41 </para></answer>
42 </qandaentry>
44 <qandaentry>
45 <question><para>
46 How can I become an <application>MPlayer</application> developer?
47 </para></question>
48 <answer><para>
49 We always welcome coders and documenters. Read the
50 <ulink url="../../tech/">technical documentation</ulink>
51 to get a first grasp. Then you should subscribe to the
52 <ulink url="http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng">MPlayer-dev-eng</ulink>
53 mailing list and start coding. If you want to help out with the documentation,
54 join the
55 <ulink url="http://lists.mplayerhq.hu/mailman/listinfo/mplayer-docs">MPlayer-docs</ulink>
56 mailing list.
57 </para></answer>
58 </qandaentry>
60 <qandaentry>
61 <question><para>
62 Why don't you use autoconf/automake?
63 </para></question>
64 <answer><para>
65 We have a modular, handwritten build system. It does a reasonably good
66 job, so why change? Besides, we dislike the auto* tools, just like
67 <ulink url="http://freshmeat.net/articles/view/889/">other people</ulink>.
68 </para></answer>
69 </qandaentry>
70 </qandadiv>
72 <!-- ********** -->
74 <qandadiv id="faq-compilation-installation">
75 <title>Compilation and installation</title>
77 <qandaentry>
78 <question><para>
79 Compilation fails with an error and <application>gcc</application> bails out
80 with some cryptic message containing the phrase
81 <systemitem>internal compiler error</systemitem> or
82 <systemitem>unable to find a register to spill</systemitem> or
83 <systemitem>can't find a register in class `GENERAL_REGS'
84 while reloading `asm'</systemitem>.
85 </para></question>
86 <answer><para>
87 You have stumbled over a bug in <application>gcc</application>. Please
88 <ulink url="http://gcc.gnu.org/bugs.html">report it to the gcc team</ulink>
89 but not to us. For some reason <application>MPlayer</application> seems to
90 trigger compiler bugs frequently. Nevertheless we cannot fix them and do not
91 add workarounds for compiler bugs to our sources. To avoid this problem,
92 either stick with a compiler version that is known to be reliable and
93 stable, or upgrade frequently.
94 </para></answer>
95 </qandaentry>
97 <qandaentry>
98 <question><para>
99 Are there binary (RPM/Debian) packages of <application>MPlayer</application>?
100 </para></question>
101 <answer><para>
102 See the <link linkend="debian">Debian</link> and <link linkend="rpm">RPM</link>
103 section for details.
104 </para></answer>
105 </qandaentry>
107 <qandaentry>
108 <question><para>
109 How can I build a 32 bit <application>MPlayer</application> on a 64 bit Athlon?
110 </para></question>
111 <answer><para>
112 Try the following configure options:
113 <screen>
114 ./configure --target=i386-linux --cc="gcc -m32" --as="as --32" --with-extralibdir=/usr/lib
115 </screen>
116 </para></answer>
117 </qandaentry>
119 <qandaentry>
120 <question><para>
121 Configure ends with this text, and <application>MPlayer</application> won't compile!
122 <screen>Your gcc does not support even i386 for '-march' and '-mcpu'</screen>
123 </para></question>
124 <answer><para>
125 Your gcc isn't installed correctly, check the <filename>configure.log</filename>
126 file for details.
127 </para></answer>
128 </qandaentry>
130 <qandaentry>
131 <question><para>
132 I have a Matrox G200/G400/G450/G550, how do I compile/use the
133 <systemitem>mga_vid</systemitem> driver?
134 </para></question>
135 <answer><para>
136 Read the <link linkend="mga_vid">mga_vid</link> section.
137 </para></answer>
138 </qandaentry>
140 <qandaentry>
141 <question><para>
142 During 'make', <application>MPlayer</application> complains about
143 missing X11 libraries. I don't understand, I <emphasis>do</emphasis>
144 have X11 installed!?
145 </para></question>
146 <answer><para>
147 ... but you don't have the X11 development package installed. Or not correctly.
148 It's called <filename>XFree86-devel*</filename> under Red Hat,
149 <filename>xlibs-dev</filename> under Debian Woody and
150 <filename>libx11-dev</filename> under Debian Sarge. Also check if the
151 <filename class="directory">/usr/X11</filename> and
152 <filename class="directory">/usr/include/X11</filename> symlinks exist.
153 </para></answer>
154 </qandaentry>
156 <qandaentry>
157 <question><para>
158 Building on Mac OS 10.3 leads to several link errors.
159 </para></question>
160 <answer>
161 <para>
162 The link error you're experiencing most likely looks like this:
163 <screen>
164 ld: Undefined symbols:
165 _LLCStyleInfoCheckForOpenTypeTables referenced from QuartzCore expected to be defined in ApplicationServices
166 _LLCStyleInfoGetUserRunFeatures referenced from QuartzCore expected to be defined in ApplicationServices
167 </screen>
168 This problem is the result of Apple developers using 10.4 to compile
169 their software and distributing the binaries to 10.3 users via
170 Software Update.
171 The undefined symbols are present in Mac OS 10.4,
172 but not 10.3.
173 One solution can be to downgrade to QuickTime 7.0.1.
174 Here is a better solution.
175 </para>
176 <para>
177 Get an
178 <ulink url="http://rapidshare.de/files/20281171/CompatFrameworks.tgz.html">older copy of the frameworks</ulink>.
179 This will give you a compressed file that contains the QuickTime
180 7.0.1 Framework and a 10.3.9 QuartzCore Framework.
181 </para>
182 <para>
183 Uncompress the files somewhere that is not in your System folder.
184 (i.e. do not install these frameworks into your
185 <filename class="directory">/System/Library/Frameworks</filename>!
186 Using this older copy is only meant to get around link errors!)
187 <screen>gunzip &lt; CompatFrameworks.tgz | tar xvf -</screen>
188 In config.mak, you should append 
189 <systemitem>-F/path/to/where/you/extracted</systemitem>
190 to the <systemitem>OPTFLAGS</systemitem> variable.
191 If you use <application>X-Code</application>, you can just select these
192 frameworks instead of the system ones.
193 </para>
194 <para>
195 The resulting <application>MPlayer</application> binary will actually
196 use the framework that is installed on your system via dynamic links that
197 are resolved at run-time.
198 (You can verify this using <systemitem>otool -l</systemitem>).
199 </para>
200 </answer>
201 </qandaentry>
202 </qandadiv>
204 <!-- ********** -->
206 <qandadiv id="faq-general">
207 <title>General questions</title>
209 <qandaentry>
210 <question><para>
211 Are there any mailing lists on <application>MPlayer</application>?
212 </para></question>
213 <answer><para>
214 Yes. Look at the
215 <ulink url="http://www.mplayerhq.hu/design7/mailing_lists.html">mailing lists section</ulink>
216 of our homepage.
217 </para></answer>
218 </qandaentry>
220 <qandaentry>
221 <question><para>
222 I've found a nasty bug when I tried to play my favorite video!
223 Who should I inform?
224 </para></question>
225 <answer><para>
226 Please read the <link linkend="bugreports">bug reporting guidelines</link>
227 and follow the instructions.
228 </para></answer>
229 </qandaentry>
231 <qandaentry>
232 <question><para>
233 I get a core dump when trying to dump streams, what's wrong?
234 </para></question>
235 <answer><para>
236 Don't panic. Make sure you know where your towel is.</para>
237 <para>
238 Seriously, notice the smiley and start looking for files that end in
239 <filename>.dump</filename>.
240 </para></answer>
241 </qandaentry>
243 <qandaentry>
244 <question><para>
245 When I start playing, I get this message but everything seems fine:
246 <screen>Linux RTC init: ioctl (rtc_pie_on): Permission denied</screen>
247 </para></question>
248 <answer><para>
249 You need a specially set up kernel to use the RTC timing code.
250 For details see the <link linkend="rtc">RTC</link> section of the documentation.
251 </para></answer>
252 </qandaentry>
254 <qandaentry>
255 <question><para>
256 How can I make a screenshot?
257 </para></question>
258 <answer><para>
259 You have to use a video output driver that does not employ an overlay to be
260 able to take a screenshot. Under X11, <option>-vo x11</option> will do, under
261 Windows <option>-vo directx:noaccel</option> works.
262 </para>
263 <para>
264 Alternatively you can run <application>MPlayer</application> with the
265 <systemitem>screenshot</systemitem> video filter
266 (<option>-vf screenshot</option>), and press the <keycap>s</keycap>
267 key to grab a screenshot.
268 </para></answer>
269 </qandaentry>
271 <qandaentry>
272 <question><para>
273 What is the meaning of the numbers on the status line?
274 </para></question>
275 <answer><para>
276 Example:
277 <screen>
278 A: 2.1 V: 2.2 A-V: -0.167 ct: 0.042 57/57 41% 0% 2.6% 0 4 49% 1.00x
279 </screen>
280 <variablelist>
281 <varlistentry>
282   <term><systemitem>A: 2.1</systemitem></term>
283   <listitem><para>audio position in seconds</para></listitem>
284 </varlistentry>
285 <varlistentry>
286   <term><systemitem>V: 2.2</systemitem></term>
287   <listitem><para>video position in seconds</para></listitem>
288 </varlistentry>
289 <varlistentry>
290   <term><systemitem>A-V: -0.167</systemitem></term>
291   <listitem><para>audio-video difference in seconds (delay)</para></listitem>
292 </varlistentry>
293 <varlistentry>
294   <term><systemitem>ct: 0.042</systemitem></term>
295   <listitem><para>total A-V sync correction done</para></listitem>
296 </varlistentry>
297 <varlistentry>
298   <term><systemitem>57/57</systemitem></term>
299   <listitem><para>
300   frames played/decoded (counting from last seek)
301   </para></listitem>
302 </varlistentry>
303 <varlistentry>
304   <term><systemitem>41%</systemitem></term>
305   <listitem><para>
306   video codec CPU usage in percent
307   (for slice rendering and direct rendering this includes video_out)
308   </para></listitem>
309 </varlistentry>
310 <varlistentry>
311   <term><systemitem>0%</systemitem></term>
312   <listitem><para>video_out CPU usage</para></listitem>
313 </varlistentry>
314 <varlistentry>
315   <term><systemitem>2.6%</systemitem></term>
316   <listitem><para>audio codec CPU usage in percent</para></listitem>
317 </varlistentry>
318 <varlistentry>
319   <term><systemitem>0</systemitem></term>
320   <listitem><para>frames dropped to maintain A-V sync</para></listitem>
321 </varlistentry>
322 <varlistentry>
323   <term><systemitem>4</systemitem></term>
324   <listitem><para>
325   current level of image postprocessing (when using <option>-autoq</option>)
326   </para></listitem>
327 </varlistentry>
328 <varlistentry>
329   <term><systemitem>49%</systemitem></term>
330   <listitem><para>
331   current cache size used (around 50% is normal)
332   </para></listitem>
333 </varlistentry>
334 <varlistentry>
335   <term><systemitem>1.00x</systemitem></term>
336   <listitem><para>playback speed as a factor of original speed</para></listitem>
337 </varlistentry>
338 </variablelist>
339 Most of them are for debug purposes, use the <option>-quiet</option>
340 option to make them disappear.
341 You might notice that video_out CPU usage is zero (0%) for some files.
342 This is because it is called directly from the codec and thus cannot
343 be measured separately. If you wish to know the video_out speed, compare
344 the difference when playing the file with <option>-vo null</option> and
345 your usual video output driver.
346 </para></answer>
347 </qandaentry>
349 <qandaentry>
350 <question><para>
351 There are error messages about file not found
352 <filename>/usr/local/lib/codecs/</filename> ...
353 </para></question>
354 <answer><para>
355 Download and install the binary codecs from our
356 <ulink url="http://www.mplayerhq.hu/design7/dload.html">download page</ulink>.
357 </para></answer>
358 </qandaentry>
360 <qandaentry>
361 <question><para>
362 How can I make <application>MPlayer</application> remember the options I
363 use for a particular file, e.g. <filename>movie.avi</filename>?
364 </para></question>
365 <answer><para>
366 Create a file named <filename>movie.avi.conf</filename> with the file-specific
367 options in it and put it in <filename class="directory">~/.mplayer</filename>
368 or in the same directory as the file.
369 </para></answer>
370 </qandaentry>
372 <qandaentry>
373 <question><para>
374 Subtitles are very nice, the most beautiful I've ever seen, but they
375 slow down playing! I know it's unlikely ...
376 </para></question>
377 <answer><para>
378 After running <filename>./configure</filename>,
379 edit <filename>config.h</filename> and replace
380 <systemitem>#undef FAST_OSD</systemitem> with
381 <systemitem>#define FAST_OSD</systemitem>. Then recompile.
382 </para></answer>
383 </qandaentry>
385 <qandaentry>
386 <question><para>
387 How can I run <application>MPlayer</application> in the background?
388 </para></question>
389 <answer><para>
390 Use:
391 <screen>
392 mplayer <replaceable>options</replaceable> <replaceable>filename</replaceable> &lt; /dev/null &amp;
393 </screen>
394 </para></answer>
395 </qandaentry>
396 </qandadiv>
398 <!-- ********** -->
400 <qandadiv id="faq-playback">
401 <title>Playback problems</title>
403 <qandaentry>
404 <question><para>
405 I cannot pinpoint the cause of some strange playback problem.
406 </para></question>
407 <answer><para>
408 Do you have a stray <filename>codecs.conf</filename> file in
409 <filename>~/.mplayer/</filename>, <filename>/etc/</filename>,
410 <filename>/usr/local/etc/</filename> or a similar location? Remove it,
411 an outdated <filename>codecs.conf</filename> file can cause obscure
412 problems and is intended for use only by developers working on codec
413 support. It overrides <application>MPlayer</application>'s internal
414 codec settings, which will wreak havoc if incompatible changes are
415 made in newer program versions. Unless used by experts it is a recipe
416 for disaster in the form of seemingly random and very hard to localize
417 crashes and playback problems. If you still have it somewhere on your
418 system, you should remove it now.
419 </para></answer>
420 </qandaentry>
422 <qandaentry>
423 <question><para>
424 How can I get subtitles to appear on the black margins around a movie?
425 </para></question>
426 <answer><para>
427 Use the <systemitem>expand</systemitem> video filter to increase the
428 area onto which the movie is rendered vertically and place the movie
429 at the top border, for example:
430 <screen>mplayer -vf expand=0:-100:0:0 -slang de dvd://1</screen>
431 </para></answer>
432 </qandaentry>
434 <qandaentry>
435 <question><para>
436 How can I select audio/subtitle tracks from a DVD, OGM, Matroska or NUT file?
437 </para></question>
438 <answer><para>
439 You have to use <option>-aid</option> (audio ID) or <option>-alang</option>
440 (audio language), <option>-sid</option>(subtitle ID) or <option>-slang</option>
441 (subtitle language), for example:
442 <screen>
443 mplayer -alang eng -slang eng <replaceable>example.mkv</replaceable>
444 mplayer -aid 1 -sid 1 <replaceable>example.mkv</replaceable>
445 </screen>
446 To see which ones are available:
447 <screen>
448 mplayer -vo null -ao null -frames 0 -v <replaceable>filename</replaceable> | grep sid
449 mplayer -vo null -ao null -frames 0 -v <replaceable>filename</replaceable> | grep aid
450 </screen>
451 </para></answer>
452 </qandaentry>
454 <qandaentry>
455 <question><para>
456 I'm trying to play a random stream off the internet but it fails.
457 </para></question>
458 <answer><para>
459 Try playing the stream with the <option>-playlist</option> option.
460 </para></answer>
461 </qandaentry>
463 <qandaentry>
464 <question><para>
465 I downloaded a movie off a P2P network and it doesn't work!
466 </para></question>
467 <answer><para>
468 Your file is most probably broken or a fake file. If you got it from
469 a friend, and he says it works, try comparing
470 <application>md5sum</application> hashes.
471 </para></answer>
472 </qandaentry>
474 <qandaentry>
475 <question><para>
476 I'm having trouble getting my subtitles to display, help!!
477 </para></question>
478 <answer><para>
479 Make sure you have installed fonts properly. Run through the steps in the
480 <link linkend="fonts-osd">Fonts and OSD</link> part of the installation
481 section again. If you are using TrueType fonts, verify that you have the
482 <systemitem class="library">FreeType</systemitem> library installed.
483 Other things include checking your subtitles in a text editor or with other
484 players. Also try converting them to another format.
485 </para></answer>
486 </qandaentry>
488 <qandaentry>
489 <question><para>
490 Why doesn't <application>MPlayer</application> work on Fedora Core?
491 </para></question>
492 <answer><para>
493 There is a bad interaction on Fedora between exec-shield,
494 prelink, and any applications which use Windows DLLs
495 (such as <application>MPlayer</application>).
496 </para>
497 <para>
498 The problem is that exec-shield randomizes the load addresses of all the
499 system libraries. This randomization happens at prelink time (once every
500 two weeks).
501 </para>
502 <para>
503 When <application>MPlayer</application> tries to load a Windows DLL it
504 wants to put it at a specific address (0x400000). If an important system
505 library happens to be there already, <application>MPlayer</application>
506 will crash.
507 (A typical symptom would be a segmentation fault when trying
508 to play Windows Media 9 files.)
509 </para>
510 <para>
511 If you run into this problem you have two options:
512 <itemizedlist>
513 <listitem><para>
514   Wait two weeks. It might start working again.
515 </para></listitem>
516 <listitem><para>
517   Relink all the binaries on the system with different
518   prelink options. Here are step by step instructions:
519   </para>
520   <procedure>
521   <step><para>
522     Edit <filename>/etc/syconfig/prelink</filename> and change
523     <programlisting>PRELINK_OPTS=-mR</programlisting> to
524     <programlisting>PRELINK_OPTS="-mR --no-exec-shield"</programlisting>
525   </para></step>
526   <step><para>
527     <command>touch /var/lib/misc/prelink.force</command>
528   </para></step>
529   <step><para>
530     <command>/etc/cron.daily/prelink</command>
531     (This relinks all the applications, and it takes quite a while.)
532   </para></step>
533   <step><para>
534     <command>execstack -s <replaceable>/path/to/</replaceable>mplayer</command>
535     (This turns off exec-shield for the
536     <application>MPlayer</application> binary.)
537   </para></step>
538   </procedure>
539 </listitem>
540 </itemizedlist>
541 </para></answer>
542 </qandaentry>
544 <qandaentry>
545 <question><para>
546 <application>MPlayer</application> dies with
547 <screen>MPlayer interrupted by signal 4 in module: decode_video</screen>
548 </para></question>
549 <answer><para>
550 Don't use <application>MPlayer</application> on a CPU different from the one
551 it was compiled on or recompile with runtime CPU detection
552 (<command>./configure --enable-runtime-cpudetection</command>).
553 </para></answer>
554 </qandaentry>
556 <qandaentry>
557 <question><para>
558 When I try to grab from my tuner, it works, but colors are strange.
559 It's OK with other applications.
560 </para></question>
561 <answer><para>
562 Your card probably reports some colorspaces as supported when in fact
563 it does not support them. Try with YUY2 instead of the
564 default YV12 (see the <link linkend="tv-input">TV</link> section).
565 </para></answer>
566 </qandaentry>
568 <qandaentry>
569 <question><para>
570 I get very strange percentage values (way too big)
571 while playing files on my notebook.
572 </para></question>
573 <answer><para>
574 It's an effect of the power management / power saving system of your notebook
575 (BIOS, not kernel). Plug the external power connector in
576 <emphasis role="bold">before</emphasis> you power on your notebook. You can
577 also try whether
578 <ulink url="http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq.html">cpufreq</ulink>
579 (a SpeedStep interface for Linux) helps you.
580 </para></answer>
581 </qandaentry>
583 <qandaentry>
584 <question><para>
585 The audio/video gets totally out of sync when I run
586 <application>MPlayer</application> as
587 <systemitem class="username">root</systemitem> on my notebook.
588 It works normal when i run it as a user.
589 </para></question>
590 <answer><para>
591 This is again a power management effect (see above). Plug the external power
592 connector in <emphasis role="bold">before</emphasis> you power on your notebook
593 or use the <option>-nortc</option> option.
594 </para></answer>
595 </qandaentry>
597 <qandaentry>
598 <question><para>
599 While playing a movie it suddenly gets jerky and I get the following message:
600 <screen>Badly interleaved AVI file detected - switching to -ni mode...</screen>
601 </para></question>
602 <answer><para>
603 Badly interleaved files and <option>-cache</option> don't work well together.
604 Try <option>-nocache</option>.
605 </para></answer>
606 </qandaentry>
607 </qandadiv>
609 <!-- ********** -->
611 <qandadiv id="faq-driver">
612 <title>Video/audio driver problems (vo/ao)</title>
614 <qandaentry>
615 <question><para>
616 When I go into fullscreen mode I just get black borders around the image
617 and no real scaling to fullscreen mode.
618 </para></question>
619 <answer><para>
620 Your video output driver does not support scaling in hardware and since
621 scaling in software can be incredibly slow <application>MPlayer</application>
622 does not automatically enable it. Most likely you are using the
623 <systemitem>x11</systemitem> instead of the <systemitem>xv</systemitem>
624 video output driver. Try adding <option>-vo xv</option> to the command
625 line or read the <link linkend="video">video section</link> to find out
626 about alternative video output drivers. The <option>-zoom</option>
627 option explicitly enables software scaling.
628 </para></answer>
629 </qandaentry>
631 <qandaentry>
632 <question><para>
633 I've just installed <application>MPlayer</application>. When I want to
634 open a video file it causes a fatal error:
635 <screen>Error opening/initializing the selected video_out (-vo) device.</screen>
636 How can I solve my problem?
637 </para></question>
638 <answer><para>
639 Just change your video output device. Issue the following command to get
640 a list of available video output drivers:
641 <screen>mplayer -vo help</screen>
642 After you've chosen the correct video output driver, add it to
643 your configuration file. Add
644 <programlisting>
645 vo = <replaceable>selected_vo</replaceable>
646 </programlisting>
647 to <filename>~/.mplayer/config</filename> and/or
648 <programlisting>
649 vo_driver = <replaceable>selected_vo</replaceable>
650 </programlisting>
651 to <filename>~/.mplayer/gui.conf</filename>.
652 </para></answer>
653 </qandaentry>
655 <qandaentry>
656 <question><para>
657 I have problems with <replaceable>[your window manager]</replaceable>
658 and fullscreen xv/xmga/sdl/x11 modes ...
659 </para></question>
660 <answer><para>
661 Read the <link linkend="bugreports">bug reporting guidelines</link> and send us
662 a proper bug report.
663 Also try experimenting with the <option>-fstype</option> option.
664 </para></answer>
665 </qandaentry>
667 <qandaentry>
668 <question><para>
669 Audio goes out of sync playing an AVI file.
670 </para></question>
671 <answer><para>
672 Try the <option>-bps</option> or <option>-nobps</option> option. If it does not
673 improve, read the
674 <link linkend="bugreports">bug reporting guidelines</link>
675 and upload the file to FTP.
676 </para></answer>
677 </qandaentry>
679 <qandaentry>
680 <question><para>
681 How can I use <application>dmix</application> with
682 <application>MPlayer</application>?
683 </para></question>
684 <answer><para>
685 After setting up your
686 <ulink url="http://alsa.opensrc.org/index.php?page=DmixPlugin">asoundrc</ulink>
687 you have to use <option>-ao alsa:device=dmix</option>.
688 </para></answer>
689 </qandaentry>
691 <qandaentry>
692 <question><para>
693 I have no sound when playing a video and get error messages similar to this one:
694 <screen>
695 AO: [oss] 44100Hz 2ch Signed 16-bit (Little-Endian)
696 audio_setup: Can't open audio device /dev/dsp: Device or resource busy
697 couldn't open/init audio device -> NOSOUND
698 Audio: no sound!!!
699 Start playing...
700 </screen>
701 </para></question>
702 <answer><para>
703 Are you running KDE or GNOME with the aRts or ESD sound daemon? Try disabling
704 the sound daemon or use the <option>-ao arts</option> or
705 <option>-ao esd</option> option to make <application>MPlayer</application> use
706 aRts or ESD.
707 You might also be running ALSA without OSS emulation, try loading the ALSA OSS
708 kernel modules or add <option>-ao alsa</option> to your command line to
709 directly use the ALSA audio output driver.
710 </para></answer>
711 </qandaentry>
713 <qandaentry>
714 <question><para>
715 When starting <application>MPlayer</application> under KDE I just get a black
716 screen and nothing happens. After about one minute the video starts playing.
717 </para></question>
718 <answer><para>
719 The KDE aRts sound daemon is blocking the sound device. Either wait until the
720 video starts or disable the aRts daemon in control center. If you want to use
721 aRts sound, specify audio output via our native aRts audio driver
722 (<option>-ao arts</option>). If it fails or isn't compiled in, try SDL
723 (<option>-ao sdl</option>) and make sure your SDL can handle aRts sound. Yet
724 another option is to start <application>MPlayer</application> with artsdsp.
725 </para></answer>
726 </qandaentry>
728 <qandaentry>
729 <question><para>
730 I have A/V sync problems.
731 Some of my AVIs play fine, but some play with double speed!
732 </para></question>
733 <answer><para>
734 You have a buggy sound card/driver. Most likely it's fixed at 44100Hz, and you
735 try to play a file which has 22050Hz audio. Try the
736 <systemitem>resample</systemitem> audio filter.
737 </para></answer>
738 </qandaentry>
740 <qandaentry>
741 <question><para>
742 When I play this movie I get video-audio desync and/or
743 <application>MPlayer</application> crashes with the following message:
744 <screen>
745 DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!
746 </screen>
747 </para></question>
748 <answer><para>
749 This can have multiple reasons.
750 <itemizedlist>
751 <listitem><para>
752   Your CPU <emphasis>and/or</emphasis> video card <emphasis>and/or</emphasis>
753   bus is too slow. <application>MPlayer</application> displays a message if
754   this is the case (and the dropped frames counter goes up fast).
755 </para></listitem>
756 <listitem><para>
757   If it is an AVI, maybe it has bad interleaving, try the
758   <option>-ni</option> option to work around this.
759   Or it may have a bad header, in this case <option>-nobps</option>
760   and/or <option>-mc 0</option> can help.
761 </para></listitem>
762 <listitem><para>
763   Many FLV files will only play correctly with <option>-correct-pts</option>.
764   Unfortunately <application>MEncoder</application> does not have this option,
765   but you can try setting <option>-fps</option> to the correct value manually
766   if you know it.
767 </para></listitem>
768 <listitem><para>
769   Your sound driver is buggy.
770 </para></listitem>
771 </itemizedlist>
772 </para></answer>
773 </qandaentry>
775 <qandaentry>
776 <question><para>
777 How can I get rid of A/V desynchronization
778 while seeking through RealMedia streams?
779 </para></question>
780 <answer><para>
781 <option>-mc 0.1</option> can help.
782 </para></answer>
783 </qandaentry>
784 </qandadiv>
786 <!-- ********** -->
788 <qandadiv id="faq-dvd">
789 <title>DVD playback</title>
791 <qandaentry>
792 <question><para>
793 What about DVD navigation/menus?
794 </para></question>
795 <answer><para>
796 <application>MPlayer</application> does not support DVD menus due to serious
797 architectural limitations that prevent proper handling of still images and
798 interactive content. If you want to have fancy menus, you will have to use
799 another player like <application>xine</application>,
800 <application>VLC</application> or <application>Ogle</application>.
801 If you want to see DVD navigation in <application>MPlayer</application> you
802 will have to implement it yourself, but be aware that it is a major
803 undertaking.
804 </para></answer>
805 </qandaentry>
807 <qandaentry>
808 <question><para>
809 What about subtitles? Can <application>MPlayer</application> display them?
810 </para></question>
811 <answer><para>
812 Yes. See the <link linkend="dvd">DVD chapter</link>.
813 </para></answer>
814 </qandaentry>
816 <qandaentry>
817 <question><para>
818 How can I set the region code of my DVD-drive? I don't have Windows!
819 </para></question>
820 <answer><para>
821 Use the
822 <ulink url="http://linvdr.org/projects/regionset/">regionset tool</ulink>.
823 </para></answer>
824 </qandaentry>
826 <qandaentry>
827 <question><para>
828 I can't play a DVD, MPlayer hangs or outputs "Encrypted VOB file!" errors.
829 </para></question>
830 <answer><para>
831 CSS decryption code does not work with some DVD drives unless you set
832 the region code appropriately. See the answer to the previous question.
833 </para></answer>
834 </qandaentry>
836 <qandaentry>
837 <question><para>
838 Do I need to be (setuid) root to be able to play a DVD?
839 </para></question>
840 <answer><para>
841 No. However you must have the proper rights
842 on the DVD device entry (in <filename class="directory">/dev/</filename>).
843 </para></answer>
844 </qandaentry>
846 <qandaentry>
847 <question><para>
848 Is it possible to play/encode only selected chapters?
849 </para></question>
850 <answer><para>
851 Yes, try the <option>-chapter</option> option.
852 </para></answer>
853 </qandaentry>
855 <qandaentry>
856 <question><para>
857 My DVD playback is sluggish!
858 </para></question>
859 <answer><para>
860 Use the <option>-cache</option> option (described in the man page) and try
861 enabling DMA for the DVD drive with the <command>hdparm</command> tool
862 (described in the <link linkend="drives">CD chapter</link>).
863 </para></answer>
864 </qandaentry>
866 <qandaentry>
867 <question><para>
868 I copied a DVD using vobcopy. How do I play/encode it from my hard disk?
869 </para></question>
870 <answer><para>
871 Use the <option>-dvd-device</option> option to refer to the directory
872 that contains the files:
873 <screen>
874 mplayer dvd://1 -dvd-device <replaceable>/path/to/directory</replaceable>
875 </screen>
876 </para></answer>
877 </qandaentry>
878 </qandadiv>
881 <qandadiv id="faq-features">
882 <title>Feature requests</title>
884 <qandaentry>
885 <question><para>
886 If <application>MPlayer</application> is paused and I try to seek or press any
887 key at all, <application>MPlayer</application> ceases to be paused.
888 I would like to be able to seek in the paused movie.
889 </para></question>
890 <answer><para>
891 This is very tricky to implement without losing A/V synchronization.
892 All attempts have failed so far, but patches are welcome.
893 </para></answer>
894 </qandaentry>
896 <qandaentry>
897 <question><para>
898 I'd like to seek +/- 1 frame instead of 10 seconds.
899 </para></question>
900 <answer><para>
901 You can step forward one frame by pressing <keycap>.</keycap>.
902 If the movie was not paused it will be paused afterwards
903 (see the man page for details).
904 Stepping backwards is unlikely to be implemented anytime soon.
905 </para></answer>
906 </qandaentry>
907 </qandadiv>
909 <!-- ********** -->
911 <qandadiv id="faq-encoding">
912 <title>Encoding</title>
914 <qandaentry>
915 <question><para>
916 How can I encode?
917 </para></question>
918 <answer><para>
919 Read the <link linkend="mencoder"><application>MEncoder</application></link>
920 section.
921 </para></answer>
922 </qandaentry>
924 <qandaentry>
925 <question><para>
926 How can I dump a full DVD title into a file?
927 </para></question>
928 <answer><para>
929 Once you have selected your title, and made sure it plays fine with
930 <application>MPlayer</application>, use the option <option>-dumpstream</option>.
931 For example:
932 <screen>
933 mplayer dvd://5 -dumpstream -dumpfile <replaceable>dvd_dump.vob</replaceable>
934 </screen>
935 will dump the 5th title of the DVD into the file
936 <replaceable>dvd_dump.vob</replaceable>
937 </para></answer>
938 </qandaentry>
940 <qandaentry>
941 <question><para>
942 How can I create (S)VCDs automatically?
943 </para></question>
944 <answer><para>
945 Try the <filename>mencvcd.sh</filename> script from the
946 <filename class="directory">TOOLS</filename> subdirectory.
947 With it you can encode DVDs or other movies to VCD or SVCD format
948 and even burn them directly to CD.
949 </para></answer>
950 </qandaentry>
952 <qandaentry>
953 <question><para>
954 How can I create (S)VCDs?
955 </para></question>
956 <answer><para>
957 Newer versions of <application>MEncoder</application> can directly
958 generate MPEG-2 files that can be used as a base to create a VCD or SVCD and
959 are likely to be playable out of the box on all platforms (for example,
960 to share a video from a digital camcorder with your computer-illiterate
961 friends).
962 Please read
963 <link linkend="menc-feat-vcd-dvd">Using MEncoder to create VCD/SVCD/DVD-compliant files</link>
964 for more details.
965 </para></answer>
966 </qandaentry>
968 <qandaentry>
969 <question><para>
970 How can I join two video files?
971 </para></question>
972 <answer><para>
973 MPEG files can be concatenated into a single file with luck.
974 For AVI files, you can use <application>MEncoder</application>'s
975 multiple file support like this:
976 <screen>
977 mencoder -ovc copy -oac copy -o <replaceable>out.avi</replaceable> <replaceable>file1.avi</replaceable> <replaceable>file2.avi</replaceable>
978 </screen>
979 This will only work if the files are of the same resolution
980 and use the same codec.
981 You can also try
982 <ulink url="http://fixounet.free.fr/avidemux/">avidemux</ulink> and
983 <application>avimerge</application> (part of the
984 <ulink url="http://www.transcoding.org/">transcode</ulink>
985 tool set).
986 </para></answer>
987 </qandaentry>
989 <qandaentry>
990 <question><para>
991 How can I fix AVI files with a broken index or bad interleaving?
992 </para></question>
993 <answer><para>
994 To avoid having to use <option>-idx</option> to be able to seek in
995 AVI files with a broken index or <option>-ni</option> to play AVI
996 files with bad interleaving, use the command
997 <screen>
998 mencoder <replaceable>input.avi</replaceable> -idx -ovc copy -oac copy -o <replaceable>output.avi</replaceable>
999 </screen>
1000 to copy the video and audio streams into a new AVI file while
1001 regenerating the index and correctly interleaving the data.
1002 Of course this cannot fix possible bugs in the video and/or audio streams.
1003 </para></answer>
1004 </qandaentry>
1006 <qandaentry>
1007 <question><para>
1008 How can I fix the aspect ratio of an AVI file?
1009 </para></question>
1010 <answer><para>
1011 You can do such a thing thanks to <application>MEncoder</application>'s
1012 <option>-force-avi-aspect</option> option, which overrides the aspect
1013 stored in the AVI OpenDML vprp header option. For example:
1014 <screen>
1015 mencoder <replaceable>input.avi</replaceable> -ovc copy -oac copy -o <replaceable>output.avi</replaceable> -force-avi-aspect 4/3
1016 </screen>
1017 </para></answer>
1018 </qandaentry>
1020 <qandaentry>
1021 <question><para>
1022 How can I backup and encode a VOB file with a broken beginning?
1023 </para></question>
1024 <answer><para>
1025 The main problem when you want to encode a VOB file which is corrupted
1026 <footnote id='fn-corrupted-files-or-copy-protection'><para>
1027 To some extent, some forms of copy protection used in DVDs can be
1028 assumed to be content corruption.
1029 </para></footnote>
1030 is that it will be hard to get an encode with perfect A/V sync.
1031 One workaround is to just shave off the corrupted part and encode just the
1032 clean part.
1033 First you need to find where the clean part starts:
1034 <screen>
1035 mplayer <replaceable>input.vob</replaceable> -sb <replaceable>nb_of_bytes_to_skip</replaceable>
1036 </screen>
1037 Then you can create a new file which contains just the clean part:
1038 <screen>
1039 dd if=<replaceable>input.vob</replaceable> of=<replaceable>output_cut.vob</replaceable> skip=1 ibs=<replaceable>nb_of_bytes_to_skip</replaceable>
1040 </screen>
1041 </para></answer>
1042 </qandaentry>
1044 <qandaentry>
1045 <question><para>
1046 I can't encode DVD subtitles into the AVI!
1047 </para></question>
1048 <answer><para>
1049 You have to properly specify the <option>-sid</option> option.
1050 </para></answer>
1051 </qandaentry>
1053 <qandaentry>
1054 <question><para>
1055 How can I encode only selected chapters from a DVD?
1056 </para></question>
1057 <answer><para>
1058 Use the <option>-chapter</option> option correctly,
1059 like: <option>-chapter 5-7</option>.
1060 </para></answer>
1061 </qandaentry>
1063 <qandaentry>
1064 <question><para>
1065 I'm trying to work with 2GB+ files on a VFAT file system. Does it work?
1066 </para></question>
1067 <answer><para>
1068 No, VFAT doesn't support 2GB+ files.
1069 </para></answer>
1070 </qandaentry>
1072 <qandaentry>
1073 <question><para>
1074 What is the meaning of the numbers on the status line
1075 during the encoding process?
1076 </para></question>
1077 <answer><para>
1078 Example:
1079 <screen>
1080 Pos: 264.5s   6612f ( 2%)  7.12fps Trem: 576min 2856mb  A-V:0.065 [2126:192]
1081 </screen>
1082 <variablelist>
1083   <varlistentry>
1084   <term><systemitem>Pos: 264.5s</systemitem></term>
1085   <listitem><para>time position in the encoded stream</para></listitem>
1086 </varlistentry>
1087 <varlistentry>
1088   <term><systemitem>6612f</systemitem></term>
1089   <listitem><para>number of video frames encoded</para></listitem>
1090 </varlistentry>
1091 <varlistentry>
1092   <term><systemitem>( 2%)</systemitem></term>
1093   <listitem><para>portion of the input stream encoded</para></listitem>
1094 </varlistentry>
1095 <varlistentry>
1096   <term><systemitem>7.12fps</systemitem></term>
1097   <listitem><para>encoding speed</para></listitem>
1098 </varlistentry>
1099 <varlistentry>
1100   <term><systemitem>Trem: 576min</systemitem></term>
1101   <listitem><para>estimated remaining encoding time</para></listitem>
1102 </varlistentry>
1103 <varlistentry>
1104   <term><systemitem>2856mb</systemitem></term>
1105   <listitem><para>estimated size of the final encode</para></listitem>
1106 </varlistentry>
1107 <varlistentry>
1108   <term><systemitem>A-V:0.065</systemitem></term>
1109   <listitem><para>current delay between audio and video streams</para></listitem>
1110 </varlistentry>
1111 <varlistentry>
1112   <term><systemitem>[2126:192]</systemitem></term>
1113   <listitem><para>
1114   average video bitrate (in kb/s) and average audio bitrate (in kb/s)
1115   </para></listitem>
1116 </varlistentry>
1117 </variablelist>
1118 </para></answer>
1119 </qandaentry>
1121 <qandaentry>
1122 <question><para>
1123 Why is the recommended bitrate printed by <application>MEncoder</application>
1124 negative?
1125 </para></question>
1126 <answer><para>
1127 Because the bitrate you encoded the audio with is too large to fit the
1128 movie on any CD. Check if you have libmp3lame installed properly.
1129 </para></answer>
1130 </qandaentry>
1132 <qandaentry>
1133 <question><para>
1134 I can't encode an ASF file to AVI/MPEG-4 (DivX) because it uses 1000 fps.
1135 </para></question>
1136 <answer><para>
1137 Since ASF uses variable framerate but AVI uses a fixed one, you
1138 have to set it by hand with the <option>-ofps</option> option.
1139 </para></answer>
1140 </qandaentry>
1142 <qandaentry>
1143 <question><para>
1144 How can I put subtitles in the output file?
1145 </para></question>
1146 <answer><para>
1147 Just pass the <option>-sub &lt;filename&gt;</option> (or <option>-sid</option>,
1148 respectively) option to <application>MEncoder</application>.
1149 </para></answer>
1150 </qandaentry>
1152 <qandaentry>
1153 <question><para>
1154 How do I encode only sound from a music video?
1155 </para></question>
1156 <answer><para>
1157 It's not possible directly, but you can try this (note the
1158 <emphasis role="bold">&amp;</emphasis> at the end of
1159 <command>mplayer</command> command):
1160 <screen>
1161 mkfifo <replaceable>encode</replaceable>
1162 mplayer -ao pcm -aofile <replaceable>encode</replaceable> dvd://1 &amp;
1163 lame <replaceable>your_opts</replaceable> <replaceable>encode</replaceable> <replaceable>music.mp3</replaceable>
1164 rm <replaceable>encode</replaceable>
1165 </screen>
1166 This allows you to use any encoder, not only <application>LAME</application>,
1167 just replace <command>lame</command> with your favorite audio encoder in the
1168 above command.
1169 </para></answer>
1170 </qandaentry>
1172 <qandaentry>
1173 <question><para>
1174 Why do third-party players fail to play MPEG-4 movies encoded by
1175 <application>MEncoder</application> versions later than 1.0pre7?
1176 </para></question>
1177 <answer><para>
1178 <systemitem class="library">libavcodec</systemitem>, the native MPEG-4
1179 encoding library usually shipped with <application>MEncoder</application>,
1180 used to set the FourCC to 'DIVX' when encoding MPEG-4 videos
1181 (the FourCC is an AVI tag to identify the software used to encode and
1182 the intended software to use for decoding the video).
1183 This led many people to think that
1184 <systemitem class="library">libavcodec</systemitem>
1185 was a DivX encoding library, when in fact it is a completely different
1186 MPEG-4 encoding library which implements the MPEG-4 standard much
1187 better than DivX does.
1188 Therefore, the new default FourCC used by
1189 <systemitem class="library">libavcodec</systemitem> is 'FMP4', but you
1190 may override this behavior using <application>MEncoder</application>'s
1191 <option>-ffourcc</option> option.
1192 You may also change the FourCC of existing files in the same way:
1193 <screen>
1194 mencoder <replaceable>input.avi</replaceable> -o <replaceable>output.avi</replaceable> -ffourcc XVID
1195 </screen>
1196 Note that this will set the FourCC to XVID rather than DIVX.
1197 This is recommended as DIVX FourCC means DivX4, which is a very basic
1198 MPEG-4 codec, whereas DX50 and XVID both mean full MPEG-4 (ASP).
1199 Therefore, if you change the FourCC to DIVX, some bad software or
1200 hardware players may choke on some advanced features that
1201 <systemitem class="library">libavcodec</systemitem> supports, but DivX
1202 doesn't; on the other hand <systemitem class="library">Xvid</systemitem>
1203 is closer to <systemitem class="library">libavcodec</systemitem> in
1204 terms of functionality, and is supported by all decent players.
1205 </para></answer>
1206 </qandaentry>
1208 <qandaentry>
1209 <question><para>
1210 How can I encode an audio only file?
1211 </para></question>
1212 <answer><para>
1213 Use <filename>aconvert.sh</filename> from the
1214 <filename class="directory">TOOLS</filename>
1215 subdirectory in the MPlayer source tree.
1216 </para></answer>
1217 </qandaentry>
1219 <qandaentry>
1220 <question><para>
1221 How can I play subtitles embedded in AVI?
1222 </para></question>
1223 <answer><para>
1224 Use <filename>avisubdump.c</filename> from the
1225 <filename class="directory">TOOLS</filename> subdirectory or read
1226 <ulink url="http://xlife.zuavra.net/curse/0012/">this document about extracting/demultiplexing subtitles embedded in OpenDML AVI files</ulink>.
1227 </para></answer>
1228 </qandaentry>
1230 <qandaentry>
1231 <question><para>
1232 MEncoder won't...
1233 </para></question>
1234 <answer><para>
1235 Have a look at the <filename class="directory">TOOLS</filename>
1236 subdirectory for a collection of random scripts and hacks.
1237 <filename>TOOLS/README</filename> contains documentation.
1238 </para></answer>
1239 </qandaentry>
1240 </qandadiv>
1242 </qandaset>
1244 </chapter>