第 8 章 Frequently Asked Questions
上一页 |  | 下一页

## 第 8 章 Frequently Asked Questions

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

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

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

上一页 |  | 下一页
7.8. Using MEncoder to create VCD/SVCD/DVD-compliant files | 起始页 | 附录 A. 如何报告错误