Chapter 8. Frequently Asked Questions

8.1. Development
Q: How do I create a proper patch for MPlayer?
Q: How do I translate MPlayer to a new language?
Q: How can I support MPlayer development?
Q: How can I become an MPlayer developer?
Q: Why don't you use autoconf/automake?
8.2. Compilation and installation
Q: 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'.
Q: Are there binary (RPM/Debian) packages of MPlayer?
Q: How can I build a 32 bit MPlayer on a 64 bit Athlon?
Q: Configure ends with this text, and MPlayer won't compile! Your gcc does not support even i386 for '-march' and '-mcpu'
Q: I have a Matrox G200/G400/G450/G550, how do I compile/use the mga_vid driver?
Q: During 'make', MPlayer complains about missing X11 libraries. I don't understand, I do have X11 installed!?
8.3. General questions
Q: Are there any mailing lists on MPlayer?
Q: I've found a nasty bug when I tried to play my favorite video! Who should I inform?
Q: I get a core dump when trying to dump streams, what's wrong?
Q: When I start playing, I get this message but everything seems fine: Linux RTC init: ioctl (rtc_pie_on): Permission denied
Q: How can I make a screenshot?
Q: What is the meaning of the numbers on the status line?
Q: There are error messages about file not found /usr/local/lib/codecs/ ...
Q: How can I make MPlayer remember the options I use for a particular file, e.g. movie.avi?
Q: Subtitles are very nice, the most beautiful I've ever seen, but they slow down playing! I know it's unlikely ...
Q: How can I run MPlayer in the background?
8.4. Playback problems
Q: I cannot pinpoint the cause of some strange playback problem.
Q: How can I get subtitles to appear on the black margins around a movie?
Q: How can I select audio/subtitle tracks from a DVD, OGM, Matroska or NUT file?
Q: I'm trying to play a random stream off the internet but it fails.
Q: I downloaded a movie off a P2P network and it doesn't work!
Q: I'm having trouble getting my subtitles to display, help!!
Q: Why doesn't MPlayer work on Fedora Core?
Q: MPlayer dies with MPlayer interrupted by signal 4 in module: decode_video
Q: When I try to grab from my tuner, it works, but colors are strange. It's OK with other applications.
Q: I get very strange percentage values (way too big) while playing files on my notebook.
Q: 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.
Q: While playing a movie it suddenly gets jerky and I get the following message: Badly interleaved AVI file detected - switching to -ni mode...
8.5. Video/audio driver problems (vo/ao)
Q: When I go into fullscreen mode I just get black borders around the image and no real scaling to fullscreen mode.
Q: 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?
Q: I have problems with [your window manager] and fullscreen xv/xmga/sdl/x11 modes ...
Q: Audio goes out of sync playing an AVI file.
Q: How can I use dmix with MPlayer?
Q: 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...
Q: When starting MPlayer under KDE I just get a black screen and nothing happens. After about one minute the video starts playing.
Q: I have A/V sync problems. Some of my AVIs play fine, but some play with double speed!
Q: 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!
Q: How can I get rid of A/V desynchronization while seeking through RealMedia streams?
8.6. DVD playback
Q: What about DVD navigation/menus?
Q: What about subtitles? Can MPlayer display them?
Q: How can I set the region code of my DVD-drive? I don't have Windows!
Q: I can't play a DVD, MPlayer hangs or outputs "Encrypted VOB file!" errors.
Q: Do I need to be (setuid) root to be able to play a DVD?
Q: Is it possible to play/encode only selected chapters?
Q: My DVD playback is sluggish!
Q: I copied a DVD using vobcopy. How do I play/encode it from my hard disk?
8.7. Feature requests
Q: 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.
Q: I'd like to seek +/- 1 frame instead of 10 seconds.
8.8. Encoding
Q: How can I encode?
Q: How can I dump a full DVD title into a file?
Q: How can I create (S)VCDs automatically?
Q: How can I create (S)VCDs?
Q: How can I join two video files?
Q: How can I fix AVI files with a broken index or bad interleaving?
Q: How can I fix the aspect ratio of an AVI file?
Q: How can I backup and encode a VOB file with a broken beginning?
Q: I can't encode DVD subtitles into the AVI!
Q: How can I encode only selected chapters from a DVD?
Q: I'm trying to work with 2GB+ files on a VFAT file system. Does it work?
Q: What is the meaning of the numbers on the status line during the encoding process?
Q: Why is the recommended bitrate printed by MEncoder negative?
Q: I can't encode an ASF file to AVI/MPEG-4 (DivX) because it uses 1000 fps.
Q: How can I put subtitles in the output file?
Q: How do I encode only sound from a music video?
Q: Why do third-party players fail to play MPEG-4 movies encoded by MEncoder versions later than 1.0pre7?
Q: How can I encode an audio only file?
Q: How can I play subtitles embedded in AVI?
Q: MEncoder won't...

8.1. Development

Q: How do I create a proper patch for MPlayer?
Q: How do I translate MPlayer to a new language?
Q: How can I support MPlayer development?
Q: How can I become an MPlayer developer?
Q: Why don't you use autoconf/automake?

Q:

How do I create a proper patch for MPlayer?

A:

We made a short document describing all the necessary details. Please follow the instructions.

Q:

How do I translate MPlayer to a new language?

A:

Read the translation HOWTO, it should explain everything. You can get further help on the MPlayer-translations mailing list.

Q:

How can I support MPlayer development?

A:

We are more than happy to accept your hardware and software donations. They help us in continuously improving MPlayer.

Q:

How can I become an MPlayer developer?

A:

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.

Q:

Why don't you use autoconf/automake?

A:

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.

8.2. Compilation and installation

Q: 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'.
Q: Are there binary (RPM/Debian) packages of MPlayer?
Q: How can I build a 32 bit MPlayer on a 64 bit Athlon?
Q: Configure ends with this text, and MPlayer won't compile! Your gcc does not support even i386 for '-march' and '-mcpu'
Q: I have a Matrox G200/G400/G450/G550, how do I compile/use the mga_vid driver?
Q: During 'make', MPlayer complains about missing X11 libraries. I don't understand, I do have X11 installed!?

Q:

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'.

A:

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.

Q:

Are there binary (RPM/Debian) packages of MPlayer?

A:

See the Debian and RPM section for details.

Q:

How can I build a 32 bit MPlayer on a 64 bit Athlon?

A:

Try the following configure options:

./configure --target=i386-linux --cc="gcc -m32" --as="as --32" --with-extralibdir=/usr/lib

Q:

Configure ends with this text, and MPlayer won't compile!

Your gcc does not support even i386 for '-march' and '-mcpu'

A:

Your gcc isn't installed correctly, check the config.log file for details.

Q:

I have a Matrox G200/G400/G450/G550, how do I compile/use the mga_vid driver?

A:

Read the mga_vid section.

Q:

During 'make', MPlayer complains about missing X11 libraries. I don't understand, I do have X11 installed!?

A:

... 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.

8.3. General questions

Q: Are there any mailing lists on MPlayer?
Q: I've found a nasty bug when I tried to play my favorite video! Who should I inform?
Q: I get a core dump when trying to dump streams, what's wrong?
Q: When I start playing, I get this message but everything seems fine: Linux RTC init: ioctl (rtc_pie_on): Permission denied
Q: How can I make a screenshot?
Q: What is the meaning of the numbers on the status line?
Q: There are error messages about file not found /usr/local/lib/codecs/ ...
Q: How can I make MPlayer remember the options I use for a particular file, e.g. movie.avi?
Q: Subtitles are very nice, the most beautiful I've ever seen, but they slow down playing! I know it's unlikely ...
Q: How can I run MPlayer in the background?

Q:

Are there any mailing lists on MPlayer?

A:

Yes. Look at the mailing lists section of our homepage.

Q:

I've found a nasty bug when I tried to play my favorite video! Who should I inform?

A:

Please read the bug reporting guidelines and follow the instructions.

Q:

I get a core dump when trying to dump streams, what's wrong?

A:

Don't panic. Make sure you know where your towel is.

Seriously, notice the smiley and start looking for files that end in .dump.

Q:

When I start playing, I get this message but everything seems fine:

Linux RTC init: ioctl (rtc_pie_on): Permission denied

A:

You need a specially set up kernel to use the RTC timing code. For details see the RTC section of the documentation.

Q:

How can I make a screenshot?

A:

You have to use a video output driver that does not employ an overlay to be able to take a screenshot. Under X11, -vo x11 will do, under Windows -vo directx:noaccel works.

Alternatively you can run MPlayer with the screenshot video filter (-vf screenshot), and press the s key to grab a screenshot.

Q:

What is the meaning of the numbers on the status line?

A:

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 -autoq)

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 -quiet 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 -vo null and your usual video output driver.

Q:

There are error messages about file not found /usr/local/lib/codecs/ ...

A:

Download and install the binary codecs from our download page.

Q:

How can I make MPlayer remember the options I use for a particular file, e.g. movie.avi?

A:

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.

Q:

Subtitles are very nice, the most beautiful I've ever seen, but they slow down playing! I know it's unlikely ...

A:

After running ./configure, edit config.h and replace #undef FAST_OSD with #define FAST_OSD. Then recompile.

Q:

How can I run MPlayer in the background?

A:

Use:

mplayer options filename < /dev/null &

8.4. Playback problems

Q: I cannot pinpoint the cause of some strange playback problem.
Q: How can I get subtitles to appear on the black margins around a movie?
Q: How can I select audio/subtitle tracks from a DVD, OGM, Matroska or NUT file?
Q: I'm trying to play a random stream off the internet but it fails.
Q: I downloaded a movie off a P2P network and it doesn't work!
Q: I'm having trouble getting my subtitles to display, help!!
Q: Why doesn't MPlayer work on Fedora Core?
Q: MPlayer dies with MPlayer interrupted by signal 4 in module: decode_video
Q: When I try to grab from my tuner, it works, but colors are strange. It's OK with other applications.
Q: I get very strange percentage values (way too big) while playing files on my notebook.
Q: 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.
Q: While playing a movie it suddenly gets jerky and I get the following message: Badly interleaved AVI file detected - switching to -ni mode...

Q:

I cannot pinpoint the cause of some strange playback problem.

A:

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.

Q:

How can I get subtitles to appear on the black margins around a movie?

A:

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

Q:

How can I select audio/subtitle tracks from a DVD, OGM, Matroska or NUT file?

A:

You have to use -aid (audio ID) or -alang (audio language), -sid(subtitle ID) or -slang (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

Q:

I'm trying to play a random stream off the internet but it fails.

A:

Try playing the stream with the -playlist option.

Q:

I downloaded a movie off a P2P network and it doesn't work!

A:

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.

Q:

I'm having trouble getting my subtitles to display, help!!

A:

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.

Q:

Why doesn't MPlayer work on Fedora Core?

A:

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:

    1. Edit /etc/syconfig/prelink and change

      PRELINK_OPTS=-mR

      to

      PRELINK_OPTS="-mR --no-exec-shield"

    2. touch /var/lib/misc/prelink.force

    3. /etc/cron.daily/prelink (This relinks all the applications, and it takes quite a while.)

    4. execstack -s /path/to/mplayer (This turns off exec-shield for the MPlayer binary.)

Q:

MPlayer dies with

MPlayer interrupted by signal 4 in module: decode_video

A:

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).

Q:

When I try to grab from my tuner, it works, but colors are strange. It's OK with other applications.

A:

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).

Q:

I get very strange percentage values (way too big) while playing files on my notebook.

A:

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.

Q:

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.

A:

This is again a power management effect (see above). Plug the external power connector in before you power on your notebook or make sure you do not use the -rtc option.

Q:

While playing a movie it suddenly gets jerky and I get the following message:

Badly interleaved AVI file detected - switching to -ni mode...

A:

Badly interleaved files and -cache don't work well together. Try -nocache.

8.5. Video/audio driver problems (vo/ao)

Q: When I go into fullscreen mode I just get black borders around the image and no real scaling to fullscreen mode.
Q: 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?
Q: I have problems with [your window manager] and fullscreen xv/xmga/sdl/x11 modes ...
Q: Audio goes out of sync playing an AVI file.
Q: How can I use dmix with MPlayer?
Q: 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...
Q: When starting MPlayer under KDE I just get a black screen and nothing happens. After about one minute the video starts playing.
Q: I have A/V sync problems. Some of my AVIs play fine, but some play with double speed!
Q: 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!
Q: How can I get rid of A/V desynchronization while seeking through RealMedia streams?

Q:

When I go into fullscreen mode I just get black borders around the image and no real scaling to fullscreen mode.

A:

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 -vo xv to the command line or read the video section to find out about alternative video output drivers. The -zoom option explicitly enables software scaling.

Q:

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?

A:

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.

Q:

I have problems with [your window manager] and fullscreen xv/xmga/sdl/x11 modes ...

A:

Read the bug reporting guidelines and send us a proper bug report. Also try experimenting with the -fstype option.

Q:

Audio goes out of sync playing an AVI file.

A:

Try the -bps or -nobps option. If it does not improve, read the bug reporting guidelines and upload the file to FTP.

Q:

How can I use dmix with MPlayer?

A:

After setting up your asoundrc you have to use -ao alsa:device=dmix.

Q:

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...

A:

Are you running KDE or GNOME with the aRts or ESD sound daemon? Try disabling the sound daemon or use the -ao arts or -ao esd 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 -ao alsa to your command line to directly use the ALSA audio output driver.

Q:

When starting MPlayer under KDE I just get a black screen and nothing happens. After about one minute the video starts playing.

A:

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 (-ao arts). If it fails or isn't compiled in, try SDL (-ao sdl) and make sure your SDL can handle aRts sound. Yet another option is to start MPlayer with artsdsp.

Q:

I have A/V sync problems. Some of my AVIs play fine, but some play with double speed!

A:

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.

Q:

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!

A:

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 -ni option to work around this. Or it may have a bad header, in this case -nobps and/or -mc 0 can help.

  • Many FLV files will only play correctly with -correct-pts. Unfortunately MEncoder does not have this option, but you can try setting -fps to the correct value manually if you know it.

  • Your sound driver is buggy.

Q:

How can I get rid of A/V desynchronization while seeking through RealMedia streams?

A:

-mc 0.1 can help.

8.6. DVD playback

Q: What about DVD navigation/menus?
Q: What about subtitles? Can MPlayer display them?
Q: How can I set the region code of my DVD-drive? I don't have Windows!
Q: I can't play a DVD, MPlayer hangs or outputs "Encrypted VOB file!" errors.
Q: Do I need to be (setuid) root to be able to play a DVD?
Q: Is it possible to play/encode only selected chapters?
Q: My DVD playback is sluggish!
Q: I copied a DVD using vobcopy. How do I play/encode it from my hard disk?

Q:

What about DVD navigation/menus?

A:

MPlayer should support DVD menus nowadays. Your mileage may vary.

Q:

What about subtitles? Can MPlayer display them?

A:

Yes. See the DVD chapter.

Q:

How can I set the region code of my DVD-drive? I don't have Windows!

A:

Use the regionset tool.

Q:

I can't play a DVD, MPlayer hangs or outputs "Encrypted VOB file!" errors.

A:

CSS decryption code does not work with some DVD drives unless you set the region code appropriately. See the answer to the previous question.

Q:

Do I need to be (setuid) root to be able to play a DVD?

A:

No. However you must have the proper rights on the DVD device entry (in /dev/).

Q:

Is it possible to play/encode only selected chapters?

A:

Yes, try the -chapter option.

Q:

My DVD playback is sluggish!

A:

Use the -cache option (described in the man page) and try enabling DMA for the DVD drive with the hdparm tool.

Q:

I copied a DVD using vobcopy. How do I play/encode it from my hard disk?

A:

Use the -dvd-device option to refer to the directory that contains the files:

mplayer dvd://1 -dvd-device /path/to/directory

8.7. Feature requests

Q: 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.
Q: I'd like to seek +/- 1 frame instead of 10 seconds.

Q:

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.

A:

This is very tricky to implement without losing A/V synchronization. All attempts have failed so far, but patches are welcome.

Q:

I'd like to seek +/- 1 frame instead of 10 seconds.

A:

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.

8.8. Encoding

Q: How can I encode?
Q: How can I dump a full DVD title into a file?
Q: How can I create (S)VCDs automatically?
Q: How can I create (S)VCDs?
Q: How can I join two video files?
Q: How can I fix AVI files with a broken index or bad interleaving?
Q: How can I fix the aspect ratio of an AVI file?
Q: How can I backup and encode a VOB file with a broken beginning?
Q: I can't encode DVD subtitles into the AVI!
Q: How can I encode only selected chapters from a DVD?
Q: I'm trying to work with 2GB+ files on a VFAT file system. Does it work?
Q: What is the meaning of the numbers on the status line during the encoding process?
Q: Why is the recommended bitrate printed by MEncoder negative?
Q: I can't encode an ASF file to AVI/MPEG-4 (DivX) because it uses 1000 fps.
Q: How can I put subtitles in the output file?
Q: How do I encode only sound from a music video?
Q: Why do third-party players fail to play MPEG-4 movies encoded by MEncoder versions later than 1.0pre7?
Q: How can I encode an audio only file?
Q: How can I play subtitles embedded in AVI?
Q: MEncoder won't...

Q:

How can I encode?

A:

Read the MEncoder section.

Q:

How can I dump a full DVD title into a file?

A:

Once you have selected your title, and made sure it plays fine with MPlayer, use the option -dumpstream. For example:

mplayer dvd://5 -dumpstream -dumpfile dvd_dump.vob

will dump the 5th title of the DVD into the file dvd_dump.vob

Q:

How can I create (S)VCDs automatically?

A:

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.

Q:

How can I create (S)VCDs?

A:

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.

Q:

How can I join two video files?

A:

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).

Q:

How can I fix AVI files with a broken index or bad interleaving?

A:

To avoid having to use -idx to be able to seek in AVI files with a broken index or -ni 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.

Q:

How can I fix the aspect ratio of an AVI file?

A:

You can do such a thing thanks to MEncoder's -force-avi-aspect 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

Q:

How can I backup and encode a VOB file with a broken beginning?

A:

The main problem when you want to encode a VOB file which is corrupted [3] 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

Q:

I can't encode DVD subtitles into the AVI!

A:

You have to properly specify the -sid option.

Q:

How can I encode only selected chapters from a DVD?

A:

Use the -chapter option correctly, like: -chapter 5-7.

Q:

I'm trying to work with 2GB+ files on a VFAT file system. Does it work?

A:

No, VFAT doesn't support 2GB+ files.

Q:

What is the meaning of the numbers on the status line during the encoding process?

A:

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)

Q:

Why is the recommended bitrate printed by MEncoder negative?

A:

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.

Q:

I can't encode an ASF file to AVI/MPEG-4 (DivX) because it uses 1000 fps.

A:

Since ASF uses variable framerate but AVI uses a fixed one, you have to set it by hand with the -ofps option.

Q:

How can I put subtitles in the output file?

A:

Just pass the -sub <filename> (or -sid, respectively) option to MEncoder.

Q:

How do I encode only sound from a music video?

A:

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.

Q:

Why do third-party players fail to play MPEG-4 movies encoded by MEncoder versions later than 1.0pre7?

A:

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 -ffourcc 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.

Q:

How can I encode an audio only file?

A:

Use aconvert.sh from the TOOLS subdirectory in the MPlayer source tree.

Q:

How can I play subtitles embedded in AVI?

A:

Use avisubdump.c from the TOOLS subdirectory or read this document about extracting/demultiplexing subtitles embedded in OpenDML AVI files.

Q:

MEncoder won't...

A:

Have a look at the TOOLS subdirectory for a collection of random scripts and hacks. TOOLS/README contains documentation.



[3] To some extent, some forms of copy protection used in DVDs can be assumed to be content corruption.