Frequently Asked Questions Development How do I create a proper patch for MPlayer? We made a short document describing all the necessary details. Please follow the instructions. How do I translate MPlayer to a new language? Read the translation HOWTO, it should explain everything. You can get further help on the MPlayer-translations mailing list. How can I support MPlayer development? We are more than happy to accept your hardware and software donations. They help us in continuously improving MPlayer. How can I become an MPlayer developer? We always welcome coders and documenters. Read the technical documentation to get a first grasp. Then you should subscribe to the MPlayer-dev-eng mailing list and start coding. If you want to help out with the documentation, join the MPlayer-docs mailing list. Why don't you use autoconf/automake? We have a modular, handwritten build system. It does a reasonably good job, so why change? Besides, we dislike the auto* tools, just like other people. Compilation and installation Compilation fails with an error and gcc bails out with some cryptic message containing the phrase internal compiler error or unable to find a register to spill or can't find a register in class `GENERAL_REGS' while reloading `asm'. You have stumbled over a bug in gcc. Please report it to the gcc team but not to us. For some reason MPlayer seems to trigger compiler bugs frequently. Nevertheless we cannot fix them and do not add workarounds for compiler bugs to our sources. To avoid this problem, either stick with a compiler version that is known to be reliable and stable, or upgrade frequently. Are there binary (RPM/Debian) packages of MPlayer? See the Debian and RPM section for details. How can I build a 32 bit MPlayer on a 64 bit Athlon? Try the following configure options: ./configure --target=i386-linux --cc="gcc -m32" --as="as --32" --with-extralibdir=/usr/lib Configure ends with this text, and MPlayer won't compile! Your gcc does not support even i386 for '-march' and '-mcpu' Your gcc isn't installed correctly, check the configure.log file for details. I have a Matrox G200/G400/G450/G550, how do I compile/use the mga_vid driver? Read the mga_vid section. During 'make', MPlayer complains about missing X11 libraries. I don't understand, I do have X11 installed!? ... but you don't have the X11 development package installed. Or not correctly. It's called XFree86-devel* under Red Hat, xlibs-dev under Debian Woody and libx11-dev under Debian Sarge. Also check if the /usr/X11 and /usr/include/X11 symlinks exist. Building on Mac OS 10.3 leads to several link errors. The link error you're experiencing most likely looks like this: ld: Undefined symbols: _LLCStyleInfoCheckForOpenTypeTables referenced from QuartzCore expected to be defined in ApplicationServices _LLCStyleInfoGetUserRunFeatures referenced from QuartzCore expected to be defined in ApplicationServices This problem is the result of Apple developers using 10.4 to compile their software and distributing the binaries to 10.3 users via Software Update. The undefined symbols are present in Mac OS 10.4, but not 10.3. One solution can be to downgrade to QuickTime 7.0.1. Here is a better solution. Get an older copy of the frameworks. This will give you a compressed file that contains the QuickTime 7.0.1 Framework and a 10.3.9 QuartzCore Framework. Uncompress the files somewhere that is not in your System folder. (i.e. do not install these frameworks into your /System/Library/Frameworks! Using this older copy is only meant to get around link errors!) gunzip < CompatFrameworks.tgz | tar xvf - In config.mak, you should append -F/path/to/where/you/extracted to the OPTFLAGS variable. If you use X-Code, you can just select these frameworks instead of the system ones. The resulting MPlayer binary will actually use the framework that is installed on your system via dynamic links that are resolved at run-time. (You can verify this using otool -l). General questions Are there any mailing lists on MPlayer? Yes. Look at the mailing lists section of our homepage. I've found a nasty bug when I tried to play my favorite video! Who should I inform? Please read the bug reporting guidelines and follow the instructions. I get a core dump when trying to dump streams, what's wrong? Don't panic. Make sure you know where your towel is. Seriously, notice the smiley and start looking for files that end in .dump. When I start playing, I get this message but everything seems fine: Linux RTC init: ioctl (rtc_pie_on): Permission denied You need a specially set up kernel to use the RTC timing code. For details see the RTC section of the documentation. How can I make a screenshot? You have to use a video output driver that does not employ an overlay to be able to take a screenshot. Under X11, will do, under Windows works. Alternatively you can run MPlayer with the screenshot video filter (), and press the s key to grab a screenshot. What is the meaning of the numbers on the status line? Example: A: 2.1 V: 2.2 A-V: -0.167 ct: 0.042 57/57 41% 0% 2.6% 0 4 49% 1.00x A: 2.1 audio position in seconds V: 2.2 video position in seconds A-V: -0.167 audio-video difference in seconds (delay) ct: 0.042 total A-V sync correction done 57/57 frames played/decoded (counting from last seek) 41% video codec CPU usage in percent (for slice rendering and direct rendering this includes video_out) 0% video_out CPU usage 2.6% audio codec CPU usage in percent 0 frames dropped to maintain A-V sync 4 current level of image postprocessing (when using ) 49% current cache size used (around 50% is normal) 1.00x playback speed as a factor of original speed Most of them are for debug purposes, use the option to make them disappear. You might notice that video_out CPU usage is zero (0%) for some files. This is because it is called directly from the codec and thus cannot be measured separately. If you wish to know the video_out speed, compare the difference when playing the file with and your usual video output driver. There are error messages about file not found /usr/local/lib/codecs/ ... Download and install the binary codecs from our download page. How can I make MPlayer remember the options I use for a particular file, e.g. movie.avi? Create a file named movie.avi.conf with the file-specific options in it and put it in ~/.mplayer or in the same directory as the file. Subtitles are very nice, the most beautiful I've ever seen, but they slow down playing! I know it's unlikely ... After running ./configure, edit config.h and replace #undef FAST_OSD with #define FAST_OSD. Then recompile. How can I run MPlayer in the background? Use: mplayer options filename < /dev/null & Playback problems I cannot pinpoint the cause of some strange playback problem. Do you have a stray codecs.conf file in ~/.mplayer/, /etc/, /usr/local/etc/ or a similar location? Remove it, an outdated codecs.conf file can cause obscure problems and is intended for use only by developers working on codec support. It overrides MPlayer's internal codec settings, which will wreak havoc if incompatible changes are made in newer program versions. Unless used by experts it is a recipe for disaster in the form of seemingly random and very hard to localize crashes and playback problems. If you still have it somewhere on your system, you should remove it now. How can I get subtitles to appear on the black margins around a movie? Use the expand video filter to increase the area onto which the movie is rendered vertically and place the movie at the top border, for example: mplayer -vf expand=0:-100:0:0 -slang de dvd://1 How can I select audio/subtitle tracks from a DVD, OGM, Matroska or NUT file? You have to use (audio ID) or (audio language), (subtitle ID) or (subtitle language), for example: mplayer -alang eng -slang eng example.mkv mplayer -aid 1 -sid 1 example.mkv To see which ones are available: mplayer -vo null -ao null -frames 0 -v filename | grep sid mplayer -vo null -ao null -frames 0 -v filename | grep aid I'm trying to play a random stream off the internet but it fails. Try playing the stream with the option. I downloaded a movie off a P2P network and it doesn't work! Your file is most probably broken or a fake file. If you got it from a friend, and he says it works, try comparing md5sum hashes. I'm having trouble getting my subtitles to display, help!! Make sure you have installed fonts properly. Run through the steps in the Fonts and OSD part of the installation section again. If you are using TrueType fonts, verify that you have the FreeType library installed. Other things include checking your subtitles in a text editor or with other players. Also try converting them to another format. Why doesn't MPlayer work on Fedora Core? There is a bad interaction on Fedora between exec-shield, prelink, and any applications which use Windows DLLs (such as MPlayer). The problem is that exec-shield randomizes the load addresses of all the system libraries. This randomization happens at prelink time (once every two weeks). When MPlayer tries to load a Windows DLL it wants to put it at a specific address (0x400000). If an important system library happens to be there already, MPlayer will crash. (A typical symptom would be a segmentation fault when trying to play Windows Media 9 files.) If you run into this problem you have two options: Wait two weeks. It might start working again. Relink all the binaries on the system with different prelink options. Here are step by step instructions: Edit /etc/syconfig/prelink and change PRELINK_OPTS=-mR to PRELINK_OPTS="-mR --no-exec-shield" touch /var/lib/misc/prelink.force /etc/cron.daily/prelink (This relinks all the applications, and it takes quite a while.) execstack -s /path/to/mplayer (This turns off exec-shield for the MPlayer binary.) MPlayer dies with MPlayer interrupted by signal 4 in module: decode_video Don't use MPlayer on a CPU different from the one it was compiled on or recompile with runtime CPU detection (./configure --enable-runtime-cpudetection). When I try to grab from my tuner, it works, but colors are strange. It's OK with other applications. Your card probably reports some colorspaces as supported when in fact it does not support them. Try with YUY2 instead of the default YV12 (see the TV section). I get very strange percentage values (way too big) while playing files on my notebook. It's an effect of the power management / power saving system of your notebook (BIOS, not kernel). Plug the external power connector in before you power on your notebook. You can also try whether cpufreq (a SpeedStep interface for Linux) helps you. The audio/video gets totally out of sync when I run MPlayer as root on my notebook. It works normal when i run it as a user. This is again a power management effect (see above). Plug the external power connector in before you power on your notebook or use the option. While playing a movie it suddenly gets jerky and I get the following message: Badly interleaved AVI file detected - switching to -ni mode... Badly interleaved files and don't work well together. Try . Video/audio driver problems (vo/ao) When I go into fullscreen mode I just get black borders around the image and no real scaling to fullscreen mode. Your video output driver does not support scaling in hardware and since scaling in software can be incredibly slow MPlayer does not automatically enable it. Most likely you are using the x11 instead of the xv video output driver. Try adding to the command line or read the video section to find out about alternative video output drivers. The option explicitly enables software scaling. I've just installed MPlayer. When I want to open a video file it causes a fatal error: Error opening/initializing the selected video_out (-vo) device. How can I solve my problem? Just change your video output device. Issue the following command to get a list of available video output drivers: mplayer -vo help After you've chosen the correct video output driver, add it to your configuration file. Add vo = selected_vo to ~/.mplayer/config and/or vo_driver = selected_vo to ~/.mplayer/gui.conf. I have problems with [your window manager] and fullscreen xv/xmga/sdl/x11 modes ... Read the bug reporting guidelines and send us a proper bug report. Also try experimenting with the option. Audio goes out of sync playing an AVI file. Try the or option. If it does not improve, read the bug reporting guidelines and upload the file to FTP. How can I use dmix with MPlayer? After setting up your asoundrc you have to use . I have no sound when playing a video and get error messages similar to this one: AO: [oss] 44100Hz 2ch Signed 16-bit (Little-Endian) [AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy Could not open/initialize audio device -> no sound. Audio: no sound Starting playback... Are you running KDE or GNOME with the aRts or ESD sound daemon? Try disabling the sound daemon or use the or option to make MPlayer use aRts or ESD. You might also be running ALSA without OSS emulation, try loading the ALSA OSS kernel modules or add to your command line to directly use the ALSA audio output driver. When starting MPlayer under KDE I just get a black screen and nothing happens. After about one minute the video starts playing. The KDE aRts sound daemon is blocking the sound device. Either wait until the video starts or disable the aRts daemon in control center. If you want to use aRts sound, specify audio output via our native aRts audio driver (). If it fails or isn't compiled in, try SDL () and make sure your SDL can handle aRts sound. Yet another option is to start MPlayer with artsdsp. I have A/V sync problems. Some of my AVIs play fine, but some play with double speed! You have a buggy sound card/driver. Most likely it's fixed at 44100Hz, and you try to play a file which has 22050Hz audio. Try the resample audio filter. When I play this movie I get video-audio desync and/or MPlayer crashes with the following message: Too many (945 in 8390980 bytes) video packets in the buffer! This can have multiple reasons. Your CPU and/or video card and/or bus is too slow. MPlayer displays a message if this is the case (and the dropped frames counter goes up fast). If it is an AVI, maybe it has bad interleaving, try the option to work around this. Or it may have a bad header, in this case and/or can help. Many FLV files will only play correctly with . Unfortunately MEncoder does not have this option, but you can try setting to the correct value manually if you know it. Your sound driver is buggy. How can I get rid of A/V desynchronization while seeking through RealMedia streams? can help. DVD playback What about DVD navigation/menus? MPlayer does not support DVD menus due to serious architectural limitations that prevent proper handling of still images and interactive content. If you want to have fancy menus, you will have to use another player like xine, VLC or Ogle. If you want to see DVD navigation in MPlayer you will have to implement it yourself, but be aware that it is a major undertaking. What about subtitles? Can MPlayer display them? Yes. See the DVD chapter. How can I set the region code of my DVD-drive? I don't have Windows! Use the regionset tool. I can't play a DVD, MPlayer hangs or outputs "Encrypted VOB file!" errors. CSS decryption code does not work with some DVD drives unless you set the region code appropriately. See the answer to the previous question. Do I need to be (setuid) root to be able to play a DVD? No. However you must have the proper rights on the DVD device entry (in /dev/). Is it possible to play/encode only selected chapters? Yes, try the option. My DVD playback is sluggish! Use the option (described in the man page) and try enabling DMA for the DVD drive with the hdparm tool (described in the CD chapter). I copied a DVD using vobcopy. How do I play/encode it from my hard disk? Use the option to refer to the directory that contains the files: mplayer dvd://1 -dvd-device /path/to/directory Feature requests If MPlayer is paused and I try to seek or press any key at all, MPlayer ceases to be paused. I would like to be able to seek in the paused movie. This is very tricky to implement without losing A/V synchronization. All attempts have failed so far, but patches are welcome. I'd like to seek +/- 1 frame instead of 10 seconds. You can step forward one frame by pressing .. If the movie was not paused it will be paused afterwards (see the man page for details). Stepping backwards is unlikely to be implemented anytime soon. Encoding How can I encode? Read the MEncoder section. How can I dump a full DVD title into a file? Once you have selected your title, and made sure it plays fine with MPlayer, use the option . For example: mplayer dvd://5 -dumpstream -dumpfile dvd_dump.vob will dump the 5th title of the DVD into the file dvd_dump.vob How can I create (S)VCDs automatically? Try the mencvcd.sh script from the TOOLS subdirectory. With it you can encode DVDs or other movies to VCD or SVCD format and even burn them directly to CD. How can I create (S)VCDs? Newer versions of MEncoder can directly generate MPEG-2 files that can be used as a base to create a VCD or SVCD and are likely to be playable out of the box on all platforms (for example, to share a video from a digital camcorder with your computer-illiterate friends). Please read Using MEncoder to create VCD/SVCD/DVD-compliant files for more details. How can I join two video files? MPEG files can be concatenated into a single file with luck. For AVI files, you can use MEncoder's multiple file support like this: mencoder -ovc copy -oac copy -o out.avi file1.avi file2.avi This will only work if the files are of the same resolution and use the same codec. You can also try avidemux and avimerge (part of the transcode tool set). How can I fix AVI files with a broken index or bad interleaving? To avoid having to use to be able to seek in AVI files with a broken index or to play AVI files with bad interleaving, use the command mencoder input.avi -idx -ovc copy -oac copy -o output.avi to copy the video and audio streams into a new AVI file while regenerating the index and correctly interleaving the data. Of course this cannot fix possible bugs in the video and/or audio streams. How can I fix the aspect ratio of an AVI file? You can do such a thing thanks to MEncoder's option, which overrides the aspect stored in the AVI OpenDML vprp header option. For example: mencoder input.avi -ovc copy -oac copy -o output.avi -force-avi-aspect 4/3 How can I backup and encode a VOB file with a broken beginning? The main problem when you want to encode a VOB file which is corrupted To some extent, some forms of copy protection used in DVDs can be assumed to be content corruption. is that it will be hard to get an encode with perfect A/V sync. One workaround is to just shave off the corrupted part and encode just the clean part. First you need to find where the clean part starts: mplayer input.vob -sb nb_of_bytes_to_skip Then you can create a new file which contains just the clean part: dd if=input.vob of=output_cut.vob skip=1 ibs=nb_of_bytes_to_skip I can't encode DVD subtitles into the AVI! You have to properly specify the option. How can I encode only selected chapters from a DVD? Use the option correctly, like: . I'm trying to work with 2GB+ files on a VFAT file system. Does it work? No, VFAT doesn't support 2GB+ files. What is the meaning of the numbers on the status line during the encoding process? Example: Pos: 264.5s 6612f ( 2%) 7.12fps Trem: 576min 2856mb A-V:0.065 [2126:192] Pos: 264.5s time position in the encoded stream 6612f number of video frames encoded ( 2%) portion of the input stream encoded 7.12fps encoding speed Trem: 576min estimated remaining encoding time 2856mb estimated size of the final encode A-V:0.065 current delay between audio and video streams [2126:192] average video bitrate (in kb/s) and average audio bitrate (in kb/s) Why is the recommended bitrate printed by MEncoder negative? Because the bitrate you encoded the audio with is too large to fit the movie on any CD. Check if you have libmp3lame installed properly. I can't encode an ASF file to AVI/MPEG-4 (DivX) because it uses 1000 fps. Since ASF uses variable framerate but AVI uses a fixed one, you have to set it by hand with the option. How can I put subtitles in the output file? Just pass the (or , respectively) option to MEncoder. How do I encode only sound from a music video? It's not possible directly, but you can try this (note the & at the end of mplayer command): mkfifo encode mplayer -ao pcm -aofile encode dvd://1 & lame your_opts encode music.mp3 rm encode This allows you to use any encoder, not only LAME, just replace lame with your favorite audio encoder in the above command. Why do third-party players fail to play MPEG-4 movies encoded by MEncoder versions later than 1.0pre7? libavcodec, the native MPEG-4 encoding library usually shipped with MEncoder, used to set the FourCC to 'DIVX' when encoding MPEG-4 videos (the FourCC is an AVI tag to identify the software used to encode and the intended software to use for decoding the video). This led many people to think that libavcodec was a DivX encoding library, when in fact it is a completely different MPEG-4 encoding library which implements the MPEG-4 standard much better than DivX does. Therefore, the new default FourCC used by libavcodec is 'FMP4', but you may override this behavior using MEncoder's option. You may also change the FourCC of existing files in the same way: mencoder input.avi -o output.avi -ffourcc XVID Note that this will set the FourCC to XVID rather than DIVX. This is recommended as DIVX FourCC means DivX4, which is a very basic MPEG-4 codec, whereas DX50 and XVID both mean full MPEG-4 (ASP). Therefore, if you change the FourCC to DIVX, some bad software or hardware players may choke on some advanced features that libavcodec supports, but DivX doesn't; on the other hand Xvid is closer to libavcodec in terms of functionality, and is supported by all decent players. How can I encode an audio only file? Use aconvert.sh from the TOOLS subdirectory in the MPlayer source tree. How can I play subtitles embedded in AVI? Use avisubdump.c from the TOOLS subdirectory or read this document about extracting/demultiplexing subtitles embedded in OpenDML AVI files. MEncoder won't... Have a look at the TOOLS subdirectory for a collection of random scripts and hacks. TOOLS/README contains documentation.