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-docs 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 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. 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/deb) packages of MPlayer? See the Debian and RPM section for details. How can I build a 32 bit MPlayer on 64 bit Athlon? Try the following configure options: ./configure --target=athlon_xp --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 X11 libraries. I don't understand, I DO have X installed!? ... but you don't have the X development package installed. Or not correctly. It's called XFree86-devel* under Red Hat, and xlibs-dev under Debian Woody, libx11-dev under Debian Sarge. Also check if the /usr/X11 and /usr/include/X11 symlinks exist (this can be a problem on Mandrake systems). They can be created with these commands: # ln -sf /usr/X11R6 /usr/X11 # ln -sf /usr/X11R6/include/X11 /usr/include/X11 Your distribution may differ from the Filesystem Hierarchy Standard. I compiled MPlayer with libdvdcss/libdivxdecore support, but when I try to start it, it says: error while loading shared libraries: lib*.so.0: cannot load shared object file: No such file or directory I checked up on the file and it IS there in /usr/local/lib ... Add /usr/local/lib to /etc/ld.so.conf and run ldconfig. MPlayer dies with segmentation fault upon pthread check! chmod 644 /usr/lib/libc.so I'd like to compile MPlayer on Minix! Me too. :) General questions Are there any mailing lists on MPlayer? Yes. See the mailing lists section. 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 have problems playing files with the ... codec. Can I use them? Check the codec status, if it doesn't contain your codec, read the codec documentation, especially the codec importing HOWTO and contact us. When I start playing, I get this message but everything seems fine: Linux RTC init: ioctl (rtc_pie_on): Permission denied You need root privileges or a specially set up kernel to use the new 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. The or option doesn't work with the x11 driver () ... It does, but you have to explicitly specify software scaling (very slow) with the option. You better use XF86VidMode support: You must specify the and the option, and you're done. Make sure you have the right modelines in your XF86Config file, and try to make the DGA driver and SDL's DGA driver work for you. It's much faster. If SDL's DGA works, use that, it'll be even faster. 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% A: audio position in seconds V: video position in seconds A-V: audio-video difference in seconds (delay) ct: total A-V sync correction done frames played (counting from last seek) frames decoded (counting from last seek) video codec CPU usage in percent (for slices and DR this includes video_out) video_out CPU usage audio codec CPU usage in percent frames needed to drop to maintain A-V sync current level of image postprocessing (when using ) current cache size used (around 50% is normal) playback speed as a factor of original speed Most of them are for debug purposes and will be removed at some point. What if I don't want them to appear? Use the option and read the man page. Why is video_out CPU usage zero (0%) for some files? It's not zero, but it's called from the codec and thus cannot be measured separately. You should try to play the file using and then and check the difference to see the video_out speed. You are using Direct Rendering, where the codec renders to the video memory itself. In this case, the decoding percentage contains the display percentage, too. There are error messages about file not found /usr/local/lib/codecs/ ... Download the binary codecs from our codecs page and install it. Umm, what is "IdegCounter"? A combination of a Hungarian and an English word. "Ideg" in Hungarian means the same as "nerve" in English, and is pronounced as something like "ydaegh". It was first used to measure the nervousness of A'rpi, after some (umm) "mysterious" disappearance of CVS code ;) And what is "Faszom(C)ounter"? "Fasz" is a Hungarian word you don't want to know, the others are connected to the perverted minds of the MPlayer developers. 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. What exactly is this libavcodec thing? See the libavcodec section. But configure tells me Checking for libavcodec ... no You need to get libavcodec from FFmpeg's CVS. Read the instructions in the libavcodec section. I can't access the GUI menu. I press right click, but I can't access any menu items! Are you using FVWM? Try the following: Start -> Settings -> Configuration -> Base Configuration Set Use Applications position hints to Yes 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 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 example.mkv -alang eng -slang eng mplayer example.mkv -aid 1 -sid 1 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'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'm having trouble getting my subtitles to display, help!! Make sure you have installed fonts properly. Run through the steps in the OSD and subtitle 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.) ... works with xine/vlc/... but doesn't with MPlayer. MPlayer is not xine/vlc/.... Although these players have some code in common, the codecs (DLL) set, synchronization, demultiplexing etc is different and should not be compared. If you have a file MPlayer fails to play correctly but works in another player, please read the bug reporting guidelines and upload the file to our FTP server. 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. My computer plays MS DivX AVIs with resolutions ~ 640x300 and stereo MP3 sound too slow. When I use option, everything is OK (but quiet). Your machine is too slow or your sound card driver is broken. Consult the documentation to see if you can improve performance. MPlayer dies with MPlayer interrupted by signal 4 in module: decode_video Try running MPlayer on the machine you compiled on. Or recompile with runtime CPU detection (./configure --enable-runtime-cpudetection). Don't use MPlayer on a CPU different from the one it was compiled on, without using the feature mentioned just now. 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. 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. When I play this movie I get video-audio desync and/or MPlayer crashes with the following message: DEMUXER: 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. Your sound driver is buggy, or you use ALSA 0.5 with . See the sound card section. The AVI has a bad header, try the option, and/or . 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 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. 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) 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) audio_setup: Can't open audio device /dev/dsp: Device or resource busy couldn't open/init audio device -> NOSOUND Audio: no sound!!! Start playing... 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. OpenGL () output doesn't work (hang/black window/X11 errors/...). Your OpenGL driver doesn't support dynamic texture changes (glTexSubImage). It's known not to work with nVidia's binary mess. It's known to work with Utah-GLX/DRI and Matrox G400 cards. Also with DRI and Radeon cards. It won't work with DRI and other cards. it will not work with 3DFX cards because of the 256x256 texture size limit. 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. 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/). Where can I get libdvdread and libdvdcss packages? You don't need to. Use libmpdvdkit2, which is present in the MPlayer source, and used by default. You can get the mentioned packages from the Ogle site. 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 frames 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. 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. 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 -dumpstream dvd://5 -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 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). mencoder -of mpeg -oac toolame -toolameopts br=224 -srate 44100 \ -af-adv force=1 -ovc lavc -mpegopts format=xsvcd -vf harddup -ofps 25 \ -lavcopts vcodec=mpeg2video:mbd=2:keyint=25:vrc_buf_size=917:vrc_minrate=600:vbitrate=2500:vrc_maxrate=2500 \ in.avi -o xsvcd.mpg This will convert the input file in.avi into the output file xsvcd.mpg, converting the audio with toolame at 224kbps and the video with libavcodec at 2500kbps, making sure the bitrate never goes below 600 and never exceeds 2500kbps, in order to respect the (S)VCD norm and ensure an smooth playback. Please note that in order to make the GOP structure SVCD compliant the option should be 15 for PAL and 18 for NTSC, although very often files with much longer GOPs play correctly (25 should never lead to any problem). Also, even though leaving out should work in most cases (as your source is likely to have the appropriate framerate already), PAL requires 25 and NTSC requires 30000/1001. What's more, PAL SVCDs only support 480x576 and 352x288 resolutions, whereas NTSC only supports 480x480 and 352x240. If the source video has a different resolution, then you must rescale with the video filter, which will make your filter chain look like for example for an NTSC SVCD or for a PAL SVCD. As far as the audio is concerned, SVCD only supports MPEG-1 layer II audio, therefore you have to use one of toolame, twolame, or as a last resort libavcodec's MPEG-1 layer II encoder (as its quality is far from being as good as the former two libraries). Both toolame and twolame follow the same syntax, so you depending on which one you managed to install, the example only requires a small change. If you do need to use libavcodec's MPEG-1 layer II encoder, replace -oac toolame -toolameopts br=224 if you use toolame or -oac twolame -twolameopts br=224 if you use twolame by: -oac lavc -lavcopts acodec=mp2:abitrate=224 The resulting xsvcd.mpg is an extended SVCD (that is why it is called xsvcd), mainly because it does not contain scan offsets. If you need to generate an SVCD image out of it, you should pass it to vcdimager. 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 codec. You can also try avidemux and avimerge (part of the transcode tool set). How can I fix AVI files with broken index or interleaving? Simply copy the video and audio streams into a new file, and MEncoder generates the index. Of course this cannot fix possible bugs in the video and/or audio streams. It also fixes files with broken interleaving, thus the option will not be needed for them anymore. mencoder -idx input.avi -ovc copy -oac copy -o output.avi How can I fix the aspect ration 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 I can't encode DVD subtitles into the AVI! You have to specify the option correctly! 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. 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. Because ASF uses variable frame rate but AVI uses a fixed one, you have to set it by hand using . 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. Since 1.0pre7, DivX encoded by MPlayer cannot be watched on third party players because it sets 'FMP4' as a FourCC. libavcodec, the native MPEG-4 encoding library usually shipped with MEncoder used to set the 'DIVX' FourCC (which is an AVI tag to identify the software used to encode and the intended software to use for decoding) when encoding MPEG-4 videos, which lead to make many people think that libavcodec was a DivX encoding library, when in fact it is just another MPEG-4 encoding library whose MPEG-4 support is much better than DivX's. Therefore, the new default FourCC used by libavcodec is 'FMP4', but you may override this behavior using MEncoder's . You may also change the FourCC of existing files like this: mencoder input.avi -o output.avi -ffourcc DIVX