# HG changeset patch # User torinthiel # Date 1165577886 0 # Node ID b210a229fbcbde1f069e7dfef1d1e6887b465546 # Parent 0977cf2eb136d2e14f82c4c01c205a247db0fd5c General reformatting round: - fix some " -> " - reindent with more consistency - visual markup of tags - break overly long lines - add missing tags in examples - cola truck standing by diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/audio.xml --- a/DOCS/xml/en/audio.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/audio.xml Fri Dec 08 11:38:06 2006 +0000 @@ -35,23 +35,28 @@ + + + + Troubleshooting Some notes: - If you have ALSA version 0.5, then you almost always have to use - , since ALSA 0.5 has buggy OSS emulation code, - and will crash MPlayer - with a message like this: - -DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer! +If you have ALSA version 0.5, then you almost always have to use +, since ALSA 0.5 has buggy OSS emulation code, +and will crash MPlayer +with a message like this: + +DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer! + + - If the sound clicks when playing from CD-ROM, turn on IRQ unmasking as - described in the CD-ROM section. +If the sound clicks when playing from CD-ROM, turn on IRQ unmasking as +described in the CD-ROM section. diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/bugreports.xml --- a/DOCS/xml/en/bugreports.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/bugreports.xml Fri Dec 08 11:38:06 2006 +0000 @@ -2,6 +2,7 @@ How to report bugs + Good bug reports are a very valuable contribution to the development of any software project. But just like writing good software, good problem reports @@ -11,8 +12,14 @@ that you have to provide all of the information we request and follow the instructions in this document closely. + + + + + Report security releated bugs + In case you have found an exploitable bug and you would like to do the right thing and let us fix it before you disclose it, we would be happy @@ -25,33 +32,48 @@ send that one with another mail. + + + + + How to fix bugs + If you feel have the necessary skills you are invited to have a go at fixing the bug yourself. Or maybe you already did that? Please read -this short document to find out how to -get your code included in MPlayer. The people on the +this short document to find out how +to get your code included in MPlayer. The people on +the MPlayer-dev-eng mailing list will assist you if you have questions. + + + + + How to do regression testing using Subversion + A problem that can happen sometimes is 'it used to work before, now it doesn't anymore...'. Here is a step by step procedure to try to pinpoint when the problem occurred. This is not for casual users. + First, you'd need to fetch MPlayer's source tree from Subversion. Instructions can be found at the bottom of this page. + -You will have now in the mplayer/ directory an image of the Subversion tree, on the -client side. +You will have now in the mplayer/ directory an image of the Subversion tree, on +the client side. Now update this image to the date you want: cd mplayer/ @@ -62,6 +84,7 @@ according to the date at which they were committed, as in the MPlayer-cvslog archive. + Now proceed as for a normal update: @@ -69,6 +92,7 @@ make + If any non-programmer reads this, the fastest method to get at the point where the problem occurred is to use a binary search — that is, @@ -79,6 +103,7 @@ If yes, go back to the first of April; if not, go to the first of October, and so on. + If you have lot of free hard disk space (a full compile currently takes 100 MB, and around 300-350 MB if debugging symbols are enabled), copy the @@ -89,6 +114,7 @@ source tree, you will have to recompile everything in it when you come back to the present.) + When you have found the day where the problem happened, continue the search using the mplayer-cvslog archive (sorted by date) and a more precise svn @@ -98,6 +124,7 @@ This will allow you to easily find the exact patch that did it. + If you find the patch that is the cause of the problem, you have almost won; report about it to the @@ -110,80 +137,102 @@ the bug is :-). + + + + + How to report bugs + -First of all please try the latest Subversion version of MPlayer +First of all please try the latest Subversion version of +MPlayer as your bug might already be fixed there. Development moves extremely fast, -most problems in official releases are reported within days or even hours, so -please use only Subversion to report bugs. This -includes binary packages of MPlayer. Subversion -instructions can be found at the bottom of +most problems in official releases are reported within days or even hours, +so please use only Subversion to report bugs. +This includes binary packages of MPlayer. +Subversion instructions can be found at the bottom of this page or in the README. If this did not help please refer to the list of -known bugs and the rest of the documentation. If your -problem is not known or not solvable by our instructions, then please report the bug. +known bugs and the rest of the documentation. +If your problem is not known or not solvable by our instructions, +then please report the bug. Please do not send bug reports privately to individual developers. This is -community work and thus there might be several people interested in it. Sometimes -other users already experienced your troubles and know how to circumvent a problem -even if it is a bug in MPlayer code. +community work and thus there might be several people interested in it. +Sometimes other users already experienced your troubles and know how to +circumvent a problem even if it is a bug in MPlayer +code. -Please describe your problem in as much detail as possible. Do a little detective -work to narrow down the circumstances under which the problem occurs. Does the bug -only show up in certain situations? Is it specific to certain files or file types? -Does it occur with only one codec or is it codec independent? Can you reproduce it -with all output drivers? The more information you provide the better are our -chances at fixing your problem. Please do not forget to also include the valuable -information requested below, we will be unable to properly diagnose your problem -otherwise. +Please describe your problem in as much detail as possible. Do a little +detective work to narrow down the circumstances under which the problem occurs. +Does the bug only show up in certain situations? Is it specific to certain +files or file types? Does it occur with only one codec or is it codec +independent? Can you reproduce it with all output drivers? The more information +you provide the better are our chances at fixing your problem. Please do not +forget to also include the valuable information requested below, we will be +unable to properly diagnose your problem otherwise. An excellent and well written guide to asking questions in public forums is -How To Ask -Questions The Smart Way by Eric S. Raymond. +How To Ask Questions The Smart Way +by Eric S. Raymond. There is another called -How to Report -Bugs Effectively by Simon Tatham. +How to Report Bugs Effectively +by Simon Tatham. If you follow these guidelines you should be able to get help. But please understand that we all follow the mailing lists voluntarily in our free time. We are very busy and cannot guarantee that you will get a solution for your problem or even an answer. + - + + + Where to report bugs + Subscribe to the MPlayer-users mailing list: and send your bug report to where you can discuss it. + If you prefer, you can use our brand-new Bugzilla instead. + -The language of this list is English. Please follow the standard -Netiquette Guidelines and -do not send HTML mail to any of our mailing lists. You will only get ignored or +The language of this list is English. +Please follow the standard +Netiquette Guidelines +and do not send HTML mail to any of our +mailing lists. You will only get ignored or banned. If you do not know what HTML mail is or why it is evil, read this -fine document. It explains all -the details and has instructions for turning HTML off. Also note that we will not -individually CC (carbon-copy) people so it is a good idea to subscribe to actually -receive your answer. +fine document. +It explains all the details and has instructions for turning HTML off. Also +note that we will not individually CC (carbon-copy) people so it is a good idea +to subscribe to actually receive your answer. + + + + What to report + You may need to include log, configuration or sample files in your bug report. If some of them are quite big then it is better to upload them to our @@ -193,54 +242,56 @@ you have something bigger you have to compress or upload it. + + System Information + -Your Linux distribution or operating system and version e.g.: + Your Linux distribution or operating system and version e.g.: Red Hat 7.1 Slackware 7.0 + devel packs from 7.1 ... -kernel version: -uname -a + kernel version: + uname -a -libc version: -ls -l /lib/libc[.-]* + libc version: + ls -l /lib/libc[.-]* -gcc and ld versions: - + gcc and ld versions: + gcc -v -ld -v - +ld -v -binutils version: - -as --version - + binutils version: + as --version -If you have problems with fullscreen mode: + If you have problems with fullscreen mode: Window manager type and version -If you have problems with XVIDIX: + If you have problems with XVIDIX: - X colour depth: -xdpyinfo | grep "depth of root" - + + X colour depth: + xdpyinfo | grep "depth of root" + -If only the GUI is buggy: + If only the GUI is buggy: GTK version GLIB version @@ -252,23 +303,26 @@ + + Hardware and drivers + -CPU info (this works on Linux only): -cat /proc/cpuinfo + CPU info (this works on Linux only): + cat /proc/cpuinfo -Video card manufacturer and model, e.g.: + Video card manufacturer and model, e.g.: ASUS V3800U chip: nVidia TNT2 Ultra pro 32MB SDRAM Matrox G400 DH 32MB SGRAM -Video driver type & version, e.g.: + Video driver type & version, e.g.: X built-in driver nVidia 0.9.623 @@ -277,7 +331,7 @@ -Sound card type & driver, e.g.: + Sound card type & driver, e.g.: Creative SBLive! Gold with OSS driver from oss.creative.com Creative SB16 with kernel OSS drivers @@ -285,14 +339,17 @@ -If in doubt include lspci -vv output on Linux systems. + If in doubt include lspci -vv output on Linux systems. + + Configure problems + If you get errors while running ./configure, or autodetection of something fails, read configure.log. You may find the @@ -305,57 +362,74 @@ Compilation problems + Please include these files: -config.h -config.mak + config.h + config.mak + + Playback problems + -Please include the output of MPlayer at verbosity level -1, but remember to not truncate the output when +Please include the output of MPlayer at verbosity +level 1, but remember to +not truncate the output when you paste it into your mail. The developers need all of the messages to properly diagnose a problem. You can direct the output into a file like this: -mplayer -v options filename > mplayer.log 2>&1 + +mplayer -v options filename > mplayer.log 2>&1 + -If your problem is specific to one or more files, then please upload the offender(s) to: +If your problem is specific to one or more files, +then please upload the offender(s) to: Also upload a small text file having the same base name as your file with a .txt -extension. Describe the problem you are having with the particular file there and -include your email address as well as the output of MPlayer -at verbosity level 1. Usually the first 1-5 MB of a file are enough to reproduce +extension. Describe the problem you are having with the particular file there +and include your email address as well as the output of +MPlayer at verbosity level 1. +Usually the first 1-5 MB of a file are enough to reproduce the problem, but to be sure we ask you to: -dd if=yourfile of=smallfile bs=1024k count=5 -It will take the first five megabytes of 'your-file' -and write it to 'small-file'. Then try again on + +dd if=yourfile of=smallfile bs=1024k count=5 + +It will take the first five megabytes of +'your-file' and write it to +'small-file'. Then try again on this small file and if the bug still shows up your sample is sufficient for us. Please do not ever send such files via mail! Upload it, and send only the path/filename of the file on the FTP-server. If the -file is accessible on the net, then sending the exact -URL is sufficient. +file is accessible on the net, then sending the +exact URL is sufficient. + + Crashes + You have to run MPlayer inside gdb -and send us the complete output or if you have a core dump of -the crash you can extract useful information from the Core file. Here's how: +and send us the complete output or if you have a core dump +of the crash you can extract useful information from the Core file. Here's how: + How to conserve information about a reproducible crash + Recompile MPlayer with debugging code enabled: @@ -365,9 +439,11 @@ and then run MPlayer within gdb using: gdb ./mplayer You are now within gdb. Type: -run -v options-to-mplayer filename -and reproduce your crash. As soon as you did it, gdb will return you to the command -line prompt where you have to enter + +run -v options-to-mplayer filename + +and reproduce your crash. As soon as you did it, gdb will return you to the +command line prompt where you have to enter bt disass $pc-32 $pc+32 @@ -376,8 +452,10 @@ + How to extract meaningful information from a core dump + Create the following command file: @@ -386,30 +464,38 @@ info all-registers Then simply execute this command: -gdb mplayer --core=core -batch --command=command_file > mplayer.bug + +gdb mplayer --core=core -batch --command=command_file > mplayer.bug + + + + + I know what I am doing... + -If you created a proper bug report following the steps above and you are confident -it is a bug in MPlayer, not a compiler problem or broken -file, you have already read the documentation and you could not find a solution, -your sound drivers are OK, then you might want to subscribe to the MPlayer-advusers -list and send your bug report there to get a better and faster answer. +If you created a proper bug report following the steps above and you are +confident it is a bug in MPlayer, not a compiler +problem or broken file, you have already read the documentation and you could +not find a solution, your sound drivers are OK, then you might want to +subscribe to the MPlayer-advusers list and send your bug report there to get +a better and faster answer. Please be advised that if you post newbie questions or questions answered in the -manual there, you will be ignored or flamed instead of getting an appropriate answer. -So do not flame us and subscribe to -advusers only if you really know what you are -doing and feel like being an advanced MPlayer user or -developer. If you meet these criteria it should not be difficult to find out how to subscribe... +manual there, you will be ignored or flamed instead of getting an appropriate +answer. So do not flame us and subscribe to -advusers only if you really know +what you are doing and feel like being an advanced +MPlayer user or developer. If you meet these +criteria it should not be difficult to find out how to subscribe... - diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/bugs.xml --- a/DOCS/xml/en/bugs.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/bugs.xml Fri Dec 08 11:38:06 2006 +0000 @@ -3,147 +3,184 @@ Known bugs - Special system/CPU-specific bugs/problems + -SIGILL (signal 4) on P3 using 2.2.x kernels: -Problem: kernel 2.2.x doesn't have proper (working) SSE support -Solution: upgrade kernel to 2.4.x -Workaround: ./configure --disable-sse + SIGILL (signal 4) on P3 using 2.2.x kernels: + Problem: kernel 2.2.x doesn't have proper (working) SSE support + Solution: upgrade kernel to 2.4.x + Workaround: ./configure --disable-sse -General SIGILL (signal 4): -Problem: you compiled and run MPlayer on -different machines (for example compiled on P3 and running on Celeron) -Solution: compile MPlayer on the same machine -where you will use it! -Workaround: You can forget all this by configuring with the - option or you can -disable particular CPU instruction sets with more specific options (like -, , etc). - + General SIGILL (signal 4): + + Problem: you compiled and run MPlayer on + different machines (for example compiled on P3 and running on Celeron) + + + Solution: compile MPlayer on the same machine + where you will use it! + + + Workaround: You can forget all this by configuring with the + option or you can + disable particular CPU instruction sets with more specific options (like + , , etc). + -Crashes when dumping streams: -Problem: core dump -Solution: Don't panic. Make sure you know where your towel is. + Crashes when dumping streams: + Problem: core dump + Solution: Don't panic. Make sure you know where your towel is. + + + Various A-V sync and other audio problems -General audio delay or jerky sound (exists with all or many files) +General audio delay or jerky sound + (exists with all or many files) + -most common: buggy audio driver! - try to use different drivers, try ALSA OSS -emulation with , also try , -sometimes it helps. If your file plays fine with , then you can be sure -it's sound card (driver) problem. + most common: buggy audio driver! - try to use different drivers, try ALSA OSS + emulation with , also try , + sometimes it helps. If your file plays fine with , + then you can be sure it's sound card (driver) problem. -audio buffer problems (buffer size badly detected) -Workaround: MPlayer's option + audio buffer problems (buffer size badly detected) + + Workaround: MPlayer's option + -samplerate problems - maybe your card doesn't support the samplerate used in your -files - try the resampling filter () + samplerate problems - maybe your card doesn't support the samplerate used in + your files - try the resampling filter () -slow machine (CPU or VGA) -try with , if it plays well, then you have slow -VGA card/driver -Workaround: buy a faster card or read this documentation about how to -speed up -Also try + slow machine (CPU or VGA) + + try with , if it plays well, then you have slow + VGA card/driver + + + Workaround: buy a faster card or read this documentation about how to speed up + + Also try + Audio delay/de-sync specific to one or a few files + -bad file - -Workaround: + bad file + + Workaround: - or option (for - non-interleaved or bad files) + + or option + (for non-interleaved or bad files) + and/or - (required for files with badly - interleaved VBR audio) + + + (required for files with badly interleaved VBR audio) + and/or - or +/- - keys at runtime to adjust delay + + or +/- + keys at runtime to adjust delay + -If none of these help, please upload the file, we'll check (and fix). + If none of these help, please upload the file, we'll check (and fix). -your sound card doesn't support 48kHz playback -Workaround: buy a better sound card... or try to decrease fps by 10% (use - for a 30fps movie) or use the resample filter + your sound card doesn't support 48kHz playback + + Workaround: buy a better sound card... or try to decrease fps by 10% + (use for a 30fps movie) or use the resample filter + -slow machine (if A-V is not around 0, and the last number in the status -line increasing) -Workaround: + + slow machine (if A-V is not around 0, + and the last number in the status line increasing) + + Workaround: + No sound at all + -your file uses an unsupported audio codec -Solution: read the documentation and help us adding support for it + your file uses an unsupported audio codec + + Solution: read the documentation and help us adding support for it + + No picture at all (just plain grey/green window) + -your file uses an unsupported video codec -Solution: read the documentation and help us adding support for it + your file uses an unsupported video codec + + Solution: read the documentation and help us adding support for it + - -auto-selected codec can't decode the file, try to select another using - or options - + + auto-selected codec can't decode the file, try to select another using + or options + + Video-out problems + First note that the options , and are not supported by all drivers. Plus, not all @@ -154,18 +191,20 @@ OSD/sub flickering -x11 driver: sorry, it can't be fixed now -xv driver: use option + x11 driver: sorry, it can't be fixed now + xv driver: use option -Green image using mga_vid (<option>-vo mga</option> / <option>-vo xmga</option>) +Green image using mga_vid + (<option>-vo mga</option> / <option>-vo xmga</option>) -mga_vid misdetected your card's RAM amount, reload it using - option + + mga_vid misdetected your card's RAM amount, reload it using + option. diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/cd-dvd.xml --- a/DOCS/xml/en/cd-dvd.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/cd-dvd.xml Fri Dec 08 11:38:06 2006 +0000 @@ -14,16 +14,18 @@ -There have been reports of read errors at high speeds, especially -with badly pressed CD-ROMs. Reducing the speed can prevent data loss under -these circumstances. + There have been reports of read errors at high speeds, especially + with badly pressed CD-ROMs. Reducing the speed can prevent data loss under + these circumstances. -Many CD-ROM drives are annoyingly loud, a lower speed may reduce the noise. + Many CD-ROM drives are annoyingly loud, a lower speed may reduce the noise. + + Linux @@ -49,28 +51,30 @@ This sets prefetched file reading to 2MB, which helps with scratched CD-ROMs. If you set it to too high, the drive will continuously spin up and down, and will dramatically decrease the performance. -It is recommended that you also tune your CD-ROM drive with hdparm: +It is recommended that you also tune your CD-ROM drive +with hdparm: hdparm -d1 -a8 -u1 [cdrom device] -This enables DMA access, read-ahead, and IRQ unmasking (read the hdparm -man page for a detailed explanation). +This enables DMA access, read-ahead, and IRQ unmasking (read the +hdparm man page for a detailed explanation). -Please refer to "/proc/ide/[cdrom device]/settings" +Please refer to +"/proc/ide/[cdrom device]/settings" for fine-tuning your CD-ROM. -SCSI drives do not have a uniform way of setting these parameters (Do you know one? -Tell us!) There is a tool that works for +SCSI drives do not have a uniform way of setting these parameters (Do you know +one? Tell us!) There is a tool that works for Plextor SCSI drives. - + FreeBSD @@ -92,13 +96,18 @@ + + DVD playback + For the complete list of available options, please read the man page. The syntax to play a standard DVD is as follows: -mplayer dvd://<track> [-dvd-device <device>] + +mplayer dvd://<track> [-dvd-device <device>] + @@ -200,12 +209,15 @@ + + VCD playback + -For the complete list of available options, please read the man page. The Syntax for a -standard Video CD (VCD) is as follows: +For the complete list of available options, please read the man page. The +Syntax for a standard Video CD (VCD) is as follows: mplayer vcd://<track> [-cdrom-device <device>] Example: mplayer vcd://2 -cdrom-device /dev/hdc @@ -230,50 +242,50 @@ VCD structure - A Video CD (VCD) is made up of CD-ROM XA sectors, i.e. CD-ROM mode 2 -form 1 and 2 tracks: - - +form 1 and 2 tracks: -The first track is in mode 2 form 2 format which means it uses L2 -error correction. The track contains an ISO-9660 filesystem with 2048 -bytes/sector. This filesystem contains VCD metadata information, as -well as still frames often used in menus. MPEG segments for menus can -also be stored in this first track, but the MPEGs have to be broken up -into a series of 150-sector chunks. The ISO-9660 filesystem may -contain other files or programs that are not essential for VCD -operation. + The first track is in mode 2 form 2 format which means it uses L2 + error correction. The track contains an ISO-9660 filesystem with 2048 + bytes/sector. This filesystem contains VCD metadata information, as + well as still frames often used in menus. MPEG segments for menus can + also be stored in this first track, but the MPEGs have to be broken up + into a series of 150-sector chunks. The ISO-9660 filesystem may + contain other files or programs that are not essential for VCD + operation. -The second and remaining tracks are generally raw 2324 bytes/sector -MPEG (movie) tracks, containing one MPEG PS data packet per -sector. These are in mode 2 form 1 format, so they store more data per -sector at the loss of some error correction. It is also legal to have -CD-DA tracks in a VCD after the first track as well. -On some operating systems there is some trickery that goes on to make -these non-ISO-9660 tracks appear in a filesystem. On other operating -systems like GNU/Linux this is not the case (yet). Here the MPEG data -cannot be mounted. As most movies are -inside this kind of track, you should try -first. + The second and remaining tracks are generally raw 2324 bytes/sector + MPEG (movie) tracks, containing one MPEG PS data packet per + sector. These are in mode 2 form 1 format, so they store more data per + sector at the loss of some error correction. It is also legal to have + CD-DA tracks in a VCD after the first track as well. + On some operating systems there is some trickery that goes on to make + these non-ISO-9660 tracks appear in a filesystem. On other operating + systems like GNU/Linux this is not the case (yet). Here the MPEG data + cannot be mounted. As most movies are + inside this kind of track, you should try + first. + -There exist VCD disks without the first track (single track and no filesystem -at all). They are still playable, but cannot be mounted. + There exist VCD disks without the first track (single track and no filesystem + at all). They are still playable, but cannot be mounted. - The definition of the Video CD standard is called the -Philips "White Book" and it is not generally available online as it -must be purchased from Philips. More detailed information about Video -CDs can be found in the -vcdimager documentation. + + The definition of the Video CD standard is called the + Philips "White Book" and it is not generally available online as it + must be purchased from Philips. More detailed information about Video + CDs can be found in the + vcdimager documentation. - + + About .DAT files @@ -287,12 +299,13 @@ be found in the Linux version of PowerDVD. It has a modified iso9660 filesystem (vcdfs/isofs-2.4.X.o) driver, which is able to emulate the raw tracks through this shadow .DAT file. If you mount the disc using their -driver, you can copy and even play .DAT files with MPlayer. But it will not +driver, you can copy and even play .DAT files with +MPlayer. But it will not work with the standard iso9660 driver of the Linux kernel! Use instead. Alternatives for VCD copying are the new cdfs kernel -driver (not part of the official kernel) that shows CD sessions as image files and -cdrdao, a bit-by-bit +driver (not part of the official kernel) that shows CD sessions as image files +and cdrdao, a bit-by-bit CD grabbing/copying application. diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/codecs.xml --- a/DOCS/xml/en/codecs.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/codecs.xml Fri Dec 08 11:38:06 2006 +0000 @@ -22,52 +22,54 @@ MPEG-1 (VCD) and MPEG-2 (DVD) video - + native decoders for all DivX variants, 3ivX, M$ MPEG-4 v1, v2 and other MPEG-4 variants - + native decoder for Windows Media Video 7/8 (WMV1/WMV2), and Win32 DLL decoder for Windows Media Video 9 - (WMV3), both used in .wmv - files - + (WMV3), + both used in .wmv files + native Sorenson 1 (SVQ1) decoder - + native Sorenson 3 (SVQ3) decoder - + 3ivx v1, v2 decoder - + - Cinepak and Intel Indeo codecs (3.1,3.2,4.1,5.0) - + Cinepak and Intel Indeo codecs + (3.1,3.2,4.1,5.0) + MJPEG, AVID, VCR2, ASV2 and other hardware formats - + - VIVO 1.0, 2.0, I263 and other H.263(+) variants - + VIVO 1.0, 2.0, I263 and other H.263(+) + variants + FLI/FLC - + RealVideo 1.0 & 2.0 from libavcodec, and - RealVideo 3.0 & 4.0 codecs using RealPlayer - libraries - + RealVideo 3.0 & 4.0 codecs using + RealPlayer libraries + native decoder for HuffYUV - + Various old simple RLE-like formats - + @@ -76,6 +78,7 @@ and help us add support for it. + FFmpeg/libavcodec @@ -104,9 +107,9 @@ libavcodec. Just run ./configure and compile. - + Xvid @@ -118,6 +121,7 @@ It yields very good video quality and good performance due to CPU optimizations for most modern processors. + It began as a forked development of the OpenDivX codec. This happened when ProjectMayo changed OpenDivX to closed source @@ -146,179 +150,196 @@ cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid login - + cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid co xvidcore cd xvidcore/build/generic - + ./bootstrap.sh - + ./configure You may have to add some options (examine the output of ./configure --help). - + make && make install - + If you specified , copy ../../src/divx4.h to /usr/local/include/. - + Recompile MPlayer with . - + + <systemitem class="library">x264</systemitem> What is <systemitem class="library">x264</systemitem>? + - x264 - is a library for - creating H.264 video streams. - It is not 100% complete, but currently it has at least some kind - of support for most of the H.264 features which impact quality. - There are also many advanced features in the H.264 specification - which have nothing to do with video quality per se; many of these - are not yet implemented in - x264. +x264 +is a library for creating H.264 video streams. +It is not 100% complete, but currently it has at least some kind +of support for most of the H.264 features which impact quality. +There are also many advanced features in the H.264 specification +which have nothing to do with video quality per se; many of these +are not yet implemented in x264. Encoder features CAVLC/CABAC Multi-references - Intra: all macroblock types (16x16, 8x8, and 4x4 with - all predictions) - Inter P: all partitions (from 16x16 down to - 4x4) - Inter B: partitions from 16x16 down to 8x8 - (including SKIP/DIRECT) - Ratecontrol: constant quantizer, constant bitrate, - single or multipass ABR, optional VBV + + Intra: all macroblock types (16x16, 8x8, and 4x4 with all predictions) + + + Inter P: all partitions (from 16x16 down to 4x4) + + + Inter B: partitions from 16x16 down to 8x8 (including SKIP/DIRECT) + + + Ratecontrol: constant quantizer, constant bitrate, single or multipass ABR, + optional VBV + Scene cut detection Adaptive B-frame placement - B-frames as references / arbitrary frame - order + + B-frames as references / arbitrary frame order + 8x8 and 4x4 adaptive spatial transform Lossless mode Custom quantization matrices Parallel encoding of multiple slices Interlacing + - What is H.264? + - H.264 is one name for a new digital video codec jointly developed - by the ITU and MPEG. - It can also be correctly referred to by the cumbersome names of - "ISO/IEC 14496-10" or "MPEG-4 Part 10". - More frequently, it is referred to as "MPEG-4 AVC" or just "AVC". +H.264 is one name for a new digital video codec jointly developed +by the ITU and MPEG. +It can also be correctly referred to by the cumbersome names of +"ISO/IEC 14496-10" or "MPEG-4 Part 10". +More frequently, it is referred to as "MPEG-4 AVC" or just "AVC". + - Whatever you call it, H.264 may be worth trying because it can - typically match the quality of MPEG-4 ASP with 5%-30% less - bitrate. - Actual results will depend on both the source material and the - encoder. - The gains from using H.264 do not come for free: Decoding H.264 - streams seems to have steep CPU and memory requirements. - For instance, on a 1733 MHz Athlon, a DVD-resolution 1500kbps H.264 - video requires around 35% CPU to decode. - By comparison, decoding a DVD-resolution 1500kbps MPEG-4 ASP stream - requires around 10% CPU. - This means that decoding high-definition streams is almost out of - the question for most users. - It also means that even a decent DVD rip may sometimes stutter on - processors slower than 2.0 GHz or so. +Whatever you call it, H.264 may be worth trying because it can typically match +the quality of MPEG-4 ASP with 5%-30% less bitrate. +Actual results will depend on both the source material and the encoder. +The gains from using H.264 do not come for free: Decoding H.264 +streams seems to have steep CPU and memory requirements. +For instance, on a 1733 MHz Athlon, a DVD-resolution 1500kbps H.264 +video requires around 35% CPU to decode. +By comparison, decoding a DVD-resolution 1500kbps MPEG-4 ASP stream +requires around 10% CPU. +This means that decoding high-definition streams is almost out of +the question for most users. +It also means that even a decent DVD rip may sometimes stutter on +processors slower than 2.0 GHz or so. + - At least with x264, - encoding requirements are not much worse than what you are used to - with MPEG-4 ASP. - For instance, on a 1733 MHz Athlon a typical DVD encode would run - at 5-15fps. +At least with x264, +encoding requirements are not much worse than what you are used to +with MPEG-4 ASP. +For instance, on a 1733 MHz Athlon a typical DVD encode would run +at 5-15fps. + - This document is not intended to explain the details of H.264, - but if you are interested in a brief overview, you may want to read - The H.264/AVC Advanced Video Coding Standard: Overview and Introduction to the Fidelity Range Extensions. +This document is not intended to explain the details of H.264, +but if you are interested in a brief overview, you may want to read +The H.264/AVC Advanced Video Coding Standard: Overview and Introduction to the Fidelity Range Extensions. + -How can I play H.264 videos with <application>MPlayer</application>? +How can I play H.264 videos with + <application>MPlayer</application>? + - MPlayer uses - libavcodec's H.264 - decoder. - libavcodec has had at - least minimally usable H.264 decoding since around July 2004, - however major changes and improvements have been implemented since - that time, both in terms of more functionalities supported and in - terms of improved CPU usage. - Just to be certain, it is always a good idea to use a recent Subversion - checkout. +MPlayer uses +libavcodec's H.264 decoder. +libavcodec has had at +least minimally usable H.264 decoding since around July 2004, +however major changes and improvements have been implemented since +that time, both in terms of more functionalities supported and in +terms of improved CPU usage. +Just to be certain, it is always a good idea to use a recent Subversion +checkout. + - If you want a quick and easy way to know whether there have been - recent changes to libavcodec's - H.264 decoding, you might keep an eye on - FFmpeg Subversion repository's web interface. +If you want a quick and easy way to know whether there have been +recent changes to libavcodec's +H.264 decoding, you might keep an eye on +FFmpeg Subversion repository's web interface. + -How can I encode videos using <application>MEncoder</application> and <systemitem class="library">x264</systemitem>? +How can I encode videos using <application>MEncoder</application> + and <systemitem class="library">x264</systemitem>? + - If you have the subversion client installed, the latest x264 - sources can be gotten with this command: - svn co svn://svn.videolan.org/x264/trunk x264 - MPlayer sources are updated whenever - an x264 API change - occurs, so it is always suggested to use - MPlayer from Subversion as well. - Perhaps this situation will change when and if an - x264 "release" occurs. - Meanwhile, x264 should - be considered very unstable, in the sense that its programming - interface is subject to change. +If you have the subversion client installed, the latest x264 +sources can be gotten with this command: +svn co svn://svn.videolan.org/x264/trunk x264 +MPlayer sources are updated whenever +an x264 API change +occurs, so it is always suggested to use +MPlayer from Subversion as well. +Perhaps this situation will change when and if an +x264 "release" occurs. +Meanwhile, x264 should +be considered very unstable, in the sense that its programming +interface is subject to change. + - x264 is built and - installed in the standard way: - ./configure && make && sudo make install - This installs libx264.a in /usr/local/lib and x264.h is placed in - /usr/local/include. +x264 is built and +installed in the standard way: +./configure && make && sudo make install +This installs libx264.a in /usr/local/lib and x264.h is placed in +/usr/local/include. - With the x264 library - and header placed in the standard locations, building - MPlayer with - x264 support is easy. - Just run the standard: - ./configure && make && sudo make install - The ./configure script will autodetect that you have satisfied the - requirements for x264. +With the x264 library +and header placed in the standard locations, building +MPlayer with +x264 support is easy. +Just run the standard: +./configure && make && sudo make install +The ./configure script will autodetect that you have +satisfied the requirements for x264. - + + + Audio codecs @@ -328,48 +349,50 @@ MPEG layer 1/2/3 (MP1/2/3) audio (native code, with MMX/SSE/3DNow! optimization) - + - Windows Media Audio 7 and 8 (AKA WMAv1 and WMAv2) (native code, with + Windows Media Audio 7 and 8 (AKA WMAv1 and WMAv2) + (native code, with libavcodec) - + Windows Media Audio 9 (WMAv3) (using DMO DLL) - + AC3 Dolby audio (native code, with MMX/SSE/3DNow! optimization) - + AC3 passing through sound card hardware - + AAC - + Ogg Vorbis audio codec (native library) - + RealAudio: DNET (low bitrate AC3), Cook, Sipro and ATRAC3 - + QuickTime: Qualcomm and QDesign audio codecs - + VIVO audio (g723, Vivo Siren) - + Voxware audio (using DirectShow DLL) - + alaw and ulaw, various gsm, adpcm and pcm formats and other simple old audio codecs - + Adaptive Multi-Rate (AMR) speech codecs - + + Software AC3 decoding @@ -391,9 +414,10 @@ channels. Use for a stereo downmix. For a 4 channel downmix (Left Front, Right Front, Left Surround and Right Surround outputs), use . In this case, any center -channel will be mixed equally to the front channels. will output all the AC3 channels as they are encoded - in the -order Left, Right, Left Surround, Right Surround, Center and LFE. +channel will be mixed equally to the front channels. + will output all the AC3 channels as they are +encoded - in the order Left, Right, Left Surround, Right Surround, Center and +LFE. @@ -409,9 +433,11 @@ + Hardware AC3 decoding + You need an AC3 capable sound card, with digital out (S/PDIF). The card's driver must properly support the AFMT_AC3 format (C-Media does). Connect @@ -422,6 +448,7 @@ + <systemitem class="library">libmad</systemitem> support @@ -431,23 +458,27 @@ is a multiplatform, integer (internally 24bit PCM) only MPEG audio decoding library. It does not handle broken files well, and it sometimes has problems with seeking, but it may perform better on FPU-less -(such as ARM) platform than mp3lib. +(such as ARM) +platform than mp3lib. -If you have a proper installation of libmad, -./configure -will notice and support for MPEG audio decoding via -libmad will be built automatically. +If you have a proper installation of +libmad, +./configure will notice and support for MPEG audio +decoding via libmad will be built +automatically. + + Hardware MPEG audio codec -This codec (selected by ) passes through MPEG audio packets -to hardware decoders, such as the ones found in full-featured DVB cards +This codec (selected by ) passes through MPEG audio +packets to hardware decoders, such as the ones found in full-featured DVB cards and DXR2 adapters. Don't use it in combination with any other audio output device (such as OSS and ALSA) that isn't able to decode it (you will hear @@ -455,9 +486,11 @@ + AAC codec + AAC (Advanced Audio Coding) is an audio codec sometimes found in MOV and MP4 files. An open source decoder called FAAD is available from @@ -470,7 +503,8 @@ If you use gcc 3.2 which fails to compile our internal FAAD or want to use the external library for some other reason, download the library from the download page -and pass to ./configure. +and pass +to ./configure. You do not need all of faad2 to decode AAC files, libfaad is enough. Build it like this: @@ -482,14 +516,18 @@ make install Binaries are not available from audiocoding.com, but you can (apt-)get Debian -packages from Christian Marillat's homepage, -Mandrake/Mandriva RPMs from the P.L.F and RedHat RPMs -from Grey Sector. +packages from +Christian Marillat's homepage, +Mandrake/Mandriva RPMs from the P.L.F +and RedHat RPMs from Grey Sector. + + AMR codecs + Adaptive Multi-Rate speech codec is used in third generation (3G) mobile phones. @@ -497,6 +535,7 @@ The 3rd Generation Partnership Project (free for private use). + To enable support, download the sources for AMR-NB @@ -519,7 +558,9 @@ - + + + Win32 codecs importing HOWTO @@ -553,9 +594,7 @@ This is the MP3 codec. Now that you have all the necessary information (fourcc, codec file, sample AVI), submit your codec support request by mail, and upload these files to the FTP site: - -ftp://upload.mplayerhq.hu/MPlayer/incoming/<codecname>/ - +ftp://upload.mplayerhq.hu/MPlayer/incoming/<codecname>/ On Windows NT/2000/XP search for this info in the registry, @@ -564,6 +603,7 @@ + DirectShow codecs @@ -575,10 +615,10 @@ system.ini does not contain the needed information, instead it is stored in the registry and - + we need the GUID of the codec. - + @@ -590,37 +630,35 @@ Get GraphEdit from either DirectX SDK or doom9. - + Start graphedit.exe. - + From the menu select Graph -> Insert Filters. - + Expand item DirectShow Filters. - + Select the right codec name and expand item. - + In the entry DisplayName look at the text in winged brackets after the backslash and write it down (five dash-delimited blocks, the GUID). - + - The codec binary is the file specified in the Filename - entry. - + The codec binary is the file specified in the + Filename entry. + - - + If there is no Filename and DisplayName contains something like device:dmo, then it is a DMO-Codec. - - + Old Method: @@ -629,16 +667,16 @@ Start regedit. - + Press Ctrl+F, disable the first two checkboxes, and enable the third. Type in the fourcc of the codec (e.g. TM20). - + You should see a field which contains the path and the filename (e.g. C:\WINDOWS\SYSTEM\TM20DEC.AX). - + Now that you have the file, we need the GUID. Try searching again, but now search for the codec's name, not the fourcc. Its name can be acquired @@ -646,28 +684,24 @@ File -> Properties -> Advanced. If not, you are out of luck. Try guessing (e.g. search for TrueMotion). - + If the GUID is found you should see a FriendlyName and a CLSID field. Write down the 16 byte CLSID, this is the GUID we need. - + - - + If searching fails, try enabling all the checkboxes. You may have false hits, but you may get lucky... - - + Now that you have all the necessary information (fourcc, GUID, codec file, sample AVI), submit your codec support request by mail, and upload these files to the FTP site: -ftp://upload.mplayerhq.hu/MPlayer/incoming/<codecname>/ - +ftp://upload.mplayerhq.hu/MPlayer/incoming/<codecname>/ diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/containers.xml --- a/DOCS/xml/en/containers.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/containers.xml Fri Dec 08 11:38:06 2006 +0000 @@ -15,7 +15,8 @@ container format. Examples of video codecs are: MPEG-1, MPEG-2, MPEG-4 (DivX), Indeo5, 3ivx. -Examples of container formats are: MPG, AVI, ASF. +Examples of container formats are: +MPG, AVI, ASF. @@ -26,10 +27,14 @@ does not have the necessary fields to describe its video and audio streams). Or you might put MPEG-1 video into an AVI file. FFmpeg and -MEncoder can create these files. +MEncoder +can create these files. + + + Video formats @@ -45,21 +50,21 @@ MPG: This is the most basic form of the MPEG file formats. It contains MPEG-1 video, and MP2 (MPEG-1 layer 2) or rarely MP1 audio. - + DAT: This is the very same format as MPG with a different extension. It is used on Video CDs. Due to the way VCDs are created and Linux is designed, the DAT files cannot be played nor copied from VCDs as regular files. You have to use to play a Video CD. - + VOB: This is the MPEG file format on DVDs. It is the same as MPG, plus the capability to contain subtitles or non-MPEG (AC3) audio. It contains encoded MPEG-2 video and usually AC3 audio, but DTS, MP2 and uncompressed LPCM are allowed, too. Read the DVD section! - + TY: This is a TiVo MPEG stream. It contains MPEG PES data for audio and video streams, as well as extra information like closed captions. The @@ -67,7 +72,7 @@ TiVo. For more information on TiVo stream format, please refer to the TyStudio page. - + @@ -87,15 +92,18 @@ + AVI files -Designed by Microsoft, AVI (Audio Video Interleaved) -is a widespread multipurpose format currently used mostly for MPEG-4 (DivX and DivX4) -video. It has many known drawbacks and shortcomings (for example in streaming). It -supports one video stream and 0 to 99 audio streams and can be as big as +Designed by Microsoft, +AVI (Audio Video Interleaved) +is a widespread multipurpose format currently used mostly for MPEG-4 (DivX and +DivX4) video. It has many known drawbacks and shortcomings (for example in +streaming). +It supports one video stream and 0 to 99 audio streams and can be as big as 2GB, but there exists an extension allowing bigger files called OpenDML. Microsoft currently strongly discourages its use and encourages ASF/WMV. Not that anybody cares. @@ -110,31 +118,30 @@ creating these files, NanDub, has this problem. - - + DV cameras create raw DV streams that DV grabbing utilities convert to two different types of AVI files. The AVI will then contain either separate audio and video streams that MPlayer can play or the raw DV stream for which support is under development. - - + There are two kinds of AVI files: Interleaved: Audio and video content is - interleaved. This is the standard usage. Recommended and mostly used. Some tools - create interleaved AVIs with bad sync. MPlayer - detects these as interleaved, and this climaxes in loss of A/V sync, - probably at seeking. These files should be played as non-interleaved + interleaved. This is the standard usage. Recommended and mostly used. Some + tools create interleaved AVIs with bad sync. + MPlayer detects these as interleaved, and this + climaxes in loss of A/V sync, probably at seeking. + These files should be played as non-interleaved (with the option). - + Non-interleaved: First comes the whole video stream, then the whole audio stream. It thus needs a lot of seeking, making playing from network or CD-ROM difficult. - + @@ -149,12 +156,13 @@ and Windows Media Player. Files with broken headers, and files created with VBR audio but not VBR-compliant encoder will result in A/V desync with this method (mostly at seeking). - + - interleaving-based: It does not use the bitrate - value of the header, instead it uses the relative position of interleaved - audio and video chunks, making badly encoded files with VBR audio playable. - + interleaving-based: It does not use the + bitrate value of the header, instead it uses the relative position of + interleaved audio and video chunks, + making badly encoded files with VBR audio playable. + @@ -169,13 +177,16 @@ + ASF/WMV files + ASF (Active Streaming Format) comes from Microsoft. They developed two -variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (Windows -Media Player and Windows Media Encoder) +variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools +(Windows Media Player and +Windows Media Encoder) and is very secret. v2.0 is published and patented :). Of course they differ, there is no compatibility at all (it is just another legal game). MPlayer supports only v1.0, as nobody has ever seen @@ -184,6 +195,7 @@ + QuickTime/MOV files @@ -194,12 +206,12 @@ extension. Note that since the MPEG-4 group chose QuickTime as the recommended file format for MPEG-4, their MOV files come with a .MPG or .MP4 extension (Interestingly the video and audio -streams in these files are real MPG and AAC files. You can even extract them with the - and options.). +streams in these files are real MPG and AAC files. You can even extract them +with the and options.). - + VIVO files @@ -212,21 +224,24 @@ -The video codec of VIVO/1.0 files is standard h.263. +The video codec of VIVO/1.0 files is standard +h.263. The video codec of VIVO/2.0 files is a modified, nonstandard h.263v2. The audio is the same, it may be g.723 (standard), or Vivo Siren. - + FLI files + FLI is a very old file format used by -Autodesk Animator, but it is a common file format for short animations on the net. +Autodesk Animator, but it is a common file format for short animations on the +net. MPlayer demuxes and decodes FLI movies and is even able to seek within them (useful when looping with the option). FLI files do not have keyframes, so the @@ -234,6 +249,7 @@ + RealMedia (RM) files @@ -244,24 +260,29 @@ + NuppelVideo files + NuppelVideo is a TV grabber tool (AFAIK:). MPlayer can read its .NUV files (only NuppelVideo 5.0). Those files can contain uncompressed YV12, YV12+RTJpeg compressed, YV12 RTJpeg+lzo compressed, and YV12+lzo compressed frames. -MPlayer decodes (and also encodes +MPlayer decodes (and also +encodes them with MEncoder to MPEG-4 (DivX)/etc!) them all. Seeking works. + yuv4mpeg files + yuv4mpeg / yuv4mpeg2 is a file format used by the @@ -271,28 +292,35 @@ + FILM files + This format is used on old Sega Saturn CD-ROM games. + RoQ files + RoQ files are multimedia files used in some ID games such as Quake III and Return to Castle Wolfenstein. + OGG/OGM files + -This is a new fileformat from Xiphophorus. +This is a new fileformat from +Xiphophorus. It can contain any video or audio codec, CBR or VBR. You'll need libogg and libvorbis installed before @@ -300,9 +328,11 @@ + SDP files + SDP is an IETF standard format for describing video and/or audio RTP streams. @@ -311,18 +341,23 @@ + PVA files + PVA is an MPEG-like format used by DVB TV boards' software (e.g.: -MultiDec, WinTV under Windows). +MultiDec, +WinTV under Windows). + NSV files + NSV (NullSoft Video) is the file format used by the Winamp player to stream audio and video. @@ -337,18 +372,22 @@ + Matroska files + Matroska is an open container format. Read more on the official site. + NUT files + NUT is the container format developed by MPlayer and FFmpeg folks. Both projects support it. @@ -356,17 +395,20 @@ + GIF files + The GIF format is a common format for web -graphics. There are two versions of the GIF spec, GIF87a and GIF89a. The -main difference is that GIF89a allows for animation. MPlayer -supports both formats through use of libungif or +graphics. There are two versions of the GIF spec, GIF87a and GIF89a. +The main difference is that GIF89a allows for animation. +MPlayer supports both formats through use of +libungif or another libgif-compatible library. Non-animated GIFs will be displayed as -single frame videos. (Use the and -options to display these longer.) +single frame videos. (Use the and + options to display these longer.) @@ -385,8 +427,8 @@ -If your distribution does not come with libungif, -download a copy from the +If your distribution does not come with +libungif, download a copy from the libungif homepage. For detailed technical information, have a look at the GIF89a specification. @@ -394,7 +436,9 @@ - + + + Audio formats @@ -407,8 +451,11 @@ url="http://www.xmms.org">XMMS. + + MP3 files + You may have problems playing certain MP3 files that MPlayer will misdetect as MPEGs and play @@ -419,8 +466,11 @@ + + OGG/OGM files (Vorbis) + Requires properly installed libogg and @@ -428,8 +478,11 @@ + + CD audio + MPlayer can use cdparanoia to play CDDA (Audio CD). The scope of this section does not contain enumerating @@ -442,9 +495,12 @@ + + XMMS + MPlayer can use XMMS input plugins to play many file formats. There are plugins for SNES game tunes, SID tunes (from Commodore 64), many Amiga formats, .xm, .it, VQF, musepack, Bonk, @@ -454,10 +510,12 @@ For this feature you need to have XMMS and compile -MPlayer with ./configure --enable-xmms. +MPlayer with +./configure --enable-xmms. If that does not work, you might need to set the XMMS -plugin and library path explicitly by way of the -and options. +plugin and library path explicitly by way of the + and +options. diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/documentation.xml --- a/DOCS/xml/en/documentation.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/documentation.xml Fri Dec 08 11:38:06 2006 +0000 @@ -62,11 +62,12 @@ MPlayer is a movie player for Linux (runs on many other Unices, and non-x86 CPUs, see -). It plays most MPEG, VOB, AVI, OGG/OGM, VIVO, ASF/WMA/WMV, -QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM, RoQ, PVA, Matroska files, supported by +). +It plays most MPEG, VOB, AVI, OGG/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, +NuppelVideo, yuv4mpeg, FILM, RoQ, PVA, Matroska files, supported by many native, XAnim, RealPlayer, and Win32 DLL codecs. You can watch -VideoCD, SVCD, DVD, 3ivx, RealMedia, Sorenson, Theora, and -MPEG-4 (DivX) movies too. Another big +VideoCD, SVCD, DVD, 3ivx, RealMedia, Sorenson, Theora, +and MPEG-4 (DivX) movies too. Another big feature of MPlayer is the wide range of supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, libcaca, DirectFB, but you can use GGI and SDL (and this way all @@ -76,7 +77,8 @@ MPlayer supports displaying through some hardware MPEG decoder boards, such as the DVB and DXR3/Hollywood+. And what about the nice big -antialiased shaded subtitles (14 supported types) +antialiased shaded subtitles +(14 supported types) with European/ISO 8859-1,2 (Hungarian, English, Czech, etc), Cyrillic, Korean fonts, and the onscreen display (OSD)? @@ -97,67 +99,67 @@ Encoder) is a simple movie encoder, designed to encode MPlayer-playable movies (AVI/ASF/OGG/DVD/VCD/VOB/MPG/MOV/VIV/FLI/RM/NUV/NET/PVA) -to other MPlayer-playable formats (see below). It -can encode with various codecs, like MPEG-4 (DivX4) +to other MPlayer-playable formats (see below). +It can encode with various codecs, like +MPEG-4 (DivX4) (one or two passes), libavcodec, PCM/MP3/VBR MP3 audio. - <application>MEncoder</application> features Encoding from the wide range of fileformats and decoders of MPlayer - + Encoding to all the codecs of FFmpeg's libavcodec - + Video encoding from V4L compatible TV tuners - + Encoding/multiplexing to interleaved AVI files with proper index - + Creating files from external audio stream - + 1, 2 or 3 pass encoding - + VBR MP3 audio VBR MP3 audio doesn't always play nicely on windows players! - + PCM audio - + Stream copying - + Input A/V synchronizing (PTS-based, can be disabled with option) - + fps correction with option (useful when encoding 30000/1001 fps VOB to 24000/1001 fps AVI) - + Using our very powerful filter system (crop, expand, flip, postprocess, rotate, scale, rgb/yuv conversion) - + Can encode DVD/VOBsub AND text subtitles into the output file - + Can rip DVD subtitles to VOBsub format - + @@ -165,7 +167,7 @@ Even wider variety of available en/decoding formats/codecs (creating VOB files with DivX4/Indeo5/VIVO streams :). - + diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/encoding-guide.xml --- a/DOCS/xml/en/encoding-guide.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/encoding-guide.xml Fri Dec 08 11:38:06 2006 +0000 @@ -4,82 +4,90 @@ Encoding with <application>MEncoder</application> -Making a high quality MPEG-4 ("DivX") rip of a DVD movie - - - One frequently asked question is "How do I make the highest quality rip for - a given size?". Another question is "How do I make the highest quality DVD - rip possible? I do not care about file size, I just want the best quality." - - - - The latter question is perhaps at least somewhat wrongly posed. After all, if - you do not care about file size, why not simply copy the entire MPEG-2 video - stream from the the DVD? Sure, your AVI will end up being 5GB, give - or take, but if you want the best quality and do not care about size, - this is certainly your best option. - - - - In fact, the reason you want to transcode a DVD into MPEG-4 is - specifically because you do care about - file size. - - - - It is difficult to offer a cookbook recipe on how to create a very high - quality DVD rip. There are several factors to consider, and you should - understand these details or else you are likely to end up disappointed - with your results. Below we will investigate some of these issues, and - then have a look at an example. We assume you are using - libavcodec to encode the video, - although the theory applies to other codecs as well. - - - - If this seems to be too much for you, you should probably use one of the - many fine frontends that are listed in the - MEncoder section - of our related projects page. - That way, you should be able to achieve high quality rips without too much - thinking, because most of those tools are designed to take clever decisions - for you. - +Making a high quality MPEG-4 ("DivX") + rip of a DVD movie + + +One frequently asked question is "How do I make the highest quality rip +for a given size?". Another question is "How do I make the highest +quality DVD rip possible? I do not care about file size, I just want the best +quality." + + + +The latter question is perhaps at least somewhat wrongly posed. After all, if +you do not care about file size, why not simply copy the entire MPEG-2 video +stream from the the DVD? Sure, your AVI will end up being 5GB, give +or take, but if you want the best quality and do not care about size, +this is certainly your best option. + + + +In fact, the reason you want to transcode a DVD into MPEG-4 is +specifically because you do care about +file size. + + + +It is difficult to offer a cookbook recipe on how to create a very high +quality DVD rip. There are several factors to consider, and you should +understand these details or else you are likely to end up disappointed +with your results. Below we will investigate some of these issues, and +then have a look at an example. We assume you are using +libavcodec to encode the video, +although the theory applies to other codecs as well. + + + +If this seems to be too much for you, you should probably use one of the +many fine frontends that are listed in the +MEncoder section +of our related projects page. +That way, you should be able to achieve high quality rips without too much +thinking, because most of those tools are designed to take clever decisions +for you. + + + Preparing to encode: Identifying source material and framerate - - Before you even think about encoding a movie, you need to take - several preliminary steps. - - - - The first and most important step before you encode should be - determining what type of content you are dealing with. - If your source material comes from DVD or broadcast/cable/satellite - TV, it will be stored in one of two formats: NTSC for North - America and Japan, PAL for Europe, etc. - It is important to realize, however, that this is just the formatting for - presentation on a television, and often does - not correspond to the - original format of the movie. - Experience shows that NTSC material is a lot more difficult to encode, - because there more elements to identify in the source. - In order to produce a suitable encode, you need to know the original - format. - Failure to take this into account will result in various flaws in your - encode, including ugly combing (interlacing) artifacts and duplicated - or even lost frames. - Besides being ugly, the artifacts also harm coding efficiency: - You will get worse quality per unit bitrate. - + + +Before you even think about encoding a movie, you need to take +several preliminary steps. + + + +The first and most important step before you encode should be +determining what type of content you are dealing with. +If your source material comes from DVD or broadcast/cable/satellite +TV, it will be stored in one of two formats: NTSC for North +America and Japan, PAL for Europe, etc. +It is important to realize, however, that this is just the formatting for +presentation on a television, and often does +not correspond to the +original format of the movie. +Experience shows that NTSC material is a lot more difficult to encode, +because there more elements to identify in the source. +In order to produce a suitable encode, you need to know the original +format. +Failure to take this into account will result in various flaws in your +encode, including ugly combing (interlacing) artifacts and duplicated +or even lost frames. +Besides being ugly, the artifacts also harm coding efficiency: +You will get worse quality per unit bitrate. + + Identifying source framerate - - Here is a list of common types of source material, where you are - likely to find them, and their properties: - + + +Here is a list of common types of source material, where you are +likely to find them, and their properties: + + Standard Film: Produced for @@ -122,31 +130,35 @@ + Identifying source material - - Movies consisting of frames are referred to as progressive, - while those consisting of independent fields are called - either interlaced or video - though this latter term is - ambiguous. - - - To further complicate matters, some movies will be a mix of - several of the above. - - - The most important distinction to make between all of these - formats is that some are frame-based, while others are - field-based. - Whenever a movie is prepared - for display on television (including DVD), it is converted to a - field-based format. - The various methods by which this can be done are collectively - referred to as "telecine", of which the infamous NTSC - "3:2 pulldown" is one variety. - Unless the original material was also field-based (and the same - fieldrate), you are getting the movie in a format other than the - original. + + +Movies consisting of frames are referred to as progressive, +while those consisting of independent fields are called +either interlaced or video - though this latter term is +ambiguous. + + + +To further complicate matters, some movies will be a mix of +several of the above. + + + +The most important distinction to make between all of these +formats is that some are frame-based, while others are +field-based. +Whenever a movie is prepared +for display on television (including DVD), it is converted to a +field-based format. +The various methods by which this can be done are collectively +referred to as "telecine", of which the infamous NTSC +"3:2 pulldown" is one variety. +Unless the original material was also field-based (and the same +fieldrate), you are getting the movie in a format other than the +original. @@ -183,39 +195,41 @@ - There are also methods for converting between NTSC and PAL video, - but such topics are beyond the scope of this guide. - If you encounter such a movie and want to encode it, your best - bet is to find a copy in the original format. - Conversion between these two formats is highly destructive and - cannot be reversed cleanly, so your encode will greatly suffer - if it is made from a converted source. - - - When video is stored on DVD, consecutive pairs of fields are - grouped as a frame, even though they are not intended to be shown - at the same moment in time. - The MPEG-2 standard used on DVD and digital TV provides a - way both to encode the original progressive frames and to store - the number of fields for which a frame should be shown in the - header of that frame. - If this method has been used, the movie will often be described - as "soft-telecined", since the process only directs the - DVD player to apply pulldown to the movie rather than altering - the movie itself. - This case is highly preferable since it can easily be reversed - (actually ignored) by the encoder, and since it preserves maximal - quality. - However, many DVD and broadcast production studios do not use - proper encoding techniques but instead produce movies with - "hard telecine", where fields are actually duplicated in the - encoded MPEG-2. - - - The procedures for dealing with these cases will be covered - later in this guide. - For now, we leave you with some guides to identifying which type - of material you are dealing with: +There are also methods for converting between NTSC and PAL video, +but such topics are beyond the scope of this guide. +If you encounter such a movie and want to encode it, your best +bet is to find a copy in the original format. +Conversion between these two formats is highly destructive and +cannot be reversed cleanly, so your encode will greatly suffer +if it is made from a converted source. + + + +When video is stored on DVD, consecutive pairs of fields are +grouped as a frame, even though they are not intended to be shown +at the same moment in time. +The MPEG-2 standard used on DVD and digital TV provides a +way both to encode the original progressive frames and to store +the number of fields for which a frame should be shown in the +header of that frame. +If this method has been used, the movie will often be described +as "soft-telecined", since the process only directs the +DVD player to apply pulldown to the movie rather than altering +the movie itself. +This case is highly preferable since it can easily be reversed +(actually ignored) by the encoder, and since it preserves maximal +quality. +However, many DVD and broadcast production studios do not use +proper encoding techniques but instead produce movies with +"hard telecine", where fields are actually duplicated in the +encoded MPEG-2. + + + +The procedures for dealing with these cases will be covered +later in this guide. +For now, we leave you with some guides to identifying which type +of material you are dealing with: @@ -232,9 +246,9 @@ "combing" at times, then there are several possibilities. The 24000/1001 fps segments are almost certainly progressive content, "soft telecined", but the 30000/1001 fps parts could be - either hard-telecined 24000/1001 fps content or 60000/1001 fields per second NTSC video. - Use the same guidelines as the following two cases to determine - which. + either hard-telecined 24000/1001 fps content or 60000/1001 fields per second + NTSC video. + Use the same guidelines as the following two cases to determine which. If MPlayer never shows the framerate @@ -268,192 +282,194 @@ MPlayer can slow down movie playback with the -speed option or play it frame-by-frame. Try using 0.2 to watch the movie very - slowly or press the "." key repeatedly to play one frame at a time - and identify the pattern, if you cannot see it at full speed. + slowly or press the "." key repeatedly to play one frame at + a time and identify the pattern, if you cannot see it at full speed. + + Constant quantizer vs. multipass - It is possible to encode your movie at a wide range of qualities. - With modern video encoders and a bit of pre-codec compression - (downscaling and denoising), it is possible to achieve very good - quality at 700 MB, for a 90-110 minute widescreen movie. - Furthermore, all but the longest movies can be encoded with near-perfect - quality at 1400 MB. - - - - There are three approaches to encoding the video: constant bitrate - (CBR), constant quantizer, and multipass (ABR, or average bitrate). - - - - The complexity of the frames of a movie, and thus the number of bits - required to compress them, can vary greatly from one scene to another. - Modern video encoders can adjust to these needs as they go and vary - the bitrate. - In simple modes such as CBR, however, the encoders do not know the - bitrate needs of future scenes and so cannot exceed the requested - average bitrate for long stretches of time. - More advanced modes, such as multipass encode, can take into account - the statistics from previous passes; this fixes the problem mentioned - above. +It is possible to encode your movie at a wide range of qualities. +With modern video encoders and a bit of pre-codec compression +(downscaling and denoising), it is possible to achieve very good +quality at 700 MB, for a 90-110 minute widescreen movie. +Furthermore, all but the longest movies can be encoded with near-perfect +quality at 1400 MB. + + + +There are three approaches to encoding the video: constant bitrate +(CBR), constant quantizer, and multipass (ABR, or average bitrate). + + + +The complexity of the frames of a movie, and thus the number of bits +required to compress them, can vary greatly from one scene to another. +Modern video encoders can adjust to these needs as they go and vary +the bitrate. +In simple modes such as CBR, however, the encoders do not know the +bitrate needs of future scenes and so cannot exceed the requested +average bitrate for long stretches of time. +More advanced modes, such as multipass encode, can take into account +the statistics from previous passes; this fixes the problem mentioned +above. Note: - Most codecs which support ABR encode only support two pass encode - while some others such as x264, - Xvid - and libavcodec support - multipass, which slightly improves quality at each pass, - yet this improvement is no longer measurable nor noticeable after the - 4th or so pass. - Therefore, in this section, two pass and multipass will be used - interchangeably. +Most codecs which support ABR encode only support two pass encode +while some others such as x264, +Xvid +and libavcodec support +multipass, which slightly improves quality at each pass, +yet this improvement is no longer measurable nor noticeable after the +4th or so pass. +Therefore, in this section, two pass and multipass will be used +interchangeably. - In each of these modes, the video codec (such as - libavcodec) - breaks the video frame into 16x16 pixel macroblocks and then applies a - quantizer to each macroblock. The lower the quantizer, the better the - quality and higher the bitrate. - The method the movie encoder uses to determine - which quantizer to use for a given macroblock varies and is highly - tunable. (This is an extreme over-simplification of the actual - process, but the basic concept is useful to understand.) - - - - When you specify a constant bitrate, the video codec will encode the video, - discarding - detail as much as necessary and as little as possible in order to remain - lower than the given bitrate. If you truly do not care about file size, - you could as well use CBR and specify a bitrate of infinity. (In - practice, this means a value high enough so that it poses no limit, like - 10000Kbit.) With no real restriction on bitrate, the result is that - the codec will use the lowest - possible quantizer for each macroblock (as specified by - for - libavcodec, which is 2 by default). - As soon as you specify a - low enough bitrate that the codec - is forced to use a higher quantizer, then you are almost certainly ruining - the quality of your video. - In order to avoid that, you should probably downscale your video, according - to the method described later on in this guide. - In general, you should avoid CBR altogether if you care about quality. - - - - With constant quantizer, the codec uses the same quantizer, as - specified by the option (for - libavcodec), on every macroblock. - If you want the highest quality rip possible, again ignoring bitrate, - you can use . - This will yield the same bitrate and PSNR (peak signal-to-noise ratio) - as CBR with - =infinity and the default - of 2. - - - - The problem with constant quantizing is that it uses the given quantizer - whether the macroblock needs it or not. That is, it might be possible - to use a higher quantizer on a macroblock without sacrificing visual - quality. Why waste the bits on an unnecessarily low quantizer? Your - CPU has as many cycles as there is time, but there is only so many bits - on your hard disk. - - - - With a two pass encode, the first pass will rip the movie as though it - were CBR, but it will keep a log of properties for each frame. This - data is then used during the second pass in order to make intelligent - decisions about which quantizers to use. During fast action or high - detail scenes, higher quantizers will likely be used, and during - slow moving or low detail scenes, lower quantizers will be used. - Normally, the amount of motion is much more important than the - amount of detail. - - - - If you use , then you are wasting bits. If you - use , then you are not getting the highest - quality rip. Suppose you rip a DVD at , and - the result is 1800Kbit. If you do a two pass encode with - , the resulting video will have higher quality for the - same bitrate. - - - - Since you are now convinced that two pass is the way to go, the real - question now is what bitrate to use? The answer is that there is no - single answer. Ideally you want to choose a bitrate that yields the - best balance between quality and file size. This is going to vary - depending on the source video. - - - - If size does not matter, a good starting point for a very high quality - rip is about 2000Kbit plus or minus 200Kbit. - For fast action or high detail source video, or if you just have a very - critical eye, you might decide on 2400 or 2600. - For some DVDs, you might not notice a difference at 1400Kbit. It is a - good idea to experiment with scenes at different bitrates to get a feel. - - - - If you aim at a certain size, you will have to somehow calculate the bitrate. - But before that, you need to know how much space you should reserve for the - audio track(s), so you should rip - those first. - You can compute the bitrate with the following equation: - bitrate = (target_size_in_Mbytes - sound_size_in_Mbytes) * - 1024 * 1024 / length_in_secs * 8 / 1000 - For instance, to squeeze a two-hour movie onto a 702MB CD, with 60MB - of audio track, the video bitrate will have to be: - (702 - 60) * 1024 * 1024 / (120*60) * 8 / 1000 - = 740kbps - - +In each of these modes, the video codec (such as +libavcodec) +breaks the video frame into 16x16 pixel macroblocks and then applies a +quantizer to each macroblock. The lower the quantizer, the better the +quality and higher the bitrate. +The method the movie encoder uses to determine +which quantizer to use for a given macroblock varies and is highly +tunable. (This is an extreme over-simplification of the actual +process, but the basic concept is useful to understand.) + + + +When you specify a constant bitrate, the video codec will encode the video, +discarding +detail as much as necessary and as little as possible in order to remain +lower than the given bitrate. If you truly do not care about file size, +you could as well use CBR and specify a bitrate of infinity. (In +practice, this means a value high enough so that it poses no limit, like +10000Kbit.) With no real restriction on bitrate, the result is that +the codec will use the lowest +possible quantizer for each macroblock (as specified by + for +libavcodec, which is 2 by default). +As soon as you specify a +low enough bitrate that the codec +is forced to use a higher quantizer, then you are almost certainly ruining +the quality of your video. +In order to avoid that, you should probably downscale your video, according +to the method described later on in this guide. +In general, you should avoid CBR altogether if you care about quality. + + + +With constant quantizer, the codec uses the same quantizer, as +specified by the option (for +libavcodec), on every macroblock. +If you want the highest quality rip possible, again ignoring bitrate, +you can use . +This will yield the same bitrate and PSNR (peak signal-to-noise ratio) +as CBR with +=infinity and the default +of 2. + + + +The problem with constant quantizing is that it uses the given quantizer +whether the macroblock needs it or not. That is, it might be possible +to use a higher quantizer on a macroblock without sacrificing visual +quality. Why waste the bits on an unnecessarily low quantizer? Your +CPU has as many cycles as there is time, but there is only so many bits +on your hard disk. + + + +With a two pass encode, the first pass will rip the movie as though it +were CBR, but it will keep a log of properties for each frame. This +data is then used during the second pass in order to make intelligent +decisions about which quantizers to use. During fast action or high +detail scenes, higher quantizers will likely be used, and during +slow moving or low detail scenes, lower quantizers will be used. +Normally, the amount of motion is much more important than the +amount of detail. + + + +If you use , then you are wasting bits. If you +use , then you are not getting the highest +quality rip. Suppose you rip a DVD at , and +the result is 1800Kbit. If you do a two pass encode with +, the resulting video will have +higher quality for the +same bitrate. + + + +Since you are now convinced that two pass is the way to go, the real +question now is what bitrate to use? The answer is that there is no +single answer. Ideally you want to choose a bitrate that yields the +best balance between quality and file size. This is going to vary +depending on the source video. + + + +If size does not matter, a good starting point for a very high quality +rip is about 2000Kbit plus or minus 200Kbit. +For fast action or high detail source video, or if you just have a very +critical eye, you might decide on 2400 or 2600. +For some DVDs, you might not notice a difference at 1400Kbit. It is a +good idea to experiment with scenes at different bitrates to get a feel. + + + +If you aim at a certain size, you will have to somehow calculate the bitrate. +But before that, you need to know how much space you should reserve for the +audio track(s), so you should +rip those first. +You can compute the bitrate with the following equation: +bitrate = (target_size_in_Mbytes - sound_size_in_Mbytes) * +1024 * 1024 / length_in_secs * 8 / 1000 +For instance, to squeeze a two-hour movie onto a 702MB CD, with 60MB +of audio track, the video bitrate will have to be: +(702 - 60) * 1024 * 1024 / (120*60) * 8 / 1000 += 740kbps + + Constraints for efficient encoding - Due to the nature of MPEG-type compression, there are various - constraints you should follow for maximal quality. - MPEG splits the video up into 16x16 squares called macroblocks, - each composed of 4 8x8 blocks of luma (intensity) information and two - half-resolution 8x8 chroma (color) blocks (one for red-cyan axis and - the other for the blue-yellow axis). - Even if your movie width and height are not multiples of 16, the - encoder will use enough 16x16 macroblocks to cover the whole picture - area, and the extra space will go to waste. - So in the interests of maximizing quality at a fixed filesize, it is - a bad idea to use dimensions that are not multiples of 16. - - - - Most DVDs also have some degree of black borders at the edges. Leaving - these in place will hurt quality a lot - in several ways. +Due to the nature of MPEG-type compression, there are various +constraints you should follow for maximal quality. +MPEG splits the video up into 16x16 squares called macroblocks, +each composed of 4 8x8 blocks of luma (intensity) information and two +half-resolution 8x8 chroma (color) blocks (one for red-cyan axis and +the other for the blue-yellow axis). +Even if your movie width and height are not multiples of 16, the +encoder will use enough 16x16 macroblocks to cover the whole picture +area, and the extra space will go to waste. +So in the interests of maximizing quality at a fixed filesize, it is +a bad idea to use dimensions that are not multiples of 16. + + + +Most DVDs also have some degree of black borders at the edges. Leaving +these in place will hurt quality a lot +in several ways. - + MPEG-type compression is also highly dependent on frequency domain transformations, in particular the Discrete Cosine Transform (DCT), which is similar to the Fourier transform. This sort of encoding is @@ -461,33 +477,33 @@ has a hard time with sharp edges. In order to encode them it must use many more bits, or else an artifact known as ringing will appear. - - - + + + The frequency transform (DCT) takes place separately on each macroblock (actually each block), so this problem only applies when the sharp edge is inside a block. If your black borders begin exactly at multiple-of-16 pixel boundaries, this is not a problem. However, the black borders on DVDs rarely come nicely aligned, so in practice you will always need to crop to avoid this penalty. - + - In addition to frequency domain transforms, MPEG-type compression uses - motion vectors to represent the change from one frame to the next. - Motion vectors naturally work much less efficiently for new content - coming in from the edges of the picture, because it is not present in - the previous frame. As long as the picture extends all the way to the - edge of the encoded region, motion vectors have no problem with - content moving out the edges of the picture. However, in the presence - of black borders, there can be trouble: +In addition to frequency domain transforms, MPEG-type compression uses +motion vectors to represent the change from one frame to the next. +Motion vectors naturally work much less efficiently for new content +coming in from the edges of the picture, because it is not present in +the previous frame. As long as the picture extends all the way to the +edge of the encoded region, motion vectors have no problem with +content moving out the edges of the picture. However, in the presence +of black borders, there can be trouble: - + For each macroblock, MPEG-type compression stores a vector identifying which part of the previous frame should be copied into this macroblock as a base for predicting the next frame. Only the @@ -499,72 +515,71 @@ motion vector will not be used at all and all the changes in this macroblock will have to be coded explicitly. Either way, encoding efficiency is greatly reduced. - - - + + + Again, this problem only applies if black borders do not line up on multiple-of-16 boundaries. - + - + Finally, suppose we have a macroblock in the interior of the picture, and an object is moving into this block from near the edge of the image. MPEG-type coding cannot say "copy the part that is inside the picture but not the black border." So the black border will get copied inside too, and lots of bits will have to be spent encoding the part of the picture that is supposed to be there. - - - + + + If the picture runs all the way to the edge of the encoded area, MPEG has special optimizations to repeatedly copy the pixels at the edge of the picture when a motion vector comes from outside the encoded area. This feature becomes useless when the movie has black borders. Unlike problems 1 and 2, aligning the borders at multiples of 16 does not help here. - + - - + Despite the borders being entirely black and never changing, there is at least a minimal amount of overhead involved in having more macroblocks. - - + - For all of these reasons, it is recommended to fully crop black - borders. Further, if there is an area of noise/distortion at the edge - of the picture, cropping this will improve encoding efficiency as - well. Videophile purists who want to preserve the original as close as - possible may object to this cropping, but unless you plan to encode at - constant quantizer, the quality you gain from cropping will - considerably exceed the amount of information lost at the edges. +For all of these reasons, it is recommended to fully crop black +borders. Further, if there is an area of noise/distortion at the edge +of the picture, cropping this will improve encoding efficiency as +well. Videophile purists who want to preserve the original as close as +possible may object to this cropping, but unless you plan to encode at +constant quantizer, the quality you gain from cropping will +considerably exceed the amount of information lost at the edges. + Cropping and Scaling - Recall from the previous section that the final picture size you - encode should be a multiple of 16 (in both width and height). - This can be achieved by cropping, scaling, or a combination of both. - - - - When cropping, there are a few guidelines that must be followed to - avoid damaging your movie. - The normal YUV format, 4:2:0, stores chroma (color) information - subsampled, i.e. chroma is only sampled half as often in each - direction as luma (intensity) information. - Observe this diagram, where L indicates luma sampling points and C - chroma. +Recall from the previous section that the final picture size you +encode should be a multiple of 16 (in both width and height). +This can be achieved by cropping, scaling, or a combination of both. + + + +When cropping, there are a few guidelines that must be followed to +avoid damaging your movie. +The normal YUV format, 4:2:0, stores chroma (color) information +subsampled, i.e. chroma is only sampled half as often in each +direction as luma (intensity) information. +Observe this diagram, where L indicates luma sampling points and C +chroma. @@ -641,18 +656,18 @@ - As you can see, rows and columns of the image naturally come in pairs. - Thus your crop offsets and dimensions must be - even numbers. - If they are not, the chroma will no longer line up correctly with the - luma. - In theory, it is possible to crop with odd offsets, but it requires - resampling the chroma which is potentially a lossy operation and not - supported by the crop filter. - - - - Further, interlaced video is sampled as follows: +As you can see, rows and columns of the image naturally come in pairs. +Thus your crop offsets and dimensions must be +even numbers. +If they are not, the chroma will no longer line up correctly with the +luma. +In theory, it is possible to crop with odd offsets, but it requires +resampling the chroma which is potentially a lossy operation and not +supported by the crop filter. + + + +Further, interlaced video is sampled as follows: @@ -893,164 +908,169 @@ - As you can see, the pattern does not repeat until after 4 lines. - So for interlaced video, your y-offset and height for cropping must - be multiples of 4. - - - - Native DVD resolution is 720x480 for NTSC, and 720x576 for PAL, but - there is an aspect flag that specifies whether it is full-screen (4:3) or - wide-screen (16:9). Many (if not most) widescreen DVDs are not strictly - 16:9, and will be either 1.85:1 or 2.35:1 (cinescope). This means that - there will be black bands in the video that will need to be cropped out. - - - - MPlayer provides a crop detection filter that - will determine the crop rectangle (). - Run MPlayer with - and it will print out the crop - settings to remove the borders. - You should let the movie run long enough that the whole picture - area is used, in order to get accurate crop values. - - - - Then, test the values you get with MPlayer, - using the command line which was printed by - , and adjust the rectangle as needed. - The filter can help by allowing you to - interactively position the crop rectangle over your movie. - Remember to follow the above divisibility guidelines so that you - do not misalign the chroma planes. - - - - In certain cases, scaling may be undesirable. - Scaling in the vertical direction is difficult with interlaced - video, and if you wish to preserve the interlacing, you should - usually refrain from scaling. - If you will not be scaling but you still want to use multiple-of-16 - dimensions, you will have to overcrop. - Do not undercrop, since black borders are very bad for encoding! - - - - Because MPEG-4 uses 16x16 macroblocks, you will want to make sure that each - dimension of the video you are encoding is a multiple of 16 or else you - will be degrading quality, especially at lower bitrates. You can do this - by rounding the width and height of the crop rectangle down to the nearest - multiple of 16. - As stated earlier, when cropping, you will want to increase the Y offset by - half the difference of the old and the new height so that the resulting - video is taken from the center of the frame. And because of the way DVD - video is sampled, make sure the offset is an even number. (In fact, as a - rule, never use odd values for any parameter when you are cropping and - scaling video.) If you are not comfortable throwing a few extra pixels - away, you might prefer instead to scale the video instead. We will look - at this in our example below. - You can actually let the filter do all of the - above for you, as it has an optional parameter that - is equal to 16 by default. - - - - Also, be careful about "half black" pixels at the edges. Make sure you - crop these out too, or else you will be wasting bits there that - are better spent elsewhere. - - - - After all is said and done, you will probably end up with video whose pixels - are not quite 1.85:1 or 2.35:1, but rather something close to that. You - could calculate the new aspect ratio manually, but - MEncoder offers an option for libavcodec called - that will do this for you. Absolutely do not scale this video up in order to - square the pixels unless you like to waste your hard disk space. Scaling - should be done on playback, and the player will use the aspect stored in - the AVI to determine the correct resolution. - Unfortunately, not all players enforce this auto-scaling information, - therefore you may still want to rescale. +As you can see, the pattern does not repeat until after 4 lines. +So for interlaced video, your y-offset and height for cropping must +be multiples of 4. + + + +Native DVD resolution is 720x480 for NTSC, and 720x576 for PAL, but +there is an aspect flag that specifies whether it is full-screen (4:3) or +wide-screen (16:9). Many (if not most) widescreen DVDs are not strictly +16:9, and will be either 1.85:1 or 2.35:1 (cinescope). This means that +there will be black bands in the video that will need to be cropped out. + + + +MPlayer provides a crop detection filter that +will determine the crop rectangle (). +Run MPlayer with + and it will print out the crop +settings to remove the borders. +You should let the movie run long enough that the whole picture +area is used, in order to get accurate crop values. + + + +Then, test the values you get with MPlayer, +using the command line which was printed by +, and adjust the rectangle as needed. +The filter can help by allowing you to +interactively position the crop rectangle over your movie. +Remember to follow the above divisibility guidelines so that you +do not misalign the chroma planes. + + + +In certain cases, scaling may be undesirable. +Scaling in the vertical direction is difficult with interlaced +video, and if you wish to preserve the interlacing, you should +usually refrain from scaling. +If you will not be scaling but you still want to use multiple-of-16 +dimensions, you will have to overcrop. +Do not undercrop, since black borders are very bad for encoding! + + + +Because MPEG-4 uses 16x16 macroblocks, you will want to make sure that each +dimension of the video you are encoding is a multiple of 16 or else you +will be degrading quality, especially at lower bitrates. You can do this +by rounding the width and height of the crop rectangle down to the nearest +multiple of 16. +As stated earlier, when cropping, you will want to increase the Y offset by +half the difference of the old and the new height so that the resulting +video is taken from the center of the frame. And because of the way DVD +video is sampled, make sure the offset is an even number. (In fact, as a +rule, never use odd values for any parameter when you are cropping and +scaling video.) If you are not comfortable throwing a few extra pixels +away, you might prefer instead to scale the video instead. We will look +at this in our example below. +You can actually let the filter do all of the +above for you, as it has an optional parameter that +is equal to 16 by default. + + + +Also, be careful about "half black" pixels at the edges. Make sure you +crop these out too, or else you will be wasting bits there that +are better spent elsewhere. + + + +After all is said and done, you will probably end up with video whose pixels +are not quite 1.85:1 or 2.35:1, but rather something close to that. You +could calculate the new aspect ratio manually, but +MEncoder offers an option for libavcodec called +that will do this for you. Absolutely do not scale this video up in order to +square the pixels unless you like to waste your hard disk space. Scaling +should be done on playback, and the player will use the aspect stored in +the AVI to determine the correct resolution. +Unfortunately, not all players enforce this auto-scaling information, +therefore you may still want to rescale. + Choosing resolution and bitrate - If you will not be encoding in constant quantizer mode, you need to - select a bitrate. - The concept of bitrate is quite simple. - It is the (average) number of bits that will be consumed to store your - movie, per second. - Normally bitrate is measured in kilobits (1000 bits) per second. - The size of your movie on disk is the bitrate times the length of the - movie in time, plus a small amount of "overhead" (see the section on - the AVI container - for instance). - Other parameters such as scaling, cropping, etc. will - not alter the file size unless you - change the bitrate as well!. - - - Bitrate does not scale proportionally - to resolution. - That is to say, a 320x240 file at 200 kbit/sec will not be the same - quality as the same movie at 640x480 and 800 kbit/sec! - There are two reasons for this: +If you will not be encoding in constant quantizer mode, you need to +select a bitrate. +The concept of bitrate is quite simple. +It is the (average) number of bits that will be consumed to store your +movie, per second. +Normally bitrate is measured in kilobits (1000 bits) per second. +The size of your movie on disk is the bitrate times the length of the +movie in time, plus a small amount of "overhead" (see the section on +the AVI container +for instance). +Other parameters such as scaling, cropping, etc. will +not alter the file size unless you +change the bitrate as well!. + + + +Bitrate does not scale proportionally +to resolution. +That is to say, a 320x240 file at 200 kbit/sec will not be the same +quality as the same movie at 640x480 and 800 kbit/sec! +There are two reasons for this: - - Perceptual: You notice MPEG - artifacts more if they are scaled up bigger! - Artifacts appear on the scale of blocks (8x8). - Your eye will not see errors in 4800 small blocks as easily as it - sees errors in 1200 large blocks (assuming you will be scaling both - to fullscreen). - - - Theoretical: When you scale down - an image but still use the same size (8x8) blocks for the frequency - space transform, you move more data to the high frequency bands. - Roughly speaking, each pixel contains more of the detail than it - did before. - So even though your scaled-down picture contains 1/4 the information - in the spacial directions, it could still contain a large portion - of the information in the frequency domain (assuming that the high - frequencies were underutilized in the original 640x480 image). - - - - - Past guides have recommended choosing a bitrate and resolution based - on a "bits per pixel" approach, but this is usually not valid due to - the above reasons. - A better estimate seems to be that bitrates scale proportional to the - square root of resolution, so that 320x240 and 400 kbit/sec would be - comparable to 640x480 at 800 kbit/sec. - However this has not been verified with theoretical or empirical - rigor. - Further, given that movies vary greatly with regard to noise, detail, - degree of motion, etc., it is futile to make general recommendations - for bits per length-of-diagonal (the analog of bits per pixel, - using the square root). - - - So far we have discussed the difficulty of choosing a bitrate and - resolution. + + Perceptual: You notice MPEG + artifacts more if they are scaled up bigger! + Artifacts appear on the scale of blocks (8x8). + Your eye will not see errors in 4800 small blocks as easily as it + sees errors in 1200 large blocks (assuming you will be scaling both + to fullscreen). + + + Theoretical: When you scale down + an image but still use the same size (8x8) blocks for the frequency + space transform, you move more data to the high frequency bands. + Roughly speaking, each pixel contains more of the detail than it + did before. + So even though your scaled-down picture contains 1/4 the information + in the spacial directions, it could still contain a large portion + of the information in the frequency domain (assuming that the high + frequencies were underutilized in the original 640x480 image). + + + + + +Past guides have recommended choosing a bitrate and resolution based +on a "bits per pixel" approach, but this is usually not valid due to +the above reasons. +A better estimate seems to be that bitrates scale proportional to the +square root of resolution, so that 320x240 and 400 kbit/sec would be +comparable to 640x480 at 800 kbit/sec. +However this has not been verified with theoretical or empirical +rigor. +Further, given that movies vary greatly with regard to noise, detail, +degree of motion, etc., it is futile to make general recommendations +for bits per length-of-diagonal (the analog of bits per pixel, +using the square root). + + +So far we have discussed the difficulty of choosing a bitrate and +resolution. Computing the resolution - - The following steps will guide you in computing the resolution of your - encode without distorting the video too much, by taking into account several - types of information about the source video. - First, you should compute the encoded aspect ratio: - ARc = (Wc x (ARa / PRdvd )) / Hc + + +The following steps will guide you in computing the resolution of your +encode without distorting the video too much, by taking into account several +types of information about the source video. +First, you should compute the encoded aspect ratio: +ARc = (Wc x (ARa / PRdvd )) / Hc + where: @@ -1067,219 +1087,220 @@ - Then, you can compute the X and Y resolution, according to a certain - Compression Quality (CQ) factor: - ResY = INT(SQRT( 1000*Bitrate/25/ARc/CQ )/16) * 16 - and - ResX = INT( ResY * ARc / 16) * 16 - - - - Okay, but what is the CQ? - The CQ represents the number of bits per pixel and per frame of the encode. - Roughly speaking, the greater the CQ, the less the likelihood to see - encoding artifacts. - However, if you have a target size for your movie (1 or 2 CDs for instance), - there is a limited total number of bits that you can spend; therefore it is - necessary to find a good tradeoff between compressibility and quality. - - - - The CQ depends on the bitrate, the video codec efficiency and the - movie resolution. - In order to raise the CQ, typically you would downscale the movie given that the - bitrate is computed in function of the target size and the length of the - movie, which are constant. - With MPEG-4 ASP codecs such as Xvid - and libavcodec, a CQ below 0.18 - usually results in a pretty blocky picture, because there - are not enough bits to code the information of each macroblock. (MPEG4, like - many other codecs, groups pixels by blocks of several pixels to compress the - image; if there are not enough bits, the edges of those blocks are - visible.) - It is therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, - and 0.26-0.28 for 2 CDs rip with standard encoding options. - More advanced encoding options such as those listed here for - libavcodec - and +Then, you can compute the X and Y resolution, according to a certain +Compression Quality (CQ) factor: +ResY = INT(SQRT( 1000*Bitrate/25/ARc/CQ )/16) * 16 +and +ResX = INT( ResY * ARc / 16) * 16 + + + +Okay, but what is the CQ? +The CQ represents the number of bits per pixel and per frame of the encode. +Roughly speaking, the greater the CQ, the less the likelihood to see +encoding artifacts. +However, if you have a target size for your movie (1 or 2 CDs for instance), +there is a limited total number of bits that you can spend; therefore it is +necessary to find a good tradeoff between compressibility and quality. + + + +The CQ depends on the bitrate, the video codec efficiency and the +movie resolution. +In order to raise the CQ, typically you would downscale the movie given that the +bitrate is computed in function of the target size and the length of the +movie, which are constant. +With MPEG-4 ASP codecs such as Xvid +and libavcodec, a CQ below 0.18 +usually results in a pretty blocky picture, because there +are not enough bits to code the information of each macroblock. (MPEG4, like +many other codecs, groups pixels by blocks of several pixels to compress the +image; if there are not enough bits, the edges of those blocks are +visible.) +It is therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, +and 0.26-0.28 for 2 CDs rip with standard encoding options. +More advanced encoding options such as those listed here for +libavcodec +and Xvid - should make it possible to get the same quality with CQ ranging from - 0.18 to 0.20 for a 1 CD rip, and 0.24 to 0.26 for a 2 CD rip. - With MPEG-4 ASP codecs such as x264, - you can use a CQ ranging from 0.14 to 0.16 with standard encoding options, - and should be able to go as low as 0.10 to 0.12 with - x264's advanced encoding settings. - - - - Please take note that the CQ is just an indicative figure, as depending on - the encoded content, a CQ of 0.18 may look just fine for a Bergman, contrary - to a movie such as The Matrix, which contains many high-motion scenes. - On the other hand, it is worthless to raise CQ higher than 0.30 as you would - be wasting bits without any noticeable quality gain. - Also note that as mentioned earlier in this guide, low resolution videos - need a bigger CQ (compared to, for instance, DVD resolution) to look good. +should make it possible to get the same quality with CQ ranging from +0.18 to 0.20 for a 1 CD rip, and 0.24 to 0.26 for a 2 CD rip. +With MPEG-4 ASP codecs such as x264, +you can use a CQ ranging from 0.14 to 0.16 with standard encoding options, +and should be able to go as low as 0.10 to 0.12 with +x264's advanced encoding settings. + + + +Please take note that the CQ is just an indicative figure, as depending on +the encoded content, a CQ of 0.18 may look just fine for a Bergman, contrary +to a movie such as The Matrix, which contains many high-motion scenes. +On the other hand, it is worthless to raise CQ higher than 0.30 as you would +be wasting bits without any noticeable quality gain. +Also note that as mentioned earlier in this guide, low resolution videos +need a bigger CQ (compared to, for instance, DVD resolution) to look good. - + + Filtering - Learning how to use MEncoder's video filters - is essential to producing good encodes. - All video processing is performed through the filters -- cropping, - scaling, color adjustment, noise removal, sharpening, deinterlacing, - telecine, inverse telecine, and deblocking, just to name a few. - Along with the vast number of supported input formats, the variety of - filters available in MEncoder is one of its - main advantages over other similar programs. - - - - Filters are loaded in a chain using the -vf option: - - -vf filter1=options,filter2=options,... - - Most filters take several numeric options separated by colons, but - the syntax for options varies from filter to filter, so read the man - page for details on the filters you wish to use. - - - - Filters operate on the video in the order they are loaded. - For example, the following chain: - - -vf crop=688:464:12:4,scale=640:464 - - will first crop the 688x464 region of the picture with upper-left - corner at (12,4), and then scale the result down to 640x464. - - - - Certain filters need to be loaded at or near the beginning of the - filter chain, in order to take advantage of information from the - video decoder that will be lost or invalidated by other filters. - The principal examples are (postprocessing, only - when it is performing deblock or dering operations), - (another postprocessor to remove MPEG artifacts), - (inverse telecine), and - (for converting soft telecine to hard - telecine). - - - - In general, you want to do as little filtering as possible to the movie - in order to remain close to the original DVD source. Cropping is often - necessary (as described above), but avoid to scale the video. Although - scaling down is sometimes preferred to using higher quantizers, we want - to avoid both these things: remember that we decided from the start to - trade bits for quality. - - - - Also, do not adjust gamma, contrast, brightness, etc. What looks good - on your display may not look good on others. These adjustments should - be done on playback only. - - - - One thing you might want to do, however, is pass the video through a - very light denoise filter, such as . - Again, it is a matter of putting those bits to better use: why waste them - encoding noise when you can just add that noise back in during playback? - Increasing the parameters for will further - improve compressibility, but if you increase the values too much, you - risk degrading the image visibily. The suggested values above - () are quite conservative; you should feel free to - experiment with higher values and observe the results for yourself. - - +Learning how to use MEncoder's video filters +is essential to producing good encodes. +All video processing is performed through the filters -- cropping, +scaling, color adjustment, noise removal, sharpening, deinterlacing, +telecine, inverse telecine, and deblocking, just to name a few. +Along with the vast number of supported input formats, the variety of +filters available in MEncoder is one of its +main advantages over other similar programs. + + + +Filters are loaded in a chain using the -vf option: + +-vf filter1=options,filter2=options,... + +Most filters take several numeric options separated by colons, but +the syntax for options varies from filter to filter, so read the man +page for details on the filters you wish to use. + + + +Filters operate on the video in the order they are loaded. +For example, the following chain: + +-vf crop=688:464:12:4,scale=640:464 + +will first crop the 688x464 region of the picture with upper-left +corner at (12,4), and then scale the result down to 640x464. + + + +Certain filters need to be loaded at or near the beginning of the +filter chain, in order to take advantage of information from the +video decoder that will be lost or invalidated by other filters. +The principal examples are (postprocessing, only +when it is performing deblock or dering operations), + (another postprocessor to remove MPEG artifacts), + (inverse telecine), and + (for converting soft telecine to hard telecine). + + + +In general, you want to do as little filtering as possible to the movie +in order to remain close to the original DVD source. Cropping is often +necessary (as described above), but avoid to scale the video. Although +scaling down is sometimes preferred to using higher quantizers, we want +to avoid both these things: remember that we decided from the start to +trade bits for quality. + + + +Also, do not adjust gamma, contrast, brightness, etc. What looks good +on your display may not look good on others. These adjustments should +be done on playback only. + + + +One thing you might want to do, however, is pass the video through a +very light denoise filter, such as . +Again, it is a matter of putting those bits to better use: why waste them +encoding noise when you can just add that noise back in during playback? +Increasing the parameters for will further +improve compressibility, but if you increase the values too much, you +risk degrading the image visibily. The suggested values above +() are quite conservative; you should feel free to +experiment with higher values and observe the results for yourself. + + Interlacing and Telecine - Almost all movies are shot at 24 fps. Because NTSC is 30000/1001 fps, some - processing must be done to this 24 fps video to make it run at the correct - NTSC framerate. The process is called 3:2 pulldown, commonly referred to - as telecine (because pulldown is often applied during the telecine - process), and, naively described, it works by slowing the film down to - 24000/1001 fps, and repeating every fourth frame. - - - - No special processing, however, is done to the video for PAL DVDs, which - run at 25 fps. (Technically, PAL can be telecined, called 2:2 pulldown, - but this does not become an issue in practice.) The 24 fps film is simply - played back at 25 fps. The result is that the movie runs slightly faster, - but unless you are an alien, you probably will not notice the difference. - Most PAL DVDs have pitch-corrected audio, so when they are played back at - 25 fps things will sound right, even though the audio track (and hence the - whole movie) has a running time that is 4% less than NTSC DVDs. - - - - Because the video in a PAL DVD has not been altered, you need not worry - much about framerate. The source is 25 fps, and your rip will be 25 - fps. However, if you are ripping an NTSC DVD movie, you may need to - apply inverse telecine. - - - - For movies shot at 24 fps, the video on the NTSC DVD is either telecined - 30000/1001, or else it is progressive 24000/1001 fps and intended to be telecined - on-the-fly by a DVD player. On the other hand, TV series are usually - only interlaced, not telecined. This is not a hard rule: some TV series - are interlaced (such as Buffy the Vampire Slayer) whereas some are a - mixture of progressive and interlaced (such as Angel, or 24). - - - - It is highly recommended that you read the section on - How to deal with telecine and interlacing in NTSC DVDs - to learn how to handle the different possibilities. - - - - However, if you are mostly just ripping movies, likely you are either - dealing with 24 fps progressive or telecined video, in which case you can - use the filter . - - +Almost all movies are shot at 24 fps. Because NTSC is 30000/1001 fps, some +processing must be done to this 24 fps video to make it run at the correct +NTSC framerate. The process is called 3:2 pulldown, commonly referred to +as telecine (because pulldown is often applied during the telecine +process), and, naively described, it works by slowing the film down to +24000/1001 fps, and repeating every fourth frame. + + + +No special processing, however, is done to the video for PAL DVDs, which +run at 25 fps. (Technically, PAL can be telecined, called 2:2 pulldown, +but this does not become an issue in practice.) The 24 fps film is simply +played back at 25 fps. The result is that the movie runs slightly faster, +but unless you are an alien, you probably will not notice the difference. +Most PAL DVDs have pitch-corrected audio, so when they are played back at +25 fps things will sound right, even though the audio track (and hence the +whole movie) has a running time that is 4% less than NTSC DVDs. + + + +Because the video in a PAL DVD has not been altered, you need not worry +much about framerate. The source is 25 fps, and your rip will be 25 +fps. However, if you are ripping an NTSC DVD movie, you may need to +apply inverse telecine. + + + +For movies shot at 24 fps, the video on the NTSC DVD is either telecined +30000/1001, or else it is progressive 24000/1001 fps and intended to be +telecined on-the-fly by a DVD player. On the other hand, TV series are usually +only interlaced, not telecined. This is not a hard rule: some TV series +are interlaced (such as Buffy the Vampire Slayer) whereas some are a +mixture of progressive and interlaced (such as Angel, or 24). + + + +It is highly recommended that you read the section on +How to deal with telecine and interlacing in NTSC DVDs +to learn how to handle the different possibilities. + + + +However, if you are mostly just ripping movies, likely you are either +dealing with 24 fps progressive or telecined video, in which case you can +use the filter . + + + Encoding interlaced video - If the movie you want to encode is interlaced (NTSC video or - PAL video), you will need to choose whether you want to - deinterlace or not. - While deinterlacing will make your movie usable on progressive - scan displays such a computer monitors and projectors, it comes - at a cost: The fieldrate of 50 or 60000/1001 fields per second - is halved to 25 or 30000/1001 frames per second, and roughly half of - the information in your movie will be lost during scenes with - significant motion. - - - - Therefore, if you are encoding for high quality archival purposes, - it is recommended not to deinterlace. - You can always deinterlace the movie at playback time when - displaying it on progressive scan devices. - The power of currently available computers forces players to use a - deinterlacing filter, which results in a slight degradation in - image quality. - But future players will be able to mimic the interlaced display of - a TV, deinterlacing to full fieldrate and interpolating 50 or - 60000/1001 entire frames per second from the interlaced video. +If the movie you want to encode is interlaced (NTSC video or +PAL video), you will need to choose whether you want to +deinterlace or not. +While deinterlacing will make your movie usable on progressive +scan displays such a computer monitors and projectors, it comes +at a cost: The fieldrate of 50 or 60000/1001 fields per second +is halved to 25 or 30000/1001 frames per second, and roughly half of +the information in your movie will be lost during scenes with +significant motion. + + + +Therefore, if you are encoding for high quality archival purposes, +it is recommended not to deinterlace. +You can always deinterlace the movie at playback time when +displaying it on progressive scan devices. +The power of currently available computers forces players to use a +deinterlacing filter, which results in a slight degradation in +image quality. +But future players will be able to mimic the interlaced display of +a TV, deinterlacing to full fieldrate and interpolating 50 or +60000/1001 entire frames per second from the interlaced video. @@ -1302,19 +1323,19 @@ With these things in mind, here is our first example: - - mencoder capture.avi -mc 0 -oac lavc -ovc lavc -lavcopts \ - vcodec=mpeg2video:vbitrate=6000:ilme:ildct:acodec=mp2:abitrate=224 +mencoder capture.avi -mc 0 -oac lavc -ovc lavc -lavcopts \ + vcodec=mpeg2video:vbitrate=6000:ilme:ildct:acodec=mp2:abitrate=224 - Note the and options. + Notes on Audio/Video synchronization + MEncoder's audio/video synchronization algorithms were designed with the intention of recovering files with @@ -1329,6 +1350,7 @@ you are only working with good sources (DVD, TV capture, high quality MPEG-4 rips, etc) and not broken ASF/RM/MOV files. + If you want to further guard against strange frame skips and duplication, you can use both and @@ -1339,9 +1361,11 @@ framerate! Therefore, using is not in general recommended. - -The so-called "three-pass" audio encoding which MEncoder -supports has been reported to cause A/V desync. + + +The so-called "three-pass" audio encoding which +MEncoder supports has been reported to cause A/V +desync. This will definitely happen if it is used in conjunction with certain filters, therefore, it is now recommended not to use three-pass audio mode. @@ -1350,6 +1374,7 @@ If you have never heard of three-pass mode before, forget that we even mentioned it! + There have also been reports of A/V desync when encoding from stdin with MEncoder. @@ -1357,23 +1382,26 @@ + + Choosing the video codec - Which video codec is best to choose depends on several factors, - like size, quality, streamability, usability and popularity, some of - which widely depend on personal taste and technical constraints. +Which video codec is best to choose depends on several factors, +like size, quality, streamability, usability and popularity, some of +which widely depend on personal taste and technical constraints. - + + Compression efficiency: It is quite easy to understand that most newer-generation codecs are made to increase quality and compression. Therefore, the authors of this guide and many other people suggest that you cannot go wrong - - Be careful, however: Decoding DVD-resolution MPEG-4 AVC videos + + Be careful, however: Decoding DVD-resolution MPEG-4 AVC videos requires a fast machine (i.e. a Pentium 4 over 1.5GHz or a Pentium M over 1GHz). @@ -1387,18 +1415,21 @@ Likewise, you should get better quality using MPEG-4 ASP than you would with MPEG-2 codecs. + However, newer codecs which are in heavy development can suffer from bugs which have not yet been noticed and which can ruin an encode. This is simply the tradeoff for using bleeding-edge technology. + What is more, beginning to use a new codec requires that you spend some time becoming familiar with its options, so that you know what to adjust to achieve a desired picture quality. - - - + + + + Hardware compatibility: It usually takes a long time for standalone video players to begin to include support for the latest video codecs. @@ -1409,9 +1440,10 @@ (Beware: Usually, not all MPEG-4 ASP features are supported). Please refer to the technical specs of your player (if they are available), or google around for more information. - - - + + + + Best quality per encoding time: Codecs that have been around for some time (such as libavcodec MPEG-4 and @@ -1421,11 +1453,13 @@ However, they may have some very advanced options that, if enabled, will make the encode really slow for marginal gains. + If you are after blazing speed you should stick around the default settings of the video codec (although you should still try the other options which are mentioned in other sections of this guide). + You may also consider choosing a codec which can do multi-threaded processing, though this is only useful for users of machines with @@ -1440,9 +1474,11 @@ x264 also allows multi-threaded encoding, which currently speeds up encoding by 15-30% (depending on the encoding settings) while lowering PSNR by about 0.05dB. - - - + + + + + Personal taste: This is where it gets almost irrational: For the same reason that some hung on to DivX 3 for years when newer codecs were already doing wonders, @@ -1457,224 +1493,238 @@ encoding options and codecs to find one that suits you best. The best codec is the one you master, and the one that looks best to your eyes on your display - - The same encode may not look the same on someone else's monitor or + + The same encode may not look the same on someone else's monitor or when played back by a different decoder, so future-proof your encodes by - playing them back on different setups.! - + playing them back on different setups. + ! + + - - Please refer to the section - selecting codecs and container formats - to get a list of supported codecs. + + +Please refer to the section +selecting codecs and container formats +to get a list of supported codecs. + + Audio - Audio is a much simpler problem to solve: if you care about quality, just - leave it as is. - Even AC3 5.1 streams are at most 448Kbit/s, and they are worth every bit. - You might be tempted to transcode the audio to high quality Vorbis, but - just because you do not have an A/V receiver for AC3 pass-through today - does not mean you will not have one tomorrow. Future-proof your DVD rips by - preserving the AC3 stream. - You can keep the AC3 stream either by copying it directly into the video - stream during the encoding. - You can also extract the AC3 stream in order to mux it into containers such - as NUT or Matroska. - mplayer source_file.vob -aid 129 -dumpaudio -dumpfile sound.ac3 - will dump into the file sound.ac3 the - audio track number 129 from the file - source_file.vob (NB: DVD VOB files - usually use a different audio numbering, - which means that the VOB audio track 129 is the 2nd audio track of the file). - - - - But sometimes you truly have no choice but to further compress the - sound so that more bits can be spent on the video. - Most people choose to compress audio with either MP3 or Vorbis audio - codecs. - While the latter is a very space-efficient codec, MP3 is better supported - by hardware players, although this trend is changing. - - - - Do not use when encoding - a file with audio, even if you will be encoding and muxing audio - separately later. - Though it may work in ideal cases, using is - likely to hide some problems in your encoding command line setting. - In other words, having a soundtrack during your encode assures you that, - provided you do not see messages such as - Too many audio packets in the buffer, you will be able - to get proper sync. - - - - You need to have MEncoder process the sound. - You can for example copy the orignal soundtrack during the encode with - or convert it to a "light" 4 kHz mono WAV - PCM with . - Otherwise, in some cases, it will generate a video file that will not sync - with the audio. - Such cases are when the number of video frames in the source file does - not match up to the total length of audio frames or whenever there - are discontinuities/splices where there are missing or extra audio frames. - The correct way to handle this kind of problem is to insert silence or - cut audio at these points. - However MPlayer cannot do that, so if you - demux the AC3 audio and encode it with a separate app (or dump it to PCM with - MPlayer), the splices will be left incorrect - and the only way to correct them is to drop/dup video frames at the - splice. - As long as MEncoder sees the audio when it is - encoding the video, it can do this dropping/duping (which is usually OK - since it takes place at full black/scenechange), but if - MEncoder cannot see the audio, it will just - process all frames as-is and they will not fit the final audio stream when - you for example merge your audio and video track into a Matroska file. - - - - First of all, you will have to convert the DVD sound into a WAV file that the - audio codec can use as input. - For example: - mplayer source_file.vob -ao pcm:file=destination_sound.wav -vc dummy -aid 1 -vo null - will dump the second audio track from the file - source_file.vob into the file - destination_sound.wav. - You may want to normalize the sound before encoding, as DVD audio tracks - are commonly recorded at low volumes. - You can use the tool normalize for instance, - which is available in most distributions. - If you are using Windows, a tool such as BeSweet - can do the same job. - You will compress in either Vorbis or MP3. - For example: - oggenc -q1 destination_sound.wav - will encode destination_sound.wav with - the encoding quality 1, which is roughly equivalent to 80Kb/s, and - is the minimum quality at which you should encode if you care about - quality. - Please note that MEncoder currently cannot - mux Vorbis audio tracks - into the output file because it only supports AVI and MPEG - containers as an output, each of which may lead to audio/video - playback synchronization problems with some players when the AVI file - contain VBR audio streams such as Vorbis. - Do not worry, this document will show you how you can do that with third - party programs. - - +Audio is a much simpler problem to solve: if you care about quality, just +leave it as is. +Even AC3 5.1 streams are at most 448Kbit/s, and they are worth every bit. +You might be tempted to transcode the audio to high quality Vorbis, but +just because you do not have an A/V receiver for AC3 pass-through today +does not mean you will not have one tomorrow. Future-proof your DVD rips by +preserving the AC3 stream. +You can keep the AC3 stream either by copying it directly into the video +stream during the encoding. +You can also extract the AC3 stream in order to mux it into containers such +as NUT or Matroska. + +mplayer source_file.vob -aid 129 -dumpaudio -dumpfile sound.ac3 + +will dump into the file sound.ac3 the +audio track number 129 from the file +source_file.vob (NB: DVD VOB files +usually use a different audio numbering, +which means that the VOB audio track 129 is the 2nd audio track of the file). + + + +But sometimes you truly have no choice but to further compress the +sound so that more bits can be spent on the video. +Most people choose to compress audio with either MP3 or Vorbis audio codecs. +While the latter is a very space-efficient codec, MP3 is better supported +by hardware players, although this trend is changing. + + + +Do not use when encoding +a file with audio, even if you will be encoding and muxing audio +separately later. +Though it may work in ideal cases, using is +likely to hide some problems in your encoding command line setting. +In other words, having a soundtrack during your encode assures you that, +provided you do not see messages such as +Too many audio packets in the buffer, you will be able +to get proper sync. + + + +You need to have MEncoder process the sound. +You can for example copy the orignal soundtrack during the encode with + or convert it to a "light" 4 kHz mono WAV +PCM with . +Otherwise, in some cases, it will generate a video file that will not sync +with the audio. +Such cases are when the number of video frames in the source file does +not match up to the total length of audio frames or whenever there +are discontinuities/splices where there are missing or extra audio frames. +The correct way to handle this kind of problem is to insert silence or +cut audio at these points. +However MPlayer cannot do that, so if you +demux the AC3 audio and encode it with a separate app (or dump it to PCM with +MPlayer), the splices will be left incorrect +and the only way to correct them is to drop/dup video frames at the +splice. +As long as MEncoder sees the audio when it is +encoding the video, it can do this dropping/duping (which is usually OK +since it takes place at full black/scenechange), but if +MEncoder cannot see the audio, it will just +process all frames as-is and they will not fit the final audio stream when +you for example merge your audio and video track into a Matroska file. + + + +First of all, you will have to convert the DVD sound into a WAV file that the +audio codec can use as input. +For example: + +mplayer source_file.vob -ao pcm:file=destination_sound.wav \ + -vc dummy -aid 1 -vo null + +will dump the second audio track from the file +source_file.vob into the file +destination_sound.wav. +You may want to normalize the sound before encoding, as DVD audio tracks +are commonly recorded at low volumes. +You can use the tool normalize for instance, +which is available in most distributions. +If you are using Windows, a tool such as BeSweet +can do the same job. +You will compress in either Vorbis or MP3. +For example: +oggenc -q1 destination_sound.wav +will encode destination_sound.wav with +the encoding quality 1, which is roughly equivalent to 80Kb/s, and +is the minimum quality at which you should encode if you care about +quality. +Please note that MEncoder currently cannot +mux Vorbis audio tracks +into the output file because it only supports AVI and MPEG +containers as an output, each of which may lead to audio/video +playback synchronization problems with some players when the AVI file +contain VBR audio streams such as Vorbis. +Do not worry, this document will show you how you can do that with third +party programs. + + Muxing - - Now that you have encoded your video, you will most likely want - to mux it with one or more audio tracks into a movie container, such - as AVI, MPEG, Matroska or NUT. - MEncoder is currently only able to natively output - audio and video into MPEG and AVI container formats. - for example: - mencoder -oac copy -ovc copy -o output_movie.avi -audiofile input_audio.mp2 input_video.avi - This would merge the video file input_video.avi - and the audio file input_audio.mp2 - into the AVI file output_movie.avi. - This command works with MPEG-1 layer I, II and III (more commonly known - as MP3) audio, WAV and a few other audio formats too. - - - - MEncoder features experimental support for - libavformat, which is a - library from the FFmpeg project that supports muxing and demuxing - a variety of containers. - For example: - mencoder -oac copy -ovc copy -o output_movie.asf -audiofile input_audio.mp2 input_video.avi -of lavf -lavfopts format=asf - This will do the same thing as the previous example, except that - the output container will be ASF. - Please note that this support is highly experimental (but getting - better every day), and will only work if you compiled - MPlayer with the support for - libavformat enabled (which - means that a pre-packaged binary version will not work in most cases). + + +Now that you have encoded your video, you will most likely want +to mux it with one or more audio tracks into a movie container, such +as AVI, MPEG, Matroska or NUT. +MEncoder is currently only able to natively output +audio and video into MPEG and AVI container formats. +for example: + +mencoder -oac copy -ovc copy -o output_movie.avi \ + -audiofile input_audio.mp2 input_video.avi + +This would merge the video file input_video.avi +and the audio file input_audio.mp2 +into the AVI file output_movie.avi. +This command works with MPEG-1 layer I, II and III (more commonly known +as MP3) audio, WAV and a few other audio formats too. + + + +MEncoder features experimental support for +libavformat, which is a +library from the FFmpeg project that supports muxing and demuxing +a variety of containers. +For example: + +mencoder -oac copy -ovc copy -o output_movie.asf -audiofile input_audio.mp2 \ + input_video.avi -of lavf -lavfopts format=asf + +This will do the same thing as the previous example, except that +the output container will be ASF. +Please note that this support is highly experimental (but getting +better every day), and will only work if you compiled +MPlayer with the support for +libavformat enabled (which +means that a pre-packaged binary version will not work in most cases). Improving muxing and A/V sync reliability - - You may experience some serious A/V sync problems while trying to mux - your video and some audio tracks, where no matter how you adjust the - audio delay, you will never get proper sync. - That may happen when you use some video filters that will drop or - duplicate some frames, like the inverse telecine filters. - It is strongly encouraged to append the video - filter at the end of the filter chain to avoid this kind of problem. - - - - Without , if MEncoder - wants to duplicate a frame, it relies on the muxer to put a mark on the - container so that the last frame will be displayed again to maintain - sync while writing no actual frame. - With , MEncoder - will instead just push the last frame displayed again into the filter - chain. - This means that the encoder receives the exact - same frame twice, and compresses it. - This will result in a slightly bigger file, but will not cause problems - when demuxing or remuxing into other container formats. - - - - You may also have no choice but to use with - container formats that are not too tightly linked with - MEncoder such as the ones supported through - libavformat, which may not - support frame duplication at the container level. + + +You may experience some serious A/V sync problems while trying to mux +your video and some audio tracks, where no matter how you adjust the +audio delay, you will never get proper sync. +That may happen when you use some video filters that will drop or +duplicate some frames, like the inverse telecine filters. +It is strongly encouraged to append the video +filter at the end of the filter chain to avoid this kind of problem. + + + +Without , if MEncoder +wants to duplicate a frame, it relies on the muxer to put a mark on the +container so that the last frame will be displayed again to maintain +sync while writing no actual frame. +With , MEncoder +will instead just push the last frame displayed again into the filter +chain. +This means that the encoder receives the exact +same frame twice, and compresses it. +This will result in a slightly bigger file, but will not cause problems +when demuxing or remuxing into other container formats. + + + +You may also have no choice but to use with +container formats that are not too tightly linked with +MEncoder such as the ones supported through +libavformat, which may not +support frame duplication at the container level. Limitations of the AVI container - - Although it is the most widely-supported container format after MPEG-1, - AVI also has some major drawbacks. - Perhaps the most obvious is the overhead. - For each chunk of the AVI file, 24 bytes are wasted on headers and - index. - This translates into a little over 5 MB per hour, or 1-2.5% - overhead for a 700 MB movie. This may not seem like much, but it could - mean the difference between being able to use 700 kbit/sec video or - 714 kbit/sec, and every bit of quality counts. - - - - In addition this gross inefficiency, AVI also has the following major - limitations: + + +Although it is the most widely-supported container format after MPEG-1, +AVI also has some major drawbacks. +Perhaps the most obvious is the overhead. +For each chunk of the AVI file, 24 bytes are wasted on headers and index. +This translates into a little over 5 MB per hour, or 1-2.5% +overhead for a 700 MB movie. This may not seem like much, but it could +mean the difference between being able to use 700 kbit/sec video or +714 kbit/sec, and every bit of quality counts. + + + +In addition this gross inefficiency, AVI also has the following major +limitations: - - + Only fixed-fps content can be stored. This is particularly limiting if the original material you want to encode is mixed content, for example a mix of NTSC video and film material. Actually there are hacks that can be used to store mixed-framerate content in AVI, but they increase the (already huge) overhead fivefold or more and so are not practical. - - - - + + Audio in AVI files must be either constant-bitrate (CBR) or constant-framesize (i.e. all frames decode to the same number of samples). @@ -1682,164 +1732,168 @@ either of these requirements. Therefore, if you plan to store your movie in AVI, you will have to use a less efficient codec such as MP3 or AC3. - - + - Having said all that, MEncoder does not - currently support variable-fps output or Vorbis encoding. - Therefore, you may not see these as limitations if - MEncoder is the - only tool you will be using to produce your encodes. - However, it is possible to use MEncoder - only for video encoding, and then use external tools to encode - audio and mux it into another container format. +Having said all that, MEncoder does not +currently support variable-fps output or Vorbis encoding. +Therefore, you may not see these as limitations if +MEncoder is the +only tool you will be using to produce your encodes. +However, it is possible to use MEncoder +only for video encoding, and then use external tools to encode +audio and mux it into another container format. + Muxing into the Matroska container - - Matroska is a free, open standard container format, aiming - to offer a lot of advanced features, which older containers - like AVI cannot handle. - For example, Matroska supports variable bitrate audio content - (VBR), variable framerates (VFR), chapters, file attachments, - error detection code (EDC) and modern A/V Codecs like "Advanced Audio - Coding" (AAC), "Vorbis" or "MPEG-4 AVC" (H.264), next to nothing - handled by AVI. - - - - The tools required to create Matroska files are collectively called - mkvtoolnix, and are available for most - Unix platforms as well as Windows. - Because Matroska is an open standard you may find other - tools that suit you better, but since mkvtoolnix is the most - common, and is supported by the Matroska team itself, we will - only cover its usage. - - - - Probably the easiest way to get started with Matroska is to use - MMG, the graphical frontend shipped with - mkvtoolnix, and follow the - guide to mkvmerge GUI (mmg) - - - - You may also mux audio and video files using the command line: - mkvmerge -o output.mkv input_video.avi input_audio1.mp3 input_audio2.ac3 - This would merge the video file input_video.avi - and the two audio files input_audio1.mp3 - and input_audio2.ac3 into the Matroska - file output.mkv. - Matroska, as mentioned earlier, is able to do much more than that, like - multiple audio tracks (including fine-tuning of audio/video - synchronization), chapters, subtitles, splitting, etc... - Please refer to the documentation of those applications for - more details. - - + + +Matroska is a free, open standard container format, aiming +to offer a lot of advanced features, which older containers +like AVI cannot handle. +For example, Matroska supports variable bitrate audio content +(VBR), variable framerates (VFR), chapters, file attachments, +error detection code (EDC) and modern A/V Codecs like "Advanced Audio +Coding" (AAC), "Vorbis" or "MPEG-4 AVC" (H.264), next to nothing +handled by AVI. + + + +The tools required to create Matroska files are collectively called +mkvtoolnix, and are available for most +Unix platforms as well as Windows. +Because Matroska is an open standard you may find other +tools that suit you better, but since mkvtoolnix is the most +common, and is supported by the Matroska team itself, we will +only cover its usage. + + + +Probably the easiest way to get started with Matroska is to use +MMG, the graphical frontend shipped with +mkvtoolnix, and follow the +guide to mkvmerge GUI (mmg) + + + +You may also mux audio and video files using the command line: + +mkvmerge -o output.mkv input_video.avi input_audio1.mp3 input_audio2.ac3 + +This would merge the video file input_video.avi +and the two audio files input_audio1.mp3 +and input_audio2.ac3 into the Matroska +file output.mkv. +Matroska, as mentioned earlier, is able to do much more than that, like +multiple audio tracks (including fine-tuning of audio/video +synchronization), chapters, subtitles, splitting, etc... +Please refer to the documentation of those applications for +more details. + - - + + + + How to deal with telecine and interlacing within NTSC DVDs Introduction + What is telecine? - If you do not understand much of what is written in this document, - read the - Wikipedia entry on telecine. - It is an understandable and reasonably comprehensive - description of what telecine is. +If you do not understand much of what is written in this document, read the +Wikipedia entry on telecine. +It is an understandable and reasonably comprehensive +description of what telecine is. A note about the numbers. - Many documents, including the guide linked above, refer to the fields - per second value of NTSC video as 59.94 and the corresponding frames - per second values as 29.97 (for telecined and interlaced) and 23.976 - (for progressive). For simplicity, some documents even round these - numbers to 60, 30, and 24. +Many documents, including the guide linked above, refer to the fields +per second value of NTSC video as 59.94 and the corresponding frames +per second values as 29.97 (for telecined and interlaced) and 23.976 +(for progressive). For simplicity, some documents even round these +numbers to 60, 30, and 24. - Strictly speaking, all those numbers are approximations. Black and - white NTSC video was exactly 60 fields per second, but 60000/1001 - was later chosen to accomodate color data while remaining compatible - with contemporary black and white televisions. Digital NTSC video - (such as on a DVD) is also 60000/1001 fields per second. From this, - interlaced and telecined video are derived to be 30000/1001 frames - per second; progressive video is 24000/1001 frames per second. - - - - Older versions of the MEncoder documentation - and many archived mailing list posts refer to 59.94, 29.97, and 23.976. - All MEncoder documentation has been updated - to use the fractional values, and you should use them too. - - - - is incorrect. - should be used instead. +Strictly speaking, all those numbers are approximations. Black and +white NTSC video was exactly 60 fields per second, but 60000/1001 +was later chosen to accomodate color data while remaining compatible +with contemporary black and white televisions. Digital NTSC video +(such as on a DVD) is also 60000/1001 fields per second. From this, +interlaced and telecined video are derived to be 30000/1001 frames +per second; progressive video is 24000/1001 frames per second. + + + +Older versions of the MEncoder documentation +and many archived mailing list posts refer to 59.94, 29.97, and 23.976. +All MEncoder documentation has been updated +to use the fractional values, and you should use them too. + + + + is incorrect. + should be used instead. How telecine is used. - All video intended to be displayed on an NTSC - television set must be 60000/1001 fields per second. Made-for-TV movies -4 and shows are often filmed directly at 60000/1001 fields per second, but - the majority of cinema is filmed at 24 or 24000/1001 frames per - second. When cinematic movie DVDs are mastered, the video is then - converted for television using a process called telecine. +All video intended to be displayed on an NTSC +television set must be 60000/1001 fields per second. Made-for-TV movies +and shows are often filmed directly at 60000/1001 fields per second, but +the majority of cinema is filmed at 24 or 24000/1001 frames per +second. When cinematic movie DVDs are mastered, the video is then +converted for television using a process called telecine. - On a DVD, the video is never actually stored as 60000/1001 fields per - second. For video that was originally 60000/1001, each pair of fields is - combined to form a frame, resulting in 30000/1001 frames per - second. Hardware DVD players then read a flag embedded in the video - stream to determine whether the odd- or even-numbered lines should - form the first field. - - - - Usually, 24000/1001 frames per second content stays as it is when - encoded for a DVD, and the DVD player must perform telecining - on-the-fly. Sometimes, however, the video is telecined - before being stored on the DVD; even though it - was originally 24000/1001 frames per second, it becomes 60000/1001 fields per - second. When it is stored on the DVD, pairs of fields are combined to form - 30000/1001 frames per second. - - - - When looking at individual frames formed from 60000/1001 fields per - second video, telecined or otherwise, interlacing is clearly visible - wherever there is any motion, because one field (say, the - even-numbered lines) represents a moment in time 1/(60000/1001) - seconds later than the other. Playing interlaced video on a computer - looks ugly both because the monitor is higher resolution and because - the video is shown frame-after-frame instead of field-after-field. +On a DVD, the video is never actually stored as 60000/1001 fields per +second. For video that was originally 60000/1001, each pair of fields is +combined to form a frame, resulting in 30000/1001 frames per +second. Hardware DVD players then read a flag embedded in the video +stream to determine whether the odd- or even-numbered lines should +form the first field. + + + +Usually, 24000/1001 frames per second content stays as it is when +encoded for a DVD, and the DVD player must perform telecining +on-the-fly. Sometimes, however, the video is telecined +before being stored on the DVD; even though it +was originally 24000/1001 frames per second, it becomes 60000/1001 fields per +second. When it is stored on the DVD, pairs of fields are combined to form +30000/1001 frames per second. + + + +When looking at individual frames formed from 60000/1001 fields per +second video, telecined or otherwise, interlacing is clearly visible +wherever there is any motion, because one field (say, the +even-numbered lines) represents a moment in time 1/(60000/1001) +seconds later than the other. Playing interlaced video on a computer +looks ugly both because the monitor is higher resolution and because +the video is shown frame-after-frame instead of field-after-field. Notes: This section only applies to NTSC DVDs, and not PAL. - + The example MEncoder lines throughout the document are not intended for @@ -1847,235 +1901,245 @@ pertaining video category. How to make good DVD rips or fine-tune libavcodec for maximal quality is not within the scope of this document. - + There are a couple footnotes specific to this guide, linked like this: [1] - + + + How to tell what type of video you have Progressive - - Progressive video was originally filmed at 24000/1001 fps, and stored - on the DVD without alteration. - - - - When you play a progressive DVD in MPlayer, - MPlayer will print the following line as - soon as the movie begins to play: - - demux_mpg: 24000/1001 fps progressive NTSC content detected, switching framerate. - - From this point forward, demux_mpg should never say it finds - "30000/1001 fps NTSC content." - - - - When you watch progressive video, you should never see any - interlacing. Beware, however, because sometimes there is a tiny bit - of telecine mixed in where you would not expect. I have encountered TV - show DVDs that have one second of telecine at every scene change, or - at seemingly random places. I once watched a DVD that had a - progressive first half, and the second half was telecined. If you - want to be really thorough, you can scan the - entire movie: - - mplayer dvd://1 -nosound -vo null -benchmark - - Using makes - MPlayer play the movie as quickly as it - possibly can; still, depending on your hardware, it can take a - while. Every time demux_mpg reports a framerate change, the line - immediately above will show you the time at which the change - occurred. - - - - Sometimes progressive video on DVDs is referred to as - "soft-telecine" because it is intended to - be telecined by the DVD player. + + +Progressive video was originally filmed at 24000/1001 fps, and stored +on the DVD without alteration. + + + +When you play a progressive DVD in MPlayer, +MPlayer will print the following line as +soon as the movie begins to play: + +demux_mpg: 24000/1001 fps progressive NTSC content detected, switching framerate. + +From this point forward, demux_mpg should never say it finds +"30000/1001 fps NTSC content." + + + +When you watch progressive video, you should never see any +interlacing. Beware, however, because sometimes there is a tiny bit +of telecine mixed in where you would not expect. I have encountered TV +show DVDs that have one second of telecine at every scene change, or +at seemingly random places. I once watched a DVD that had a +progressive first half, and the second half was telecined. If you +want to be really thorough, you can scan the +entire movie: +mplayer dvd://1 -nosound -vo null -benchmark +Using makes +MPlayer play the movie as quickly as it +possibly can; still, depending on your hardware, it can take a +while. Every time demux_mpg reports a framerate change, the line +immediately above will show you the time at which the change +occurred. + + + +Sometimes progressive video on DVDs is referred to as +"soft-telecine" because it is intended to +be telecined by the DVD player. + Telecined - - Telecined video was originally filmed at 24000/1001, but was telecined - before it was written to the DVD. - - - - MPlayer does not (ever) report any - framerate changes when it plays telecined video. - - - - Watching a telecined video, you will see interlacing artifacts that - seem to "blink": they repeatedly appear and disappear. - You can look closely at this by - - - mplayer dvd://1 - - - Seek to a part with motion. - - - Use the . key to step forward one frame at a time. - - - Look at the pattern of interlaced-looking and progressive-looking - frames. If the pattern you see is PPPII,PPPII,PPPII,... then the - video is telecined. If you see some other pattern, then the video - may have been telecined using some non-standard method; - MEncoder cannot losslessly convert - non-standard telecine to progressive. If you do not see any - pattern at all, then it is most likely interlaced. - - - - - - Sometimes telecined video on DVDs is referred to as - "hard-telecine". Since hard-telecine is already 60000/1001 fields - per second, the DVD player plays the video without any manipulation. - - - - Another way to tell if your source is telecined or not is to play - the source with the and - command line options to see how matches frames. - If the source is telecined, you should see on the console a 3:2 pattern - with 0+.1.+2 and 0++1 - alternating. - This technique has the advantage that you do not need to watch the - source to identify it, which could be useful if you wish to automate - the encoding procedure, or to carry out said procedure remotely via - a slow connection. - - + + +Telecined video was originally filmed at 24000/1001, but was telecined +before it was written to the DVD. + + + +MPlayer does not (ever) report any +framerate changes when it plays telecined video. + + + +Watching a telecined video, you will see interlacing artifacts that +seem to "blink": they repeatedly appear and disappear. +You can look closely at this by + +mplayer dvd://1 + + Seek to a part with motion. + + + Use the . key to step forward one frame at a time. + + + Look at the pattern of interlaced-looking and progressive-looking + frames. If the pattern you see is PPPII,PPPII,PPPII,... then the + video is telecined. If you see some other pattern, then the video + may have been telecined using some non-standard method; + MEncoder cannot losslessly convert + non-standard telecine to progressive. If you do not see any + pattern at all, then it is most likely interlaced. + + + + + +Sometimes telecined video on DVDs is referred to as +"hard-telecine". Since hard-telecine is already 60000/1001 fields +per second, the DVD player plays the video without any manipulation. + + + +Another way to tell if your source is telecined or not is to play +the source with the and +command line options to see how matches frames. +If the source is telecined, you should see on the console a 3:2 pattern +with 0+.1.+2 and 0++1 +alternating. +This technique has the advantage that you do not need to watch the +source to identify it, which could be useful if you wish to automate +the encoding procedure, or to carry out said procedure remotely via +a slow connection. + + Interlaced - - Interlaced video was originally filmed at 60000/1001 fields per second, - and stored on the DVD as 30000/1001 frames per second. The interlacing effect - (often called "combing") is a result of combining pairs of - fields into frames. Each field is supposed to be 1/(60000/1001) seconds apart, - and when they are displayed simultaneously the difference is apparent. - - - - As with telecined video, MPlayer should - not ever report any framerate changes when playing interlaced content. - - - - When you view an interlaced video closely by frame-stepping with the - . key, you will see that every single frame is interlaced. + + +Interlaced video was originally filmed at 60000/1001 fields per second, +and stored on the DVD as 30000/1001 frames per second. The interlacing effect +(often called "combing") is a result of combining pairs of +fields into frames. Each field is supposed to be 1/(60000/1001) seconds apart, +and when they are displayed simultaneously the difference is apparent. + + + +As with telecined video, MPlayer should +not ever report any framerate changes when playing interlaced content. + + + +When you view an interlaced video closely by frame-stepping with the +. key, you will see that every single frame is interlaced. + Mixed progressive and telecine - - All of a "mixed progressive and telecine" video was originally - 24000/1001 frames per second, but some parts of it ended up being telecined. - - - - When MPlayer plays this category, it will - (often repeatedly) switch back and forth between "30000/1001 fps NTSC" - and "24000/1001 fps progressive NTSC". Watch the bottom of - MPlayer's output to see these messages. - - - - You should check the "30000/1001 fps NTSC" sections to make sure - they are actually telecine, and not just interlaced. + + +All of a "mixed progressive and telecine" video was originally +24000/1001 frames per second, but some parts of it ended up being telecined. + + + +When MPlayer plays this category, it will +(often repeatedly) switch back and forth between "30000/1001 fps NTSC" +and "24000/1001 fps progressive NTSC". Watch the bottom of +MPlayer's output to see these messages. + + + +You should check the "30000/1001 fps NTSC" sections to make sure +they are actually telecine, and not just interlaced. + Mixed progressive and interlaced - - In "mixed progressive and interlaced" content, progressive - and interlaced video have been spliced together. - - - - This category looks just like "mixed progressive and telecine", - until you examine the 30000/1001 fps sections and see that they do not have the - telecine pattern. + + +In "mixed progressive and interlaced" content, progressive +and interlaced video have been spliced together. + + + +This category looks just like "mixed progressive and telecine", +until you examine the 30000/1001 fps sections and see that they do not have the +telecine pattern. - + + How to encode each category - As I mentioned in the beginning, example MEncoder - lines below are not meant to actually be used; - they only demonstrate the minimum parameters to properly encode each category. - +As I mentioned in the beginning, example MEncoder +lines below are not meant to actually be used; +they only demonstrate the minimum parameters to properly encode each category. + + Progressive - Progressive video requires no special filtering to encode. The only - parameter you need to be sure to use is - . Otherwise, MEncoder - will try to encode at 30000/1001 fps and will duplicate frames. - - - - mencoder dvd://1 -oac copy -ovc lavc -ofps 24000/1001 - - - - It is often the case, however, that a video that looks progressive - actually has very short parts of telecine mixed in. Unless you are - sure, it is safest to treat the video as - mixed progressive and telecine. - The performance loss is small - [3]. +Progressive video requires no special filtering to encode. The only +parameter you need to be sure to use is . +Otherwise, MEncoder +will try to encode at 30000/1001 fps and will duplicate frames. + + + +mencoder dvd://1 -oac copy -ovc lavc -ofps 24000/1001 + + + +It is often the case, however, that a video that looks progressive +actually has very short parts of telecine mixed in. Unless you are +sure, it is safest to treat the video as +mixed progressive and telecine. +The performance loss is small +[3]. + Telecined - - Telecine can be reversed to retrieve the original 24000/1001 content, - using a process called inverse-telecine. - MPlayer contains several filters to - accomplish this; the best filter, , is described - in the mixed - progressive and telecine section. + + +Telecine can be reversed to retrieve the original 24000/1001 content, +using a process called inverse-telecine. +MPlayer contains several filters to +accomplish this; the best filter, , is described +in the mixed +progressive and telecine section. + Interlaced - - For most practical cases it is not possible to retrieve a complete - progressive video from interlaced content. The only way to do so - without losing half of the vertical resolution is to double the - framerate and try to "guess" what ought to make up the - corresponding lines for each field (this has drawbacks - see method - 3). + + +For most practical cases it is not possible to retrieve a complete +progressive video from interlaced content. The only way to do so +without losing half of the vertical resolution is to double the +framerate and try to "guess" what ought to make up the +corresponding lines for each field (this has drawbacks - see method 3). - Encode the video in interlaced form. Normally, interlacing wreaks havoc with the encoder's ability to compress well, but libavcodec has two @@ -2085,9 +2149,8 @@ [2] because it will encode macroblocks as non-interlaced in places where there is no motion. Note that is NOT needed here. - mencoder dvd://1 -oac copy -ovc lavc -lavcopts ildct:ilme:mbd=2 - + Use a deinterlacing filter before encoding. There are several of these filters available to choose from, each with its own advantages @@ -2103,9 +2166,8 @@ . Also, deinterlacing should be done after cropping [1] and before scaling. - mencoder dvd://1 -oac copy -vf yadif -ovc lavc - + Unfortunately, this option is buggy with MEncoder; it ought to work well with @@ -2128,9 +2190,11 @@ have to specify both and to be twice the framerate of your original source. - - mencoder dvd://1 -oac copy -vf tfields=2 -ovc lavc -fps 60000/1001 -ofps 60000/1001 - + +mencoder dvd://1 -oac copy -vf tfields=2 -ovc lavc \ + -fps 60000/1001 -ofps 60000/1001 + If you plan on downscaling dramatically, you can extract and encode only one of the two fields. Of course, you will lose half the vertical @@ -2142,23 +2206,25 @@ appropriately. Remember that you will have to adjust the scale to compensate for the vertical resolution being halved. mencoder dvd://1 -oac copy -vf field=0 -ovc lavc - + + Mixed progressive and telecine - - In order to turn mixed progressive and telecine video into entirely - progressive video, the telecined parts have to be - inverse-telecined. There are three ways to accomplish this, - described below. Note that you should - always inverse-telecine before any - rescaling; unless you really know what you are doing, - inverse-telecine before cropping, too - [1]. - is needed here because the output video - will be 24000/1001 frames per second. + + +In order to turn mixed progressive and telecine video into entirely +progressive video, the telecined parts have to be +inverse-telecined. There are three ways to accomplish this, +described below. Note that you should +always inverse-telecine before any +rescaling; unless you really know what you are doing, +inverse-telecine before cropping, too +[1]. + is needed here because the output video +will be 24000/1001 frames per second. @@ -2171,13 +2237,12 @@ is, however, the cleanest and most accurate method available for encoding both telecine and "mixed progressive and telecine". - - mencoder dvd://1 -oac copy -vf pullup,softskip -ovc lavc -ofps 24000/1001 - - - - - + +mencoder dvd://1 -oac copy -vf pullup,softskip + -ovc lavc -ofps 24000/1001 + + An older method is to, rather than inverse-telecine the telecined parts, telecine the non-telecined parts and then inverse-telecine the whole @@ -2186,35 +2251,39 @@ softpulldown with either or , the final result will be entirely progressive. is needed. - - mencoder dvd://1 -oac copy -vf softpulldown,ivtc=1 -ovc lavc -ofps 24000/1001 - - + +mencoder dvd://1 -oac copy -vf softpulldown,ivtc=1 -ovc lavc -ofps 24000/1001 + + I have not used myself, but here is what D Richard Felker III has to say:
It is OK, but IMO it tries to deinterlace rather - than doing inverse telecine too often (much like settop DVD - players & progressive TVs) which gives ugly flickering and - other artifacts. If you are going to use it, you at least need to - spend some time tuning the options and watching the output first - to make sure it is not messing up.
-
+ than doing inverse telecine too often (much like settop DVD + players & progressive TVs) which gives ugly flickering and + other artifacts. If you are going to use it, you at least need to + spend some time tuning the options and watching the output first + to make sure it is not messing up. + +
+ Mixed progressive and interlaced - - There are two options for dealing with this category, each of - which is a compromise. You should decide based on the - duration/location of each type. + + +There are two options for dealing with this category, each of +which is a compromise. You should decide based on the +duration/location of each type. - + + Treat it as progressive. The interlaced parts will look interlaced, and some of the interlaced fields will have to be dropped, resulting in a bit of uneven jumpiness. You can use a postprocessing filter if @@ -2251,23 +2320,25 @@ only half progressive, you probably want to encode it as if it is all interlaced. - + Treat it as interlaced. Some frames of the progressive parts will need to be duplicated, resulting in uneven jumpiness. Again, deinterlacing filters may slightly degrade the progressive parts. - - + -
+ + Footnotes + - + + About cropping: Video data on DVDs are stored in a format called YUV 4:2:0. In YUV @@ -2311,7 +2382,7 @@ vertically by multiples of four unless you use before cropping. - + About encoding parameters and quality: @@ -2327,8 +2398,7 @@ encoding quality (and decrease encoding speed) but that is beyond the scope of this document. - - + About the performance of pullup: @@ -2342,16 +2412,15 @@ overshadows that difference, bringing the performance decrease of using down to 2%. - - - + - -
+ + + Encoding with the <systemitem class="library">libavcodec</systemitem> codec family @@ -2362,99 +2431,130 @@ You can encode to the following codecs (more or less up to date): + + -<systemitem class="library">libavcodec</systemitem>'s video codecs +<systemitem class="library">libavcodec</systemitem>'s + video codecs -Video codec nameDescription + Video codec nameDescription -mjpeg - Motion JPEG - -ljpeg - lossless JPEG - -h261 - H.261 - -h263 - H.263 - -h263p - H.263+ - -mpeg4 - ISO standard MPEG-4 (DivX, Xvid compatible) - -msmpeg4 - pre-standard MPEG-4 variant by MS, v3 (AKA DivX3) - -msmpeg4v2 - pre-standard MPEG-4 by MS, v2 (used in old ASF files) - -wmv1 - Windows Media Video, version 1 (AKA WMV7) - -wmv2 - Windows Media Video, version 2 (AKA WMV8) - -rv10 - RealVideo 1.0 - -rv20 - RealVideo 2.0 - -mpeg1video - MPEG-1 video - -mpeg2video - MPEG-2 video - -huffyuv - lossless compression - -asv1 - ASUS Video v1 - -asv2 - ASUS Video v2 - -ffv1 - FFmpeg's lossless video codec - -svq1 - Sorenson video 1 - -flv - Sorenson H.263 used in Flash Video - -dvvideo - Sony Digital Video - -snow - FFmpeg's experimental wavelet-based codec - + + mjpeg + Motion JPEG + + + ljpeg + lossless JPEG + + + h261 + H.261 + + + h263 + H.263 + + + h263p + H.263+ + + + mpeg4 + ISO standard MPEG-4 (DivX, Xvid compatible) + + + msmpeg4 + pre-standard MPEG-4 variant by MS, v3 (AKA DivX3) + + + msmpeg4v2 + pre-standard MPEG-4 by MS, v2 (used in old ASF files) + + + wmv1 + Windows Media Video, version 1 (AKA WMV7) + + + wmv2 + Windows Media Video, version 2 (AKA WMV8) + + + rv10 + RealVideo 1.0 + + + rv20 + RealVideo 2.0 + + + mpeg1video + MPEG-1 video + + + mpeg2video + MPEG-2 video + + + huffyuv + lossless compression + + + asv1 + ASUS Video v1 + + + asv2 + ASUS Video v2 + + + ffv1 + FFmpeg's lossless video codec + + + svq1 + Sorenson video 1 + + + flv + Sorenson H.263 used in Flash Video + + + dvvideo + Sony Digital Video + + + snow + FFmpeg's experimental wavelet-based codec + The first column contains the codec names that should be passed after the -vcodec config, like: - - - +vcodec config, +like: + + + An example with MJPEG compression: -mencoder dvd://2 -o title2.avi -ovc lavc -lavcopts vcodec=mjpeg -oac copy - - + +mencoder dvd://2 -o title2.avi -ovc lavc -lavcopts vcodec=mjpeg -oac copy + + + + -<systemitem class="library">libavcodec</systemitem>'s audio codecs +<systemitem class="library">libavcodec</systemitem>'s + audio codecs + @@ -2462,22 +2562,22 @@ Audio codec nameDescription - - mp2 - MPEG Layer 2 - - - ac3 - AC3, AKA Dolby Digital - - - adpcm_ima_wav - IMA adaptive PCM (4 bits per sample, 4:1 compression) - - - sonic - experimental lossy/lossless codec - + + mp2 + MPEG Layer 2 + + + ac3 + AC3, AKA Dolby Digital + + + adpcm_ima_wav + IMA adaptive PCM (4 bits per sample, 4:1 compression) + + + sonic + experimental lossy/lossless codec + @@ -2486,43 +2586,43 @@ acodec option, like: - - + An example with AC3 compression: -mencoder dvd://2 -o title2.avi -oac lavc -lavcopts acodec=ac3 -ovc copy - - - - - Contrary to libavcodec's video - codecs, its audio codecs do not make a wise usage of the bits they are - given as they lack some minimal psychoacoustic model (if at all) - which most other codec implementations feature. - However, note that all these audio codecs are very fast and work - out-of-the-box everywhere MEncoder has been - compiled with libavcodec (which - is the case most of time), and do not depend on external libraries. + +mencoder dvd://2 -o title2.avi -oac lavc -lavcopts acodec=ac3 -ovc copy + + + + +Contrary to libavcodec's video +codecs, its audio codecs do not make a wise usage of the bits they are +given as they lack some minimal psychoacoustic model (if at all) +which most other codec implementations feature. +However, note that all these audio codecs are very fast and work +out-of-the-box everywhere MEncoder has been +compiled with libavcodec (which +is the case most of time), and do not depend on external libraries. + Encoding options of libavcodec - Ideally, you would probably want to be able to just tell the encoder to switch - into "high quality" mode and move on. - That would probably be nice, but unfortunately hard to implement as different - encoding options yield different quality results depending on the source material. - That is because compression depends on the visual properties of the video - in question. - For example, anime and live action have very different properties and - thus require different options to obtain optimum encoding. - The good news is that some options should never be left out, like - , , and . - See below for a detailed description of common encoding options. - - +Ideally, you would probably want to be able to just tell the encoder to switch +into "high quality" mode and move on. +That would probably be nice, but unfortunately hard to implement as different +encoding options yield different quality results depending on the source +material. That is because compression depends on the visual properties of the +video in question. +For example, anime and live action have very different properties and +thus require different options to obtain optimum encoding. +The good news is that some options should never be left out, like +, , and . +See below for a detailed description of common encoding options. + Options to adjust: @@ -2535,26 +2635,22 @@ option, but you need to deactivate scene detection, which is not a good idea as it will hurt encode efficiency a bit. - vb_strategy=1: helps in high-motion scenes. On some videos, vmax_b_frames may hurt quality, but vmax_b_frames=2 along with vb_strategy=1 helps. - dia: motion search range. Bigger is better and slower. Negative values are a completely different scale. Good values are -1 for a fast encode, or 2-4 for slower. - predia: motion search pre-pass. Not as important as dia. Good values are 1 (default) to 4. Requires preme=2 to really be useful. - cmp, subcmp, precmp: Comparison function for motion estimation. @@ -2564,19 +2660,16 @@ For cmp and subcmp, 2 is good for anime, and 3 is good for live action. 6 may or may not be slightly better, but is slow. - last_pred: Number of motion predictors to take from the previous frame. 1-3 or so help at little speed cost. Higher values are slow for no extra gain. - - cbp, mv0: Controls the selection of macroblocks. - Small speed cost for small quality gain. + cbp, mv0: Controls the selection of + macroblocks. Small speed cost for small quality gain. - qprd: adaptive quantization based on the macroblock's complexity. @@ -2584,7 +2677,6 @@ This can cause artifacts unless you set vqmax to some reasonably small value (6 is good, maybe as low as 4); vqmin=1 should also help. - qns: very slow, especially when combined with qprd. @@ -2593,7 +2685,6 @@ Do not use this unless you have already tweaked everything else as far as it will go and the results still are not good enough. - vqcomp: Tweak ratecontrol. What values are good depends on the movie. @@ -2602,7 +2693,6 @@ them on high-complexity scenes (default: 0.5, range: 0-1. recommended range: 0.5-0.7). - vlelim, vcelim: Sets the single coefficient elimination threshold for luminance and chroma planes. @@ -2614,7 +2704,6 @@ seem to be good for live movies, but seem not to help with anime; when encoding animation, you should probably leave them unchanged. - qpel: Quarter pixel motion estimation. MPEG-4 uses half pixel precision for its motion search by default, @@ -2625,13 +2714,11 @@ qpel always incurs a significant cost in CPU decode time (+25% in practice). - psnr: does not affect the actual encoding, but writes a log file giving the type/size/quality of each frame, and prints a summary of PSNR (Peak Signal to Noise Ratio) at the end. - @@ -2639,7 +2726,6 @@ vme: The default is best. - lumi_mask, dark_mask: Psychovisual adaptive quantization. @@ -2647,7 +2733,6 @@ Reasonable values may be effective in your case, but be warned this is very subjective. - scplx_mask: Tries to prevent blocky artifacts, but postprocessing is better. @@ -2655,31 +2740,38 @@ + + Encoding setting examples - The following settings are examples of different encoding - option combinations that affect the speed vs quality tradeoff - at the same target bitrate. - - - - All the encoding settings were tested on a 720x448 @30000/1001 fps - video sample, the target bitrate was 900kbps, and the machine was an - AMD-64 3400+ at 2400 MHz in 64 bits mode. - Each encoding setting features the measured encoding speed (in - frames per second) and the PSNR loss (in dB) compared to the "very - high quality" setting. - Please understand that depending on your source, your machine type - and development advancements, you may get very different results. +The following settings are examples of different encoding +option combinations that affect the speed vs quality tradeoff +at the same target bitrate. + + + +All the encoding settings were tested on a 720x448 @30000/1001 fps +video sample, the target bitrate was 900kbps, and the machine was an +AMD-64 3400+ at 2400 MHz in 64 bits mode. +Each encoding setting features the measured encoding speed (in +frames per second) and the PSNR loss (in dB) compared to the "very +high quality" setting. +Please understand that depending on your source, your machine type +and development advancements, you may get very different results. -DescriptionEncoding optionsspeed (in fps)Relative PSNR loss (in dB) + + Description + Encoding options + speed (in fps) + Relative PSNR loss (in dB) + @@ -2712,7 +2804,10 @@ -Custom inter/intra matrices + + + +Custom inter/intra matrices With this feature of @@ -2761,202 +2856,204 @@ Usage: -$ mencoder input.avi -o output.avi -oac copy -ovc lavc -lavcopts inter_matrix=...:intra_matrix=... +mencoder input.avi -o output.avi -oac copy -ovc lavc \ + -lavcopts inter_matrix=...:intra_matrix=... -$ mencoder input.avi -ovc lavc -lavcopts -vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37, -12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27, -29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79 -:inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26, -28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34, +mencoder input.avi -ovc lavc -lavcopts \ +vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,\ +12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27,\ +29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79\ +:inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,\ +28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,\ 36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44 -oac copy -o svcd.mpg + Example - So, you have just bought your shiny new copy of Harry Potter and the Chamber - of Secrets (widescreen edition, of course), and you want to rip this DVD - so that you can add it to your Home Theatre PC. This is a region 1 DVD, - so it is NTSC. The example below will still apply to PAL, except you will - omit (because the output framerate is the - same as the input framerate), and of course the crop dimensions will be - different. - - - - After running , we follow the process - detailed in the section How to deal - with telecine and interlacing in NTSC DVDs and discover that it is - 24000/1001 fps progressive video, which means that we need not use an inverse - telecine filter, such as or - . - - - - Next, we want to determine the appropriate crop rectangle, so we use the - cropdetect filter: - - mplayer dvd://1 -vf cropdetect - - Make sure you seek to a fully filled frame (such as a bright scene), and - you will see in MPlayer's console output: - - crop area: X: 0..719 Y: 57..419 (-vf crop=720:362:0:58) - - We then play the movie back with this filter to test its correctness: - - mplayer dvd://1 -vf crop=720:362:0:58 - - And we see that it looks perfectly fine. Next, we ensure the width and - height are a multiple of 16. The width is fine, however the height is - not. Since we did not fail 7th grade math, we know that the nearest - multiple of 16 lower than 362 is 352. - - - - We could just use , but it would be nice - to take a little off the top and a little off the bottom so that we - retain the center. We have shrunk the height by 10 pixels, but we do not - want to increase the y-offset by 5-pixels since that is an odd number and - will adversely affect quality. Instead, we will increase the y-offset by - 4 pixels: - - mplayer dvd://1 -vf crop=720:352:0:62 - - Another reason to shave pixels from both the top and the bottom is that we - ensure we have eliminated any half-black pixels if they exist. Note that if - your video is telecined, make sure the filter (or - whichever inverse telecine filter you decide to use) appears in the filter - chain before you crop. If it is interlaced, deinterlace before cropping. - (If you choose to preserve the interlaced video, then make sure your - vertical crop offset is a multiple of 4.) - - - - If you are really concerned about losing those 10 pixels, you might - prefer instead to scale the dimensions down to the nearest multiple of 16. - The filter chain would look like: - - -vf crop=720:362:0:58,scale=720:352 - - Scaling the video down like this will mean that some small amount of - detail is lost, though it probably will not be perceptible. Scaling up will - result in lower quality (unless you increase the bitrate). Cropping - discards those pixels altogether. It is a tradeoff that you will want to - consider for each circumstance. For example, if the DVD video was made - for television, you might want to avoid vertical scaling, since the line - sampling corresponds to the way the content was originally recorded. - - - - On inspection, we see that our movie has a fair bit of action and high - amounts of detail, so we pick 2400Kbit for our bitrate. - - - - We are now ready to do the two pass encode. Pass one: - - mencoder dvd://1 -ofps 24000/1001 -oac copy -vf pullup,softskip,crop=720:352:0:62,hqdn3d=2:1:2 -ovc lavc \ --lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=1 \ --o Harry_Potter_2.avi - - And pass two is the same, except that we specify : - - mencoder dvd://1 -ofps 24000/1001 -oac copy -vf pullup,softskip,crop=720:352:0:62,hqdn3d=2:1:2 -ovc lavc \ --lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=2 \ --o Harry_Potter_2.avi - - - - The options will greatly increase the - quality at the expense of encoding time. There is little reason to leave - these options out when the primary goal is quality. The options - select a comparison function that - yields higher quality than the defaults. You might try experimenting with - this parameter (refer to the man page for the possible values) as - different functions can have a large impact on quality depending on the - source material. For example, if you find - libavcodec produces too much - blocky artifacting, you could try selecting the experimental NSSE as - comparison function via . - - - - For this movie, the resulting AVI will be 138 minutes long and nearly - 3GB. And because you said that file size does not matter, this is a - perfectly acceptable size. However, if you had wanted it smaller, you - could try a lower bitrate. Increasing bitrates have diminishing - returns, so while we might clearly see an improvement from 1800Kbit to - 2000Kbit, it might not be so noticeable above 2000Kbit. Feel - free to experiment until you are happy. - - - - Because we passed the source video through a denoise filter, you may want - to add some of it back during playback. This, along with the - post-processing filter, drastically improves the - perception of quality and helps eliminate blocky artifacts in the video. - With MPlayer's option, - you can vary the amount of post-processing done by the spp filter - depending on available CPU. Also, at this point, you may want to apply - gamma and/or color correction to best suit your display. For example: - - mplayer Harry_Potter_2.avi -vf spp,noise=9ah:5ah,eq2=1.2 -autoq 3 - +So, you have just bought your shiny new copy of Harry Potter and the Chamber +of Secrets (widescreen edition, of course), and you want to rip this DVD +so that you can add it to your Home Theatre PC. This is a region 1 DVD, +so it is NTSC. The example below will still apply to PAL, except you will +omit (because the output framerate is the +same as the input framerate), and of course the crop dimensions will be +different. + + + +After running , we follow the process +detailed in the section How to deal +with telecine and interlacing in NTSC DVDs and discover that it is +24000/1001 fps progressive video, which means that we need not use an inverse +telecine filter, such as or +. + + + +Next, we want to determine the appropriate crop rectangle, so we use the +cropdetect filter: +mplayer dvd://1 -vf cropdetect +Make sure you seek to a fully filled frame (such as a bright scene), and +you will see in MPlayer's console output: +crop area: X: 0..719 Y: 57..419 (-vf crop=720:362:0:58) +We then play the movie back with this filter to test its correctness: +mplayer dvd://1 -vf crop=720:362:0:58 +And we see that it looks perfectly fine. Next, we ensure the width and +height are a multiple of 16. The width is fine, however the height is +not. Since we did not fail 7th grade math, we know that the nearest +multiple of 16 lower than 362 is 352. + + + +We could just use , but it would be nice +to take a little off the top and a little off the bottom so that we +retain the center. We have shrunk the height by 10 pixels, but we do not +want to increase the y-offset by 5-pixels since that is an odd number and +will adversely affect quality. Instead, we will increase the y-offset by +4 pixels: +mplayer dvd://1 -vf crop=720:352:0:62 +Another reason to shave pixels from both the top and the bottom is that we +ensure we have eliminated any half-black pixels if they exist. Note that if +your video is telecined, make sure the filter (or +whichever inverse telecine filter you decide to use) appears in the filter +chain before you crop. If it is interlaced, deinterlace before cropping. +(If you choose to preserve the interlaced video, then make sure your +vertical crop offset is a multiple of 4.) + + + +If you are really concerned about losing those 10 pixels, you might +prefer instead to scale the dimensions down to the nearest multiple of 16. +The filter chain would look like: +-vf crop=720:362:0:58,scale=720:352 +Scaling the video down like this will mean that some small amount of +detail is lost, though it probably will not be perceptible. Scaling up will +result in lower quality (unless you increase the bitrate). Cropping +discards those pixels altogether. It is a tradeoff that you will want to +consider for each circumstance. For example, if the DVD video was made +for television, you might want to avoid vertical scaling, since the line +sampling corresponds to the way the content was originally recorded. + + + +On inspection, we see that our movie has a fair bit of action and high +amounts of detail, so we pick 2400Kbit for our bitrate. + + + +We are now ready to do the two pass encode. Pass one: + +mencoder dvd://1 -ofps 24000/1001 -oac copy -o Harry_Potter_2.avi -ovc lavc \ + -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=1 \ + -vf pullup,softskip,crop=720:352:0:62,hqdn3d=2:1:2 + +And pass two is the same, except that we specify : + +mencoder dvd://1 -ofps 24000/1001 -oac copy -o Harry_Potter_2.avi -ovc lavc \ + -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=2 \ + -vf pullup,softskip,crop=720:352:0:62,hqdn3d=2:1:2 + + + + +The options will greatly increase the +quality at the expense of encoding time. There is little reason to leave +these options out when the primary goal is quality. The options + select a comparison function that +yields higher quality than the defaults. You might try experimenting with +this parameter (refer to the man page for the possible values) as +different functions can have a large impact on quality depending on the +source material. For example, if you find +libavcodec produces too much +blocky artifacting, you could try selecting the experimental NSSE as +comparison function via . + + + +For this movie, the resulting AVI will be 138 minutes long and nearly +3GB. And because you said that file size does not matter, this is a +perfectly acceptable size. However, if you had wanted it smaller, you +could try a lower bitrate. Increasing bitrates have diminishing +returns, so while we might clearly see an improvement from 1800Kbit to +2000Kbit, it might not be so noticeable above 2000Kbit. Feel +free to experiment until you are happy. + + + +Because we passed the source video through a denoise filter, you may want +to add some of it back during playback. This, along with the + post-processing filter, drastically improves the +perception of quality and helps eliminate blocky artifacts in the video. +With MPlayer's option, +you can vary the amount of post-processing done by the spp filter +depending on available CPU. Also, at this point, you may want to apply +gamma and/or color correction to best suit your display. For example: + +mplayer Harry_Potter_2.avi -vf spp,noise=9ah:5ah,eq2=1.2 -autoq 3 + + + + Encoding with the <systemitem class="library">Xvid</systemitem> -codec - - Xvid is a free library for - encoding MPEG-4 ASP video streams. - Before starting to encode, you need to - set up MEncoder to support it. - - - This guide mainly aims at featuring the same kind of information - as x264's encoding guide. - Therefore, please begin by reading - the first part - of that guide. - - + codec + + +Xvid is a free library for +encoding MPEG-4 ASP video streams. +Before starting to encode, you need to +set up MEncoder to support it. + + + +This guide mainly aims at featuring the same kind of information +as x264's encoding guide. +Therefore, please begin by reading +the first part +of that guide. + + + What options should I use to get the best results? - Please begin by reviewing the - Xvid section of - MPlayer's man page. - This section is intended to be a supplement to the man page. - - - The Xvid default settings are already a good tradeoff between - speed and quality, therefore you can safely stick to them if - the following section puzzles you. +Please begin by reviewing the +Xvid section of +MPlayer's man page. +This section is intended to be a supplement to the man page. + + + +The Xvid default settings are already a good tradeoff between +speed and quality, therefore you can safely stick to them if +the following section puzzles you. + + Encoding options of <systemitem class="library">Xvid</systemitem> - vhq + vhq This setting affects the macroblock decision algorithm, where the higher the setting, the wiser the decision. The default setting may be safely used for every encode, while @@ -2967,16 +3064,14 @@ Turning it off will noticeably speed up encoding; if speed is critical for you, the tradeoff may be worth it. - - bvhq + bvhq This does the same job as vhq, but does it on B-frames. It has a negligible impact on speed, and slightly improves quality (around +0.1dB PSNR). - - max_bframes + max_bframes A higher number of consecutive allowed B-frames usually improves compressibility, although it may also lead to more blocking artifacts. The default setting is a good tradeoff between compressibility and @@ -2986,9 +3081,8 @@ target bitrate is high enough to ensure that the encoder does not have to increase quantizers to reach it. - - bf_threshold + bf_threshold This controls the B-frame sensitivity of the encoder, where a higher value leads to more B-frames being used (and vice versa). This setting is to be used together with ; @@ -3007,9 +3101,8 @@ consecutive B-frame), this would be your only way to increase compressibility through using B-frames. - - trellis + trellis Optimizes the quantization process to get an optimal tradeoff between PSNR and bitrate, which allows significant bit saving. These bits will in return be spent elsewhere on the video, @@ -3019,7 +3112,6 @@ have turned down and all other more CPU-hungry options to the minimum. - hq_ac Activates a better coefficient cost estimation method, which slightly @@ -3027,32 +3119,31 @@ than 0.01dB PSNR increase), while having a negligible impact on speed. It is therefore recommended to always leave it on. - cartoon Designed to better encode cartoon content, and has no impact on speed as it just tunes the mode decision heuristics for this type of content. - - - me_quality + + + me_quality This setting is to control the precision of the motion estimation. The higher , the more precise the estimation of the original motion will be, and the better the resulting clip will capture the original motion. - - + + The default setting is best in all cases; thus it is not recommended to turn it down unless you are really looking for speed, as all the bits saved by a good motion estimation would be spent elsewhere, raising overall quality. Therefore, do not go any lower than 5, and even that only as a last resort. - - + + - chroma_me + chroma_me Improves motion estimation by also taking the chroma (color) information into account, whereas alone only uses luma (grayscale). @@ -3062,73 +3153,75 @@ If you are looking for speed, you should disable this option before starting to consider reducing . - chroma_opt - Is intended to increase chroma image quality around pure - white/black edges, rather than improving compression. - This can help to reduce the "red stairs" effect. + Is intended to increase chroma image quality around pure + white/black edges, rather than improving compression. + This can help to reduce the "red stairs" effect. - lumi_mask - Tries to give less bitrate to part of the picture that the - human eye cannot see very well, which should allow the encoder - to spend the saved bits on more important parts of the picture. - The quality of the encode yielded by this option highly depends - on personal preferences and on the type and monitor settings - used to watch it (typically, it will not look as good if it is - bright or if it is a TFT monitor). + Tries to give less bitrate to part of the picture that the + human eye cannot see very well, which should allow the encoder + to spend the saved bits on more important parts of the picture. + The quality of the encode yielded by this option highly depends + on personal preferences and on the type and monitor settings + used to watch it (typically, it will not look as good if it is + bright or if it is a TFT monitor). - - + + qpel - Raise the number of candidate motion vectors by increasing - the precision of the motion estimation from halfpel to - quarterpel. - The idea is to find better motion vectors which will in return - reduce bitrate (hence increasing quality). - However, motion vectors with quarterpel precision require a - few extra bits to code, but the candidate vectors do not always - give (much) better results. - Quite often, the codec still spends bits on the extra precision, - but little or no extra quality is gained in return. - Unfortunately, there is no way to foresee the possible gains of - , so you need to actually encode with and - without it to know for sure. - - can be almost double encoding time, and - requires as much as 25% more processing power to decode. - It is not supported by all standalone players. - - + Raise the number of candidate motion vectors by increasing + the precision of the motion estimation from halfpel to + quarterpel. + The idea is to find better motion vectors which will in return + reduce bitrate (hence increasing quality). + However, motion vectors with quarterpel precision require a + few extra bits to code, but the candidate vectors do not always + give (much) better results. + Quite often, the codec still spends bits on the extra precision, + but little or no extra quality is gained in return. + Unfortunately, there is no way to foresee the possible gains of + , so you need to actually encode with and + without it to know for sure. + + + can be almost double encoding time, and + requires as much as 25% more processing power to decode. + It is not supported by all standalone players. + + gmc - Tries to save bits on panning scenes by using a single motion - vector for the whole frame. - This almost always raises PSNR, but significantly slows down - encoding (as well as decoding). - Therefore, you should only use it when you have turned - to the maximum. - Xvid's GMC is more - sophisticated than DivX's, but is only supported by few - standalone players. + Tries to save bits on panning scenes by using a single motion + vector for the whole frame. + This almost always raises PSNR, but significantly slows down + encoding (as well as decoding). + Therefore, you should only use it when you have turned + to the maximum. + Xvid's GMC is more + sophisticated than DivX's, but is only supported by few + standalone players. - + + Encoding profiles - - Xvid supports encoding profiles through the option, - which are used to impose restrictions on the properties of the Xvid video - stream such that it will be playable on anything which supports the - chosen profile. - The restrictions relate to resolutions, bitrates and certain MPEG-4 - features. - The following table shows what each profile supports. - + + +Xvid supports encoding profiles through the option, +which are used to impose restrictions on the properties of the Xvid video +stream such that it will be playable on anything which supports the +chosen profile. +The restrictions relate to resolutions, bitrates and certain MPEG-4 +features. +The following table shows what each profile supports. + + @@ -3151,267 +3244,268 @@ - - - - Simple - Advanced Simple - DivX - - - Profile name - 0 - 1 - 2 - 3 - 0 - 1 - 2 - 3 - 4 - 5 - Handheld - Portable NTSC - Portable PAL - Home Theater NTSC - Home Theater PAL - HDTV - - - Width [pixels] - 176 - 176 - 352 - 352 - 176 - 176 - 352 - 352 - 352 - 720 - 176 - 352 - 352 - 720 - 720 - 1280 - - - Height [pixels] - 144 - 144 - 288 - 288 - 144 - 144 - 288 - 288 - 576 - 576 - 144 - 240 - 288 - 480 - 576 - 720 - - - Frame rate [fps] - 15 - 15 - 15 - 15 - 30 - 30 - 15 - 30 - 30 - 30 - 15 - 30 - 25 - 30 - 25 - 30 - - - Max average bitrate [kbps] - 64 - 64 - 128 - 384 - 128 - 128 - 384 - 768 - 3000 - 8000 - 537.6 - 4854 - 4854 - 4854 - 4854 - 9708.4 - - - Peak average bitrate over 3 secs [kbps] - - - - - - - - - - - 800 - 8000 - 8000 - 8000 - 8000 - 16000 - - - Max. B-frames - 0 - 0 - 0 - 0 - - - - - - - 0 - 1 - 1 - 1 - 1 - 2 - - - MPEG quantization - - - - - X - X - X - X - X - X - - - - - - - - - Adaptive quantization - - - - - X - X - X - X - X - X - X - X - X - X - X - X - - - Interlaced encoding - - - - - X - X - X - X - X - X - - - - X - X - X - - - Quaterpixel - - - - - X - X - X - X - X - X - - - - - - - - - Global motion compensation - - - - - X - X - X - X - X - X - - - - - - - - + + + + Simple + Advanced Simple + DivX + + + Profile name + 0 + 1 + 2 + 3 + 0 + 1 + 2 + 3 + 4 + 5 + Handheld + Portable NTSC + Portable PAL + Home Theater NTSC + Home Theater PAL + HDTV + + + Width [pixels] + 176 + 176 + 352 + 352 + 176 + 176 + 352 + 352 + 352 + 720 + 176 + 352 + 352 + 720 + 720 + 1280 + + + Height [pixels] + 144 + 144 + 288 + 288 + 144 + 144 + 288 + 288 + 576 + 576 + 144 + 240 + 288 + 480 + 576 + 720 + + + Frame rate [fps] + 15 + 15 + 15 + 15 + 30 + 30 + 15 + 30 + 30 + 30 + 15 + 30 + 25 + 30 + 25 + 30 + + + Max average bitrate [kbps] + 64 + 64 + 128 + 384 + 128 + 128 + 384 + 768 + 3000 + 8000 + 537.6 + 4854 + 4854 + 4854 + 4854 + 9708.4 + + + Peak average bitrate over 3 secs [kbps] + + + + + + + + + + + 800 + 8000 + 8000 + 8000 + 8000 + 16000 + + + Max. B-frames + 0 + 0 + 0 + 0 + + + + + + + 0 + 1 + 1 + 1 + 1 + 2 + + + MPEG quantization + + + + + X + X + X + X + X + X + + + + + + + + + Adaptive quantization + + + + + X + X + X + X + X + X + X + X + X + X + X + X + + + Interlaced encoding + + + + + X + X + X + X + X + X + + + + X + X + X + + + Quaterpixel + + + + + X + X + X + X + X + X + + + + + + + + + Global motion compensation + + + + + X + X + X + X + X + X + + + + + + + + + + Encoding setting examples - The following settings are examples of different encoding - option combinations that affect the speed vs quality tradeoff - at the same target bitrate. - - - - All the encoding settings were tested on a 720x448 @30000/1001 fps - video sample, the target bitrate was 900kbps, and the machine was an - AMD-64 3400+ at 2400 MHz in 64 bits mode. - Each encoding setting features the measured encoding speed (in - frames per second) and the PSNR loss (in dB) compared to the "very - high quality" setting. - Please understand that depending on your source, your machine type - and development advancements, you may get very different results. - - - +The following settings are examples of different encoding +option combinations that affect the speed vs quality tradeoff +at the same target bitrate. + + + +All the encoding settings were tested on a 720x448 @30000/1001 fps +video sample, the target bitrate was 900kbps, and the machine was an +AMD-64 3400+ at 2400 MHz in 64 bits mode. +Each encoding setting features the measured encoding speed (in +frames per second) and the PSNR loss (in dB) compared to the "very +high quality" setting. +Please understand that depending on your source, your machine type +and development advancements, you may get very different results. + + @@ -3445,91 +3539,104 @@ - - + + + + -Encoding with the <systemitem class="library">x264</systemitem> codec - - x264 is a free library for - encoding H.264/AVC video streams. - Before starting to encode, you need to - set up MEncoder to support it. - +Encoding with the + <systemitem class="library">x264</systemitem> codec + + +x264 is a free library for +encoding H.264/AVC video streams. +Before starting to encode, you need to +set up MEncoder to support it. + + + Encoding options of x264 - Please begin by reviewing the - x264 section of - MPlayer's man page. - This section is intended to be a supplement to the man page. - Here you will find quick hints about which options are most - likely to interest most people. The man page is more terse, - but also more exhaustive, and it sometimes offers much better - technical detail. - +Please begin by reviewing the +x264 section of +MPlayer's man page. +This section is intended to be a supplement to the man page. +Here you will find quick hints about which options are most +likely to interest most people. The man page is more terse, +but also more exhaustive, and it sometimes offers much better +technical detail. + + Introduction -This guide considers two major categories of encoding options: + + +This guide considers two major categories of encoding options: + - Options which mainly trade off encoding time vs. quality - - Options which may be useful for fulfilling various personal - preferences and special requirements + + Options which mainly trade off encoding time vs. quality + + + Options which may be useful for fulfilling various personal + preferences and special requirements + - Ultimately, only you can decide which options are best for your - purposes. The decision for the first class of options is the simplest: - you only have to decide whether you think the quality differences - justify the speed differences. For the second class of options, - preferences may be far more subjective, and more factors may be - involved. Note that some of the "personal preferences and special - requirements" options can still have large impacts on speed or quality, - but that is not what they are primarily useful for. A couple of the - "personal preference" options may even cause changes that look better - to some people, but look worse to others. - - - - Before continuing, you need to understand that this guide uses only one - quality metric: global PSNR. - For a brief explanation of what PSNR is, see - the Wikipedia article on PSNR. - Global PSNR is the last PSNR number reported when you include - the option in . - Any time you read a claim about PSNR, one of the assumptions - behind the claim is that equal bitrates are used. - - - - Nearly all of this guide's comments assume you are using - two pass. - When comparing options, there are two major reasons for using - two pass encoding. - First, using two pass often gains around 1dB PSNR, which is a - very big difference. - Secondly, testing options by doing direct quality comparisons - with one pass encodes introduces a major confounding - factor: bitrate often varies significantly with each encode. - It is not always easy to tell whether quality changes are due - mainly to changed options, or if they mostly reflect essentially - random differences in the achieved bitrate. - - +Ultimately, only you can decide which options are best for your +purposes. The decision for the first class of options is the simplest: +you only have to decide whether you think the quality differences +justify the speed differences. For the second class of options, +preferences may be far more subjective, and more factors may be +involved. Note that some of the "personal preferences and special +requirements" options can still have large impacts on speed or quality, +but that is not what they are primarily useful for. A couple of the +"personal preference" options may even cause changes that look better +to some people, but look worse to others. + + + +Before continuing, you need to understand that this guide uses only one +quality metric: global PSNR. +For a brief explanation of what PSNR is, see +the Wikipedia article on PSNR. +Global PSNR is the last PSNR number reported when you include +the option in . +Any time you read a claim about PSNR, one of the assumptions +behind the claim is that equal bitrates are used. + + + +Nearly all of this guide's comments assume you are using two pass. +When comparing options, there are two major reasons for using +two pass encoding. +First, using two pass often gains around 1dB PSNR, which is a +very big difference. +Secondly, testing options by doing direct quality comparisons +with one pass encodes introduces a major confounding +factor: bitrate often varies significantly with each encode. +It is not always easy to tell whether quality changes are due +mainly to changed options, or if they mostly reflect essentially +random differences in the achieved bitrate. + + Options which primarily affect speed and quality - + + subq: Of the options which allow you to trade off speed for quality, and (see below) are usually @@ -3548,8 +3655,8 @@ Typically, achieves 0.2-0.5 dB higher global PSNR in comparison . This is usually enough to be visible. - - + + is the slowest, highest quality mode. In comparison to , it usually gains 0.1-0.4 dB global PSNR with speed costs varying from 25%-100%. @@ -3561,18 +3668,17 @@ and quality in complex, high motion scenes, but it may not have much effect in low-motion scenes. Note that it is still recommended to always set to something other than zero (see below). - - + + + + frameref: is set to 1 by default, but this - should not be taken to imply that it is reasonable to set it - to 1. + should not be taken to imply that it is reasonable to set it to 1. Merely raising to 2 gains around - 0.15dB PSNR with a 5-10% speed penalty; this seems like a - good tradeoff. + 0.15dB PSNR with a 5-10% speed penalty; this seems like a good tradeoff. gains around 0.25dB PSNR over - , which should be a visible - difference. + , which should be a visible difference. is around 15% slower than . Unfortunately, diminishing returns set in rapidly. @@ -3581,8 +3687,7 @@ 15% speed penalty. Above , the quality gains are usually very small (although you should keep in mind throughout - this whole discussion that it can vary quite a lot depending on - your source). + this whole discussion that it can vary quite a lot depending on your source). In a fairly typical case, will improve global PSNR by a tiny 0.02dB over , at a speed cost of 15%-20%. @@ -3591,9 +3696,9 @@ almost certainly never harm PSNR, but the additional quality benefits are barely even measurable, let alone perceptible. - -Note: - + + Note: + Raising to unnecessarily high values can and usually does @@ -3602,9 +3707,8 @@ "too high" currently seems too remote to even worry about, and in the future, optimizations may remove the possibility altogether. - - - + + If you care about speed, a reasonable compromise is to use low and values on the first pass, and then raise them on the second pass. @@ -3624,9 +3728,10 @@ to 3 or higher. This issue is probably extremely rare in live action video material, but it does sometimes come up in video game captures. - - - + + + + me: This option is for choosing the motion estimation search method. Altering this option provides a straightforward quality-vs-speed @@ -3640,13 +3745,12 @@ is about 40% slower than the default . With , the speed penalty incurred drops to 25%-30%. - - + + uses an exhaustive search that is too slow for practical use. - + - partitions=all: This option enables the use of 8x4, 4x8 and 4x4 subpartitions in @@ -3656,10 +3760,9 @@ containing only low motion, however in some high-motion source, particularly source with lots of small moving objects, gains of about 0.1dB can be expected. - - - - + + + bframes: If you are used to encoding with other codecs, you may have found that B-frames are not always useful. @@ -3670,8 +3773,8 @@ It is interesting to note that using B-frames usually speeds up the second pass somewhat, and may also speed up a single pass encode if adaptive B-frame decision is turned off. - - + + With adaptive B-frame decision turned off ('s ), the optimal value for this setting is usually no more than @@ -3681,13 +3784,14 @@ B-frames in scenes where they would hurt compression. The encoder rarely chooses to use more than 3 or 4 B-frames; setting this option any higher will have little effect. - - - + + + + b_adapt: Note: This is on by default. - - + + With this option enabled, the encoder will use a reasonably fast decision process to reduce the number of B-frames used in scenes that might not benefit from them as much. @@ -3700,8 +3804,8 @@ first pass. and have no effect on subsequent passes. - - + + b_pyramid: You might as well enable this option if you are using >=2 B-frames; @@ -3710,8 +3814,8 @@ Note that these videos cannot be read by libavcodec-based decoders older than about March 5, 2005. - - + + weight_b: In typical cases, there is not much gain with this option. However, in crossfades or fade-to-black scenes, weighted @@ -3724,22 +3828,26 @@ Also, contrary to what some people seem to guess, the decoder CPU requirements are not much affected by weighted prediction, all else being equal. - - + + Unfortunately, the current adaptive B-frame decision algorithm has a strong tendency to avoid B-frames during fades. Until this changes, it may be a good idea to add to your x264encopts, if you expect fades to have a large effect in your particular video clip. - + + + Options pertaining to miscellaneous preferences + - + + Two pass encoding: Above, it was suggested to always use two pass encoding, but there are still reasons for not using it. For instance, if you are capturing @@ -3747,8 +3855,8 @@ Also, one pass is obviously faster than two passes; if you use the exact same set of options on both passes, two pass encoding is almost twice as slow. - - + + Still, there are very good reasons for using two pass encoding. For one thing, single pass ratecontrol is not psychic, and it often makes unreasonable choices because it cannot see the big picture. For example, @@ -3772,8 +3880,8 @@ it would have taken to make it look decent. There are ways to mitigate the pitfalls of single-pass encoding, but they may tend to increase bitrate misprediction. - - + + Multipass ratecontrol can offer huge advantages over a single pass. Using the statistics gathered from the first pass encode, the encoder can estimate, with reasonable accuracy, the "cost" (in bits) of @@ -3782,8 +3890,8 @@ expensive (high-motion) and cheap (low-motion) scenes. See below for some ideas on how to tweak this allocation to your liking. - - + + Moreover, two passes need not take twice as long as one pass. You can tweak the options in the first pass for higher speed and lower quality. If you choose your options well, you can get a very fast first pass. @@ -3794,10 +3902,10 @@ . Then, on the second pass, use slower, higher-quality options: - + + Three pass encoding? - x264 offers the ability to make an arbitrary number of consecutive passes. If you specify on the first pass, then use on a subsequent pass, the subsequent @@ -3813,7 +3921,6 @@ also a few special cases in which three (or more) passes are handy for advanced users, but for brevity, this guide omits discussing those special cases. - qcomp: @@ -3845,11 +3952,12 @@ vanishingly low, or even zero). The video stream will still have seekable points as long as there are some scene changes. - + + deblock: This topic is going to be a bit controversial. - - + + H.264 defines a simple deblocking procedure on I-blocks that uses pre-set strengths and thresholds depending on the QP of the block in question. @@ -3858,17 +3966,17 @@ The pre-set strengths defined by the standard are well-chosen and the odds are very good that they are PSNR-optimal for whatever video you are trying to encode. - The allow you to specify offsets to the preset deblocking - thresholds. - - + The allow you to specify offsets to the preset + deblocking thresholds. + + Many people seem to think it is a good idea to lower the deblocking filter strength by large amounts (say, -3). This is however almost never a good idea, and in most cases, people who are doing this do not understand very well how deblocking works by default. - - + + The first and most important thing to know about the in-loop deblocking filter is that the default thresholds are almost always PSNR-optimal. @@ -3878,8 +3986,8 @@ guaranteed to hurt PSNR. Strengthening the filter will smear more details; weakening the filter will increase the appearance of blockiness. - - + + It is definitely a bad idea to lower the deblocking thresholds if your source is mainly low in spacial complexity (i.e., not a lot of detail or noise). @@ -3896,9 +4004,8 @@ By lowering the deblocking filter strength, you are most likely increasing error by adding ringing artifacts, but the eye does not notice because it confuses the artifacts with detail. - - - + + This still does not justify lowering the deblocking filter strength, however. You can generally get better quality noise from postprocessing. @@ -3908,36 +4015,43 @@ artifacting. It will almost certainly look better than the results you would have gotten just by fiddling with the deblocking filter. - + + + + Encoding setting examples - The following settings are examples of different encoding - option combinations that affect the speed vs quality tradeoff - at the same target bitrate. - - - - All the encoding settings were tested on a 720x448 @30000/1001 fps - video sample, the target bitrate was 900kbps, and the machine was an - AMD-64 3400+ at 2400 MHz in 64 bits mode. - Each encoding setting features the measured encoding speed (in - frames per second) and the PSNR loss (in dB) compared to the "very - high quality" setting. - Please understand that depending on your source, your machine type - and development advancements, you may get very different results. - - - +The following settings are examples of different encoding +option combinations that affect the speed vs quality tradeoff +at the same target bitrate. + + + +All the encoding settings were tested on a 720x448 @30000/1001 fps +video sample, the target bitrate was 900kbps, and the machine was an +AMD-64 3400+ at 2400 MHz in 64 bits mode. +Each encoding setting features the measured encoding speed (in +frames per second) and the PSNR loss (in dB) compared to the "very +high quality" setting. +Please understand that depending on your source, your machine type +and development advancements, you may get very different results. + + -DescriptionEncoding optionsspeed (in fps)Relative PSNR loss (in dB) + + Description + Encoding options + speed (in fps) + Relative PSNR loss (in dB) + @@ -3961,18 +4075,24 @@ - - + + + + -Encoding with the <systemitem class="library">Video For Windows</systemitem> codec family + + Encoding with the <systemitem class="library">Video For Windows</systemitem> + codec family + Video for Windows provides simple encoding by means of binary video codecs. You can encode with the following codecs (if you have more, please tell us!) + Note that support for this is very experimental and some codecs may not work correctly. Some codecs will only work in certain colorspaces, try @@ -3980,6 +4100,8 @@ if a codec fails or gives wrong output. + + Video for Windows supported codecs @@ -3988,10 +4110,10 @@ -Video codec file name -Description (FourCC) -md5sum -Comment + Video codec file name + Description (FourCC) + md5sum + Comment @@ -4102,8 +4224,8 @@ MSU Lossless codec (MSUD) 294bf9288f2f127bb86f00bfcc9ccdda - Decodable by Window Media Player, - not MPlayer (yet). + Decodable by Window Media Player, + not MPlayer (yet). @@ -4117,43 +4239,53 @@ The first column contains the codec names that should be passed after the -codec parameter, like: +codec parameter, +like: The FourCC code used by each codec is given in the parentheses. + An example with VP3 compression: -mencoder dvd://2 -o title2.avi -ovc vfw -xvfwopts codec=vp31vfw.dll -oac copy + +mencoder dvd://2 -o title2.avi -ovc vfw -xvfwopts codec=vp31vfw.dll -oac copy + + + + -Using <application>MEncoder</application> to create VCD/SVCD/DVD-compliant files. +Using <application>MEncoder</application> + to create VCD/SVCD/DVD-compliant files Format Constraints - - MEncoder is capable of creating VCD, SCVD - and DVD format MPEG files using the - libavcodec library. - These files can then be used in conjunction with - vcdimager - or - dvdauthor - to create discs that will play on a standard set-top player. - - - - The DVD, SVCD, and VCD formats are subject to heavy constraints. - Only a small selection of encoded picture sizes and aspect ratios are - available. - If your movie does not already meet these requirements, you may have - to scale,crop or add black borders to the picture to make it - compliant. - + + +MEncoder is capable of creating VCD, SCVD +and DVD format MPEG files using the +libavcodec library. +These files can then be used in conjunction with +vcdimager +or +dvdauthor +to create discs that will play on a standard set-top player. + + + +The DVD, SVCD, and VCD formats are subject to heavy constraints. +Only a small selection of encoded picture sizes and aspect ratios are +available. +If your movie does not already meet these requirements, you may have +to scale,crop or add black borders to the picture to make it +compliant. + + Format Constraints @@ -4161,299 +4293,296 @@ - - Format - Resolution - V. Codec - V. Bitrate - Sample Rate - A. Codec - A. Bitrate - FPS - Aspect - + + Format + Resolution + V. Codec + V. Bitrate + Sample Rate + A. Codec + A. Bitrate + FPS + Aspect + - - NTSC DVD - 720x480, 704x480, 352x480, 352x240 - MPEG-2 - 9800 kbps - 48000 Hz - AC3,PCM - 1536 kbps (max) - 30000/1001, 24000/1001 - 4:3, 16:9 (only for 720x480) - - - NTSC DVD - 352x240 - These resolutions are rarely used for DVDs because - they are fairly low quality. - MPEG-1 - 1856 kbps - 48000 Hz - AC3,PCM - 1536 kbps (max) - 30000/1001, 24000/1001 - 4:3, 16:9 - - - NTSC SVCD - 480x480 - MPEG-2 - 2600 kbps - 44100 Hz - MP2 - 384 kbps (max) - 30000/1001 - 4:3 - - - NTSC VCD - 352x240 - MPEG-1 - 1150 kbps - 44100 Hz - MP2 - 224 kbps - 24000/1001, 30000/1001 - 4:3 - - - PAL DVD - 720x576, 704x576, 352x576, 352x288 - MPEG-2 - 9800 kbps - 48000 Hz - MP2,AC3,PCM - 1536 kbps (max) - 25 - 4:3, 16:9 (only for 720x576) - - - PAL DVD - 352x288 - MPEG-1 - 1856 kbps - 48000 Hz - MP2,AC3,PCM - 1536 kbps (max) - 25 - 4:3, 16:9 - - - PAL SVCD - 480x576 - MPEG-2 - 2600 kbps - 44100 Hz - MP2 - 384 kbps (max) - 25 - 4:3 - - - PAL VCD - 352x288 - MPEG-1 - 1152 kbps - 44100 Hz - MP2 - 224 kbps - 25 - 4:3 - + + NTSC DVD + 720x480, 704x480, 352x480, 352x240 + MPEG-2 + 9800 kbps + 48000 Hz + AC3,PCM + 1536 kbps (max) + 30000/1001, 24000/1001 + 4:3, 16:9 (only for 720x480) + + + NTSC DVD + 352x240 + These resolutions are rarely used for DVDs because + they are fairly low quality. + MPEG-1 + 1856 kbps + 48000 Hz + AC3,PCM + 1536 kbps (max) + 30000/1001, 24000/1001 + 4:3, 16:9 + + + NTSC SVCD + 480x480 + MPEG-2 + 2600 kbps + 44100 Hz + MP2 + 384 kbps (max) + 30000/1001 + 4:3 + + + NTSC VCD + 352x240 + MPEG-1 + 1150 kbps + 44100 Hz + MP2 + 224 kbps + 24000/1001, 30000/1001 + 4:3 + + + PAL DVD + 720x576, 704x576, 352x576, 352x288 + MPEG-2 + 9800 kbps + 48000 Hz + MP2,AC3,PCM + 1536 kbps (max) + 25 + 4:3, 16:9 (only for 720x576) + + + PAL DVD + 352x288 + MPEG-1 + 1856 kbps + 48000 Hz + MP2,AC3,PCM + 1536 kbps (max) + 25 + 4:3, 16:9 + + + PAL SVCD + 480x576 + MPEG-2 + 2600 kbps + 44100 Hz + MP2 + 384 kbps (max) + 25 + 4:3 + + + PAL VCD + 352x288 + MPEG-1 + 1152 kbps + 44100 Hz + MP2 + 224 kbps + 25 + 4:3 + - If your movie has 2.35:1 aspect (most recent action movies), you will - have to add black borders or crop the movie down to 16:9 to make a DVD - or VCD. - If you add black borders, try to align them at 16-pixel boundaries in - order to minimize the impact on encoding performance. - Thankfully DVD has sufficiently excessive bitrate that you do not have - to worry too much about encoding efficiency, but SVCD and VCD are - highly bitrate-starved and require effort to obtain acceptable quality. +If your movie has 2.35:1 aspect (most recent action movies), you will +have to add black borders or crop the movie down to 16:9 to make a DVD or VCD. +If you add black borders, try to align them at 16-pixel boundaries in +order to minimize the impact on encoding performance. +Thankfully DVD has sufficiently excessive bitrate that you do not have +to worry too much about encoding efficiency, but SVCD and VCD are +highly bitrate-starved and require effort to obtain acceptable quality. + GOP Size Constraints - - DVD, VCD, and SVCD also constrain you to relatively low - GOP (Group of Pictures) sizes. - For 30 fps material the largest allowed GOP size is 18. - For 25 or 24 fps, the maximum is 15. - The GOP size is set using the option. + + +DVD, VCD, and SVCD also constrain you to relatively low +GOP (Group of Pictures) sizes. +For 30 fps material the largest allowed GOP size is 18. +For 25 or 24 fps, the maximum is 15. +The GOP size is set using the option. + Bitrate Constraints - - VCD video is required to be CBR at 1152 kbps. - This highly limiting constraint also comes along with an extremly low vbv - buffer size of 327 kilobits. - SVCD allows varying video bitrates up to 2500 kbps, and a somewhat less - restrictive vbv buffer size of 917 kilobits is allowed. - DVD video bitrates may range anywhere up to 9800 kbps (though typical - bitrates are about half that), and the vbv buffer size is 1835 kilobits. + + +VCD video is required to be CBR at 1152 kbps. +This highly limiting constraint also comes along with an extremly low vbv +buffer size of 327 kilobits. +SVCD allows varying video bitrates up to 2500 kbps, and a somewhat less +restrictive vbv buffer size of 917 kilobits is allowed. +DVD video bitrates may range anywhere up to 9800 kbps (though typical +bitrates are about half that), and the vbv buffer size is 1835 kilobits. + + Output Options - - MEncoder has options to control the output - format. - Using these options we can instruct it to create the correct type of - file. - - - - The options for VCD and SVCD are called xvcd and xsvcd, because they - are extended formats. - They are not strictly compliant, mainly because the output does not - contain scan offsets. - If you need to generate an SVCD image, you should pass the output file - to - vcdimager. - - - - VCD: - - -of mpeg -mpegopts format=xvcd - - - - - SVCD: - - -of mpeg -mpegopts format=xsvcd - - - - - DVD (with timestamps on every frame, if possible): - - -of mpeg -mpegopts format=dvd:tsaf - - - - - DVD with NTSC Pullup: - - -of mpeg -mpegopts format=dvd:tsaf:telecine -ofps 24000/1001 - - This allows 24000/1001 fps progressive content to be encoded at 30000/1001 - fps whilst maintaing DVD-compliance. - + + +MEncoder has options to control the output +format. +Using these options we can instruct it to create the correct type of +file. + + + +The options for VCD and SVCD are called xvcd and xsvcd, because they +are extended formats. +They are not strictly compliant, mainly because the output does not +contain scan offsets. +If you need to generate an SVCD image, you should pass the output file to +vcdimager. + + + +VCD: +-of mpeg -mpegopts format=xvcd + + + +SVCD: +-of mpeg -mpegopts format=xsvcd + + + +DVD (with timestamps on every frame, if possible): +-of mpeg -mpegopts format=dvd:tsaf + + + +DVD with NTSC Pullup: +-of mpeg -mpegopts format=dvd:tsaf:telecine -ofps 24000/1001 +This allows 24000/1001 fps progressive content to be encoded at 30000/1001 +fps whilst maintaing DVD-compliance. + + Aspect Ratio - - The aspect argument of is used to encode - the aspect ratio of the file. - During playback the aspect ratio is used to restore the video to the - correct size. - - - - 16:9 or "Widescreen" - - -lavcopts aspect=16/9 - - - - - 4:3 or "Fullscreen" - - -lavcopts aspect=4/3 - - - - - 2.35:1 or "Cinemascope" NTSC - - -vf scale=720:368,expand=720:480 -lavcopts aspect=16/9 - - To calculate the correct scaling size, use the expanded NTSC width of - 854/2.35 = 368 - - - - 2.35:1 or "Cinemascope" PAL - - -vf scale="720:432,expand=720:576 -lavcopts aspect=16/9 - - To calculate the correct scaling size, use the expanded PAL width of - 1024/2.35 = 432 - - + + +The aspect argument of is used to encode +the aspect ratio of the file. +During playback the aspect ratio is used to restore the video to the +correct size. + + + +16:9 or "Widescreen" +-lavcopts aspect=16/9 + + + +4:3 or "Fullscreen" +-lavcopts aspect=4/3 + + + +2.35:1 or "Cinemascope" NTSC +-vf scale=720:368,expand=720:480 -lavcopts aspect=16/9 +To calculate the correct scaling size, use the expanded NTSC width of +854/2.35 = 368 + + + +2.35:1 or "Cinemascope" PAL +-vf scale="720:432,expand=720:576 -lavcopts aspect=16/9 +To calculate the correct scaling size, use the expanded PAL width of +1024/2.35 = 432 + + Maintaining A/V sync - - In order to maintain audio/video synchronization throughout the encode, - MEncoder has to drop or duplicate frames. - This works rather well when muxing into an AVI file, but is almost - guaranteed to fail to maintain A/V sync with other muxers such as MPEG. - This is why it is necessary to append the - video filter at the end of the filter chain - to avoid this kind of problem. - You can find more technical information about - in the section - Improving muxing and A/V sync reliability - or in the manual page. + + +In order to maintain audio/video synchronization throughout the encode, +MEncoder has to drop or duplicate frames. +This works rather well when muxing into an AVI file, but is almost +guaranteed to fail to maintain A/V sync with other muxers such as MPEG. +This is why it is necessary to append the + video filter at the end of the filter chain +to avoid this kind of problem. +You can find more technical information about +in the section +Improving muxing and A/V sync reliability +or in the manual page. + Sample Rate Conversion - - If the audio sample rate in the original file is not the same as - required by the target format, sample rate conversion is required. - This is achieved using the option and - the audio filter together. - - - DVD: - - -srate 48000 -af lavcresample=48000 - - - - VCD and SVCD: - - -srate 44100 -af lavcresample=44100 - - + + +If the audio sample rate in the original file is not the same as +required by the target format, sample rate conversion is required. +This is achieved using the option and +the audio filter together. + + + +DVD: +-srate 48000 -af lavcresample=48000 + + + +VCD and SVCD: +-srate 44100 -af lavcresample=44100 + + + Using libavcodec for VCD/SVCD/DVD Encoding Introduction - - libavcodec can be used to - create VCD/SVCD/DVD compliant video by using the appropriate options. + + +libavcodec can be used to +create VCD/SVCD/DVD compliant video by using the appropriate options. + lavcopts - - This is a list of fields in that you may - be required to change in order to make a complaint movie for VCD, SVCD, - or DVD: + + +This is a list of fields in that you may +be required to change in order to make a complaint movie for VCD, SVCD, +or DVD: @@ -4466,14 +4595,12 @@ Note that MP3 audio is not compliant for any of these formats, but players often have no problem playing it anyway. - abitrate: 224 for VCD; up to 384 for SVCD; up to 1536 for DVD, but commonly used values range from 192 kbps for stereo to 384 kbps for 5.1 channel sound. - vcodec: for VCD; @@ -4481,7 +4608,6 @@ is usually used for DVD but you may also use for CIF resolutions. - keyint: Used to set the GOP size. @@ -4491,24 +4617,20 @@ with most players. A of 25 should never cause any problems. - vrc_buf_size: 327 for VCD, 917 for SVCD, and 1835 for DVD. - vrc_minrate: 1152, for VCD. May be left alone for SVCD and DVD. - vrc_maxrate: 1152 for VCD; 2500 for SVCD; 9800 for DVD. For SVCD and DVD, you might wish to use lower values depending on your own personal preferences and requirements. - vbitrate: 1152 for VCD; @@ -4526,241 +4648,259 @@ + Examples - - This is a typical minimum set of for - encoding video: - - - VCD: - - -lavcopts vcodec=mpeg1video:vrc_buf_size=327:vrc_minrate=1152:\ - vrc_maxrate=1152:vbitrate=1152:keyint=15:acodec=mp2 - - - - - SVCD: - - -lavcopts vcodec=mpeg2video:vrc_buf_size=917:vrc_maxrate=2500:vbitrate=1800:\ - keyint=15:acodec=mp2 - - - - - DVD: - - -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\ - keyint=15:acodec=ac3 - - - + + +This is a typical minimum set of for +encoding video: + + +VCD: + +-lavcopts vcodec=mpeg1video:vrc_buf_size=327:vrc_minrate=1152:\ +vrc_maxrate=1152:vbitrate=1152:keyint=15:acodec=mp2 + + + + +SVCD: + +-lavcopts vcodec=mpeg2video:vrc_buf_size=917:vrc_maxrate=2500:vbitrate=1800:\ +keyint=15:acodec=mp2 + + + + +DVD: + +-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\ +keyint=15:acodec=ac3 + + + Advanced Options - - For higher quality encoding, you may also wish to add quality-enhancing - options to lavcopts, such as , - , and others. - Note that and , while often - useful with MPEG-4, are not usable with MPEG-1 or MPEG-2. - Also, if you are trying to make a very high quality DVD encode, it may - be useful to add to lavcopts. - Doing so may help reduce the appearance of blocks in flat-colored areas. - Putting it all together, this is an example of a set of lavcopts for a - higher quality DVD: - - - - - -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:\ - keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:\ - vqmin=1:lmin=1:dc=10 - - - + + +For higher quality encoding, you may also wish to add quality-enhancing +options to lavcopts, such as , +, and others. +Note that and , while often +useful with MPEG-4, are not usable with MPEG-1 or MPEG-2. +Also, if you are trying to make a very high quality DVD encode, it may +be useful to add to lavcopts. +Doing so may help reduce the appearance of blocks in flat-colored areas. +Putting it all together, this is an example of a set of lavcopts for a +higher quality DVD: + + + + +-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:\ +keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:\ +vqmin=1:lmin=1:dc=10 + + + + Encoding Audio - - VCD and SVCD support MPEG-1 layer II audio, using one of - toolame, - twolame, - or libavcodec's MP2 encoder. - The libavcodec MP2 is far from being as good as the other two libraries, - however it should always be available to use. - VCD only supports constant bitrate audio (CBR) whereas SVCD supports - variable bitrate (VBR), too. - Be careful when using VBR because some bad standalone players might not - support it too well. - - - - For DVD audio, libavcodec's - AC3 codec is used. - + + +VCD and SVCD support MPEG-1 layer II audio, using one of +toolame, +twolame, +or libavcodec's MP2 encoder. +The libavcodec MP2 is far from being as good as the other two libraries, +however it should always be available to use. +VCD only supports constant bitrate audio (CBR) whereas SVCD supports +variable bitrate (VBR), too. +Be careful when using VBR because some bad standalone players might not +support it too well. + + + +For DVD audio, libavcodec's +AC3 codec is used. + + toolame - - For VCD and SVCD: - - -oac toolame -toolameopts br=224 - + + +For VCD and SVCD: +-oac toolame -toolameopts br=224 + twolame - - For VCD and SVCD: - - -oac twolame -twolameopts br=224 - + + +For VCD and SVCD: +-oac twolame -twolameopts br=224 + libavcodec - - For DVD with 2 channel sound: - - -oac lavc -lavcopts acodec=ac3:abitrate=192 - - - - For DVD with 5.1 channel sound: - - -channels 6 -oac lavc -lavcopts acodec=ac3:abitrate=384 - - - - For VCD and SVCD: - - -oac lavc -lavcopts acodec=mp2:abitrate=224 + + +For DVD with 2 channel sound: +-oac lavc -lavcopts acodec=ac3:abitrate=192 + + + +For DVD with 5.1 channel sound: +-channels 6 -oac lavc -lavcopts acodec=ac3:abitrate=384 + + + +For VCD and SVCD: +-oac lavc -lavcopts acodec=mp2:abitrate=224 + + + + + + + +Putting it all Together + + +This section shows some complete commands for creating VCD/SVCD/DVD +compliant videos. + + + + +PAL DVD + + + +mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \ + -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \ + -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\ +keyint=15:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 \ + -o movie.mpg movie.avi + + + + + + +NTSC DVD + + + +mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \ + -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 \ + -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\ +keyint=18:acodec=ac3:abitrate=192:aspect=16/9 -ofps 30000/1001 \ + -o movie.mpg movie.avi + + + + + + +PAL AVI Containing AC3 Audio to DVD + + +If the source already has AC3 audio, use -oac copy instead of re-encoding it. + +mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \ + -vf scale=720:576,harddup -ofps 25 \ + -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\ +keyint=15:aspect=16/9 -o movie.mpg movie.avi + + + + + + +NTSC AVI Containing AC3 Audio to DVD + + +If the source already has AC3 audio, and is NTSC @ 24000/1001 fps: + +mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf:telecine \ + -vf scale=720:480,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:\ + vrc_maxrate=9800:vbitrate=5000:keyint=15:aspect=16/9 -ofps 24000/1001 \ + -o movie.mpg movie.avi + + + + + + +PAL SVCD + + + +mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \ + scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ + vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:\ +vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 25 \ + -o movie.mpg movie.avi - - - -Putting it all Together - - This section shows some complete commands for creating VCD/SVCD/DVD - compliant videos. - - - -PAL DVD - - - mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:576,\ - harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:\ - vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:acodec=ac3:\ - abitrate=192:aspect=16/9 -ofps 25 \ - -o movie.mpg movie.avi - - - - - -NTSC DVD - - - mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:480,\ - harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:\ - vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:acodec=ac3:\ - abitrate=192:aspect=16/9 -ofps 30000/1001 \ - -o movie.mpg movie.avi - - - - - -PAL AVI Containing AC3 Audio to DVD - - If the source already has AC3 audio, use -oac copy instead of re-encoding it. - - mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:576,\ - harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:\ - vbitrate=5000:keyint=15:aspect=16/9 -ofps 25 \ - -o movie.mpg movie.avi - - - - - -NTSC AVI Containing AC3 Audio to DVD - - If the source already has AC3 audio, and is NTSC @ 24000/1001 fps: - - mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf:telecine \ - -vf scale=720:480,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:\ - vrc_maxrate=9800:vbitrate=5000:keyint=15:aspect=16/9 -ofps 24000/1001 \ - -o movie.mpg movie.avi - - - - - -PAL SVCD - - - mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \ - scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ - vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:\ - vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 25 \ - -o movie.mpg movie.avi - - - NTSC SVCD - - - mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \ - scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ - vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:\ - vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 30000/1001 \ - -o movie.mpg movie.avi - + + + +mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \ + scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ + vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:\ +vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 30000/1001 \ + -o movie.mpg movie.avi + + PAL VCD - - - mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \ - scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ - vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:\ - vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \ - -o movie.mpg movie.avi - + + + +mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \ + scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ + vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:\ +vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \ + -o movie.mpg movie.avi + + NTSC VCD - - - mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \ - scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ - vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:\ - vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 \ - -o movie.mpg movie.avi - + + + +mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \ + scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ + vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:\ +vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 \ + -o movie.mpg movie.avi + - - - diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/faq.xml --- a/DOCS/xml/en/faq.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/faq.xml Fri Dec 08 11:38:06 2006 +0000 @@ -69,6 +69,7 @@ + Compilation and installation @@ -194,6 +195,7 @@ + General questions @@ -211,11 +213,11 @@ -I've found a nasty bug when I tried to play my favorite video! Who should I inform? +I've found a nasty bug when I tried to play my favorite video! +Who should I inform? -Please read the -bug reporting guidelines +Please read the bug reporting guidelines and follow the instructions. @@ -226,8 +228,9 @@ Check the codec status, -if it doesn't contain your codec, read the codec documentation, -especially the codec importing HOWTO and contact us. +if it doesn't contain your codec, read the +codec documentation, especially the +codec importing HOWTO and contact us. @@ -237,8 +240,8 @@ 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. +You need a specially set up kernel to use the RTC timing code. +For details see the RTC section of the documentation. @@ -265,46 +268,66 @@ 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 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 + + A: 2.1 + audio position in seconds -V: 2.2 -video position in seconds + + V: 2.2 + video position in seconds -A-V: -0.167 -audio-video difference in seconds (delay) + + A-V: -0.167 + audio-video difference in seconds (delay) -ct: 0.042 -total A-V sync correction done + + ct: 0.042 + total A-V sync correction done -57/57 -frames played/decoded (counting from last seek) + + 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) + + 41% + + video codec CPU usage in percent + (for slice rendering and direct rendering this includes video_out) + -0% -video_out CPU usage + + 0% + video_out CPU usage -2.6% -audio codec CPU usage in percent + + 2.6% + audio codec CPU usage in percent -0 -frames dropped to maintain A-V sync + + 0 + frames dropped to maintain A-V sync + + + 4 + + current level of image postprocessing (when using ) + -4 -current level of image postprocessing (when using -) + + 49% + + current cache size used (around 50% is normal) + -49% -current cache size used (around 50% is normal) - -1.00x -playback speed as a factor of original speed + + 1.00x + playback speed as a factor of original speed Most of them are for debug purposes, use the @@ -319,7 +342,8 @@ -There are error messages about file not found /usr/local/lib/codecs/ ... +There are error messages about file not found +/usr/local/lib/codecs/ ... Download and install the binary codecs from our @@ -345,8 +369,9 @@ slow down playing! I know it's unlikely ... -After running ./configure, edit config.h -and replace #undef FAST_OSD with +After running ./configure, +edit config.h and replace +#undef FAST_OSD with #define FAST_OSD. Then recompile. @@ -372,11 +397,14 @@ Use: -mplayer options filename < /dev/null & + +mplayer options filename < /dev/null & + + Playback problems @@ -493,35 +521,32 @@ 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.) - - - - + + 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.) + + @@ -541,8 +566,8 @@ -When I try to grab from my tuner, it works, but colors are strange. It's OK with other -applications. +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 @@ -553,21 +578,25 @@ -I get very strange percentage values (way too big) while playing files on my notebook. +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 +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. +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 @@ -588,6 +617,7 @@ + Video/audio driver problems (vo/ao) @@ -621,13 +651,11 @@ Just change your video output device. Issue the following command to get a list of available video output drivers: - -mplayer -vo help - +mplayer -vo help After you've chosen the correct video output driver, add it to your configuration file. Add - vo = selected_vo +vo = selected_vo to ~/.mplayer/config and/or @@ -664,7 +692,8 @@ My computer plays MS DivX AVIs with resolutions ~ 640x300 and stereo MP3 sound -too slow. When I use the option, everything is OK (but quiet). +too slow. +When I use the option, everything is OK (but quiet). Your machine is too slow or your sound card driver is broken. Consult the @@ -688,17 +717,18 @@ 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... +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. +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. @@ -722,7 +752,8 @@ -I have A/V sync problems. Some of my AVIs play fine, but some play with double speed! +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 @@ -733,26 +764,29 @@ -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! +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). + 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 - to work around this. -Or it may have a bad header, in this case -and/or can help. + If it is an AVI, maybe it has bad interleaving, try the + to work around this. + Or it may have a bad header, in this case + and/or can help. -Your sound driver is buggy. See the audio section. + Your sound driver is buggy. + See the audio section. @@ -760,7 +794,8 @@ -How can I get rid of A/V desynchronization while seeking through RealMedia streams? +How can I get rid of A/V desynchronization +while seeking through RealMedia streams? can help. @@ -768,6 +803,7 @@ + DVD playback @@ -817,7 +853,8 @@ How can I set the region code of my DVD-drive? I don't have Windows! -Use the regionset tool. +Use the +regionset tool. @@ -856,8 +893,8 @@ 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). +enabling DMA for the DVD drive with the hdparm tool +(described in the CD chapter). @@ -881,9 +918,9 @@ -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. +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. @@ -904,6 +941,7 @@ + Encoding @@ -939,8 +977,9 @@ 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 +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. @@ -1051,7 +1090,8 @@ How can I encode only selected chapters from a DVD? -Use the option correctly, like: . +Use the option correctly, +like: . @@ -1066,36 +1106,48 @@ -What is the meaning of the numbers on the status line during the encoding process? +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 6612f ( 2%) 7.12fps Trem: 576min 2856mb A-V:0.065 [2126:192] + -Pos: 264.5s -time position in the encoded stream + + Pos: 264.5s + time position in the encoded stream -6612f -number of video frames encoded + + 6612f + number of video frames encoded -( 2%) -portion of the input stream encoded + + ( 2%) + portion of the input stream encoded -7.12fps -encoding speed + + 7.12fps + encoding speed -Trem: 576min -estimated remaining encoding time + + Trem: 576min + estimated remaining encoding time -2856mb -estimated size of the final encode + + 2856mb + estimated size of the final encode -A-V:0.065 -current delay between audio and video streams + + 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) + + [2126:192] + + average video bitrate (in kb/s) and average audio bitrate (in kb/s) + @@ -1103,7 +1155,8 @@ -Why is the recommended bitrate printed by MEncoder negative? +Why is the recommended bitrate printed by MEncoder +negative? Because the bitrate you encoded the audio with is too large to fit the @@ -1140,10 +1193,10 @@ & at the end of mplayer command): - mkfifo encode - mplayer -ao pcm -aofile encode dvd://1 & - lame your_opts encode music.mp3 - rm encode +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 @@ -1173,7 +1226,7 @@ option. You may also change the FourCC of existing files in the same way: - mencoder input.avi -o output.avi -ffourcc XVID +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 diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/history.xml --- a/DOCS/xml/en/history.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/history.xml Fri Dec 08 11:38:06 2006 +0000 @@ -15,100 +15,173 @@ problems too. So I've decided to write/modify one... A'rpi, 2001 + + - - - mpg12play v0.1-v0.3: Sep 22-25, 2000 - - The first try, hacked together in a half hour! I've used libmpeg3 - from up to the version 0.3, but - there were image quality and speed problems with it. - - - mpg12play v0.5-v0.87: Sep 28-Oct 20, 2000 - MPEG codec replaced with DVDview by Dirk Farin, it was a - great stuff, but it was slow and was written in C++ (A'rpi hates C++!!!) - - - mpg12play v0.9-v0.95pre5: Oct 21-Nov 2, 2000 - MPEG codec was libmpeg2 (mpeg2dec) by Aaron Holtzman and - Michel Lespinasse. It's great, optimized very fast C code with perfect - image quality and 100% MPEG standard conformance. - - - MPlayer v0.3-v0.9: Nov 18-Dec 4, 2000 - It was a pack of two programs: mpg12play v0.95pre6 and my - new simple AVI player 'avip' based on avifile's Win32 DLL loader. - - - MPlayer v0.10: Jan 1, 2001 - The MPEG and AVI player in a single binary! - - - MPlayer v0.11pre series: - Some new developers joined and since 0.11 the MPlayer - project is a team-work! Added ASF file support, and OpenDivX - (see ) en/decoding. - - - MPlayer v0.17a "The IdegCounter" Apr 27, 2001 - The release version of the 0.11pre after 4 months of heavy - development! Try it, and be amazed! Thousands of new features added... - and of course old code was improved too, bugs removed etc. - - - MPlayer 0.18 "The BugCounter" Jul 9, 2001 - 2 months since 0.17 and here's a new release.. Completed ASF - support, more subtitle formats, introduced libao (similar to libvo but to - audio), even more stable than ever, and so on. It's a MUST! - - - MPlayer 0.50 "The Faszom(C)ounter" Oct 8, 2001 - Hmm. Release again. Tons of new features, beta GUI version, - bugs fixed, new vo and ao drivers, ported to many systems, including - opensource DivX codecs and much more. Try it! - - - MPlayer 0.60 "The RTFMCounter" Jan 3, 2002 - MOV/VIVO/RM/FLI/NUV fileformats support, native CRAM, Cinepak, - ADPCM codecs, and support for XAnim's binary codecs; DVD subtitles support, - first release of MEncoder, TV grabbing, cache, - liba52, countless fixes. - - - MPlayer 0.90pre10 "The BirthdayCounter" Nov 11, 2002 - Although this is not a release, I am going to mention it because it - came out 2 years after MPlayer v0.01. - Happy birthday, MPlayer! - - - MPlayer 0.90rc1 "The CodecCounter" Dec 7, 2002 - Again not a release, but after adding Sorenson 3 (QuickTime) - and Windows Media 9 support, MPlayer is the - world's first movie player with support for all known video formats! - - - MPlayer 0.90 "The CounterCounter" Apr 6, 2003 - After more than 1 year, we finally concluded that the code was indeed - stable again, and ready to be published as a release. Unfortunately we - forgot even to increase the version number, and other annoying bugs went - in, so get ready for... - - - MPlayer 0.91 Aug 13, 2003 - The above mentioned and lot of other bugs have been fixed. - This is the latest stable version. - - - MPlayer 1.0pre1 "Development on the beach" Sep 1, 2003 - Although this is not a stable release, I am going to mention - it because it is the first pre version of the 1.0 series of MPlayer - and it is intended to help the big bug hunting party. - This is a huge step forward! - - - MPlayer 1.0 date yet unknown - +mpg12play v0.1-v0.3: Sep 22-25, 2000 + + +The first try, hacked together in a half hour! I've used libmpeg3 +from up to the version 0.3, but +there were image quality and speed problems with it. + + + + + +mpg12play v0.5-v0.87: Sep 28-Oct 20, 2000 + + +MPEG codec replaced with DVDview by Dirk Farin, it was a +great stuff, but it was slow and was written in C++ (A'rpi hates C++!!!) + + + + + +mpg12play v0.9-v0.95pre5: Oct 21-Nov 2, 2000 + + +MPEG codec was libmpeg2 (mpeg2dec) by Aaron Holtzman and +Michel Lespinasse. It's great, optimized very fast C code with perfect +image quality and 100% MPEG standard conformance. + + + + + +MPlayer v0.3-v0.9: Nov 18-Dec 4, 2000 + + +It was a pack of two programs: mpg12play v0.95pre6 and my +new simple AVI player 'avip' based on avifile's Win32 DLL loader. + + + + + +MPlayer v0.10: Jan 1, 2001 + +The MPEG and AVI player in a single binary! + + + + + +MPlayer v0.11pre series: + + +Some new developers joined and since 0.11 the MPlayer +project is a team-work! Added ASF file support, and OpenDivX +(see ) en/decoding. + + + + + +MPlayer v0.17a "The IdegCounter": Apr 27, 2001 + + +The release version of the 0.11pre after 4 months of heavy +development! Try it, and be amazed! Thousands of new features added... +and of course old code was improved too, bugs removed etc. + + + + + +MPlayer 0.18 "The BugCounter": Jul 9, 2001 + + +2 months since 0.17 and here's a new release.. Completed ASF +support, more subtitle formats, introduced libao (similar to libvo but to +audio), even more stable than ever, and so on. It's a MUST! + + + + + +MPlayer 0.50 "The Faszom(C)ounter": Oct 8, 2001 + + +Hmm. Release again. Tons of new features, beta GUI version, +bugs fixed, new vo and ao drivers, ported to many systems, including +opensource DivX codecs and much more. Try it! + + + + + +MPlayer 0.60 "The RTFMCounter": Jan 3, 2002 + + +MOV/VIVO/RM/FLI/NUV fileformats support, native CRAM, Cinepak, +ADPCM codecs, and support for XAnim's binary codecs; DVD subtitles support, +first release of MEncoder, TV grabbing, cache, +liba52, countless fixes. + + + + + +MPlayer 0.90pre10 "The BirthdayCounter" Nov 11, 2002 + + +Although this is not a release, I am going to mention it because it +came out 2 years after MPlayer v0.01. +Happy birthday, MPlayer! + + + + + +MPlayer 0.90rc1 "The CodecCounter" Dec 7, 2002 + + +Again not a release, but after adding Sorenson 3 (QuickTime) +and Windows Media 9 support, MPlayer is the +world's first movie player with support for all known video formats! + + + + + +MPlayer 0.90 "The CounterCounter" Apr 6, 2003 + + +After more than 1 year, we finally concluded that the code was indeed +stable again, and ready to be published as a release. Unfortunately we +forgot even to increase the version number, and other annoying bugs went +in, so get ready for... + + + + + +MPlayer 0.91 Aug 13, 2003 + + +The above mentioned and lot of other bugs have been fixed. +This is the latest stable version. + + + + + +MPlayer 1.0pre1 "Development on the beach" Sep 1, 2003 + + +Although this is not a stable release, I am going to mention it because it is +the first pre version of the 1.0 series of MPlayer +and it is intended to help the big bug hunting party. +This is a huge step forward! + + + + + +MPlayer 1.0 date yet unknown + + -
diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/install.xml --- a/DOCS/xml/en/install.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/install.xml Fri Dec 08 11:38:06 2006 +0000 @@ -17,6 +17,10 @@ answers. + + + + Software requirements @@ -29,63 +33,66 @@ gcc - recommended versions are 2.95 and 3.4+. 2.96 and 3.0.x are known to generate faulty code, 3.1 and 3.2 also had problems, 3.3 some minor ones. On PowerPC, use 4.x. - + Xorg/XFree86 - recommended version is 4.3 or later. Make sure the development packages are installed, too, otherwise it won't work. You don't absolutely need X, some video output drivers work without it. - + make - recommended version is 3.79.x or later. To build the XML documentation you need 3.80. - + FreeType - optional, required to have a font for the OSD and subtitles. At least 2.0.9 is required. - + libjpeg - optional JPEG en/decoder, required for the JPEG video output driver and decoding MJPEG video - + libpng - optional (M)PNG en/decoder, required for the GUI and the PNG video output driver - + lame - 3.90 or later is recommended, necessary for encoding MP3 audio with MEncoder. - + zlib - recommended, necessary for compressed MOV header and PNG support - + LIVE555 Streaming Media - optional, needed for some RTSP/RTP streams - + directfb - optional, use 0.9.13 or later. - + cdparanoia - optional, for CDDA support - + libxmms - optional, for XMMS input plugin support. At least 1.2.7 is required. - + libsmb - optional, for smb networking support - + ALSA - optional, for ALSA audio output support. At least 0.9.0rc4 is required. - + + + + Features @@ -93,26 +100,28 @@ Decide if you need GUI. If you do, see the GUI section before compiling. - + If you want to install MEncoder (our great all-purpose encoder), see the MEncoder section. - + If you have a V4L compatible TV tuner card, - and wish to watch/grab and encode movies with MPlayer, + and wish to watch/grab and encode movies with + MPlayer, read the TV input section. - + - If you have a V4L compatible radio tuner card, - and wish to listen and capture sound with MPlayer, + If you have a V4L compatible radio tuner + card, and wish to listen and capture sound with + MPlayer, read the radio section. - + There is a neat OSD Menu support ready to be used. Check the OSD menu section. - + @@ -120,7 +129,8 @@ ./configure make -make install +make install + @@ -141,12 +151,11 @@ codecs.conf will be ignored completely. Do not do this unless you want to fiddle with MPlayer internals as this can can cause many problems. If you want to change the codecs -search order, use the , , , -or options either on the command line or in your -config file (see the manual page). +search order, use the , , +, or options either on the command +line or in your config file (see the manual page). - Debian users can build a .deb package for themselves, it's very simple. Just exec @@ -173,18 +182,20 @@ font file and telling MPlayer to use it. See the Subtitles and OSD section for details. - - + + + What about the GUI? The GUI needs GTK 1.2.x or GTK 2.0 (it isn't fully GTK, but the panels are). -The skins are stored in PNG format, so GTK, libpng -(and their devel stuff, usually called gtk-dev +The skins are stored in PNG format, so GTK, +libpng (and their devel stuff, usually +called gtk-dev and libpng-dev) has to be installed. You can build it by specifying during ./configure. Then, to turn on GUI mode, you have to @@ -207,7 +218,9 @@ - + + + Fonts and OSD @@ -220,6 +233,7 @@ encodings. + TrueType fonts @@ -253,6 +267,7 @@ + bitmap fonts @@ -284,15 +299,16 @@ file the same name as your video file with a .utf extension and have it in the same directory as the video file. - + OSD menu -MPlayer has a completely user definiable OSD Menu interface. +MPlayer has a completely user definiable +OSD Menu interface. @@ -302,56 +318,60 @@ Installation - compile MPlayer by passing the - to ./configure - + compile MPlayer by passing the + to ./configure + make sure you have an OSD font installed - + copy etc/menu.conf to your .mplayer directory - + copy etc/input.conf to your - .mplayer directory, or to the system-wide - MPlayer config dir (default: + .mplayer directory, or to the + system-wide MPlayer config dir (default: /usr/local/etc/mplayer) - + check and edit input.conf to enable menu movement keys (it is described there). - + start MPlayer by the following example: $ mplayer -menu file.avi push any menu key you defined - + - - + + + RTC + There are three timing methods in MPlayer. -To use the old method, you don't have to do + To use the old method, you don't have to do anything. It uses usleep() to tune A/V sync, with +/- 10ms accuracy. However sometimes the sync has to be tuned even finer. - - -The new timer code uses the RTC (RealTime Clock) - for this task, because it has precise 1ms timers. The - option enables it, but a properly set up kernel is required. + + + + The new timer code uses the RTC (RealTime + Clock) for this task, because it has precise 1ms timers. + The option enables it, + but a properly set up kernel is required. If you are running kernel 2.4.19pre8 or later you can adjust the maximum RTC frequency for normal users through the /proc filesystem. Use one of the following two commands to @@ -362,19 +382,20 @@ /etc/sysctl.conf. - You can see the new timer's efficiency in the status line. - The power management functions of some notebook BIOSes with speedstep CPUs - interact badly with RTC. Audio and video may get out of sync. Plugging the - external power connector in before you power up your notebook seems to help. - In some hardware combinations (confirmed during usage of non-DMA DVD drive - on an ALi1541 board) usage of the RTC timer causes skippy playback. It's - recommended to use the third method in these cases. - - + You can see the new timer's efficiency in the status line. + The power management functions of some notebook BIOSes with speedstep CPUs + interact badly with RTC. Audio and video may get out of sync. Plugging the + external power connector in before you power up your notebook seems to help. + In some hardware combinations (confirmed during usage of non-DMA DVD drive + on an ALi1541 board) usage of the RTC timer causes skippy playback. It's + recommended to use the third method in these cases. + + + The third timer code is turned on with the option. It has the efficiency of the RTC, but it doesn't use RTC. On the other hand, it requires more CPU. - + diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/mencoder.xml --- a/DOCS/xml/en/mencoder.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/mencoder.xml Fri Dec 08 11:38:06 2006 +0000 @@ -39,35 +39,35 @@ Audio codec nameDescription - - mp3lame - encode to VBR, ABR or CBR MP3 with LAME - - - lavc - use one of libavcodec's audio codecs - - - - faac - FAAC AAC audio encoder - - - toolame - MPEG Audio Layer 2 encoder - - - twolame - MPEG Audio Layer 2 encoder based on tooLAME - - - pcm - uncompressed PCM audio - - - copy - do not reencode, just copy compressed frames - + + mp3lame + encode to VBR, ABR or CBR MP3 with LAME + + + lavc + use one of libavcodec's audio codecs + + + + faac + FAAC AAC audio encoder + + + toolame + MPEG Audio Layer 2 encoder + + + twolame + MPEG Audio Layer 2 encoder based on tooLAME + + + pcm + uncompressed PCM audio + + + copy + do not reencode, just copy compressed frames + @@ -81,35 +81,35 @@ Video codec nameDescription - - lavc - use one of libavcodec's video codecs - - - - xvid - Xvid, MPEG-4 Advanced Simple Profile (ASP) codec - - - x264 - x264, MPEG-4 Advanced Video Coding (AVC), AKA H.264 codec - - - nuv - nuppel video, used by some realtime applications - - - raw - uncompressed video frames - - - copy - do not reencode, just copy compressed frames - - - frameno - used for 3-pass encoding (not recommended) - + + lavc + use one of libavcodec's video codecs + + + + xvid + Xvid, MPEG-4 Advanced Simple Profile (ASP) codec + + + x264 + x264, MPEG-4 Advanced Video Coding (AVC), AKA H.264 codec + + + nuv + nuppel video, used by some realtime applications + + + raw + uncompressed video frames + + + copy + do not reencode, just copy compressed frames + + + frameno + used for 3-pass encoding (not recommended) + @@ -133,27 +133,27 @@ Container format nameDescription - - lavf - one of the containers supported by - libavformat - - - avi - Audio-Video Interleaved - - - mpeg - MPEG-1 and MPEG-2 PS - - - rawvideo - raw video stream (no muxing - one video stream only) - - - rawaudio - raw audio stream (no muxing - one audio stream only) - + + lavf + one of the containers supported by + libavformat + + + avi + Audio-Video Interleaved + + + mpeg + MPEG-1 and MPEG-2 PS + + + rawvideo + raw video stream (no muxing - one video stream only) + + + rawaudio + raw audio stream (no muxing - one audio stream only) + @@ -185,54 +185,54 @@ Description - - mpg - MPEG-1 and MPEG-2 PS - - - asf - Advanced Streaming Format - - - avi - Audio-Video Interleaved - - - wav - Waveform Audio - - - swf - Macromedia Flash - - - flv - Macromedia Flash video - - - rm - RealMedia - - - au - SUN AU - - - nut - NUT open container (experimental and not yet spec-compliant) - - - mov - QuickTime - - - mp4 - MPEG-4 format - - - dv - Sony Digital Video container - + + mpg + MPEG-1 and MPEG-2 PS + + + asf + Advanced Streaming Format + + + avi + Audio-Video Interleaved + + + wav + Waveform Audio + + + swf + Macromedia Flash + + + flv + Macromedia Flash video + + + rm + RealMedia + + + au + SUN AU + + + nut + NUT open container (experimental and not yet spec-compliant) + + + mov + QuickTime + + + mp4 + MPEG-4 format + + + dv + Sony Digital Video container + @@ -247,8 +247,8 @@ MPlayer. - -Example: + +encode to Macromedia Flash format Creating a Macromedia Flash video suitable for playback in a web browser with the Macromedia Flash plugin: @@ -258,7 +258,7 @@ -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 - + @@ -318,11 +318,11 @@ Encoding two pass MPEG-4 ("DivX") -The name comes from the fact that this method encodes the file twice. -The first encoding (dubbed pass) creates some temporary files -(*.log) with a size of few megabytes, do not delete -them yet (you can delete the AVI or rather just not create any video by -redirecting it into /dev/null). +The name comes from the fact that this method encodes the file +twice. The first encoding (dubbed pass) creates some +temporary files (*.log) with a size of few megabytes, do +not delete them yet (you can delete the AVI or rather just not create any video +by redirecting it into /dev/null). In the second pass, the two pass output file is created, using the bitrate data from the temporary files. The resulting file will have much better image quality. If this is the first @@ -556,16 +556,16 @@ MEncoder is capable of creating movies from one -or more JPEG, PNG, TGA, or other image files. With simple framecopy it can create MJPEG -(Motion JPEG), MPNG (Motion PNG) or MTGA (Motion TGA) files. +or more JPEG, PNG, TGA, or other image files. With simple framecopy it can +create MJPEG (Motion JPEG), MPNG (Motion PNG) or MTGA (Motion TGA) files. Explanation of the process: - MEncoder decodes the input image(s) with - libjpeg (when decoding PNGs, it - will use libpng). + MEncoder decodes the input + image(s) with libjpeg (when decoding + PNGs, it will use libpng). MEncoder then feeds the decoded image to the @@ -600,8 +600,8 @@ -Creating an MPEG-4 file from explicit list of JPEG files (list.txt in current directory -contains the list of files to use as source, one per line): +Creating an MPEG-4 file from explicit list of JPEG files (list.txt in current +directory contains the list of files to use as source, one per line): mencoder mf://@list.txt -mf w=800:h=600:fps=25:type=jpg \ -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi @@ -629,7 +629,8 @@ -Width must be integer multiple of 4, it is a limitation of the RAW RGB AVI format. +Width must be integer multiple of 4, it is a limitation of the RAW RGB AVI +format. @@ -737,9 +738,9 @@ MPEG-4 has a unique feature: the video stream can contain its needed aspect -ratio. Yes, just like MPEG-1/2 (DVD, SVCD) and H.263 files. Regretfully, there are -few video players apart from MPlayer that support this -MPEG-4 attribute. +ratio. Yes, just like MPEG-1/2 (DVD, SVCD) and H.263 files. Regretfully, there +are few video players apart from MPlayer that +support this MPEG-4 attribute. diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/ports.xml --- a/DOCS/xml/en/ports.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/ports.xml Fri Dec 08 11:38:06 2006 +0000 @@ -5,16 +5,21 @@ Linux + The main development platform is Linux on x86, although MPlayer works on many other Linux ports. Binary packages of MPlayer are available from several -sources. However, none of these packages are supported. +sources. +However, none of these packages are supported. Report problems to the authors, not to us. + + Debian packaging + To build a Debian package, run the following command in the MPlayer source directory: @@ -49,16 +54,21 @@ + + RPM packaging + Dominik Mierzejewski created and maintains the official RPM packages of -MPlayer for Red Hat and Fedora Core. They are available +MPlayer for Red Hat and Fedora Core. They are +available from his repository. -Mandrake/Mandriva RPM packages are available from the P.L.F.. +Mandrake/Mandriva RPM packages are available from the +P.L.F.. SuSE used to include a crippled version of MPlayer in their distribution. They have removed it in their latest releases. You can get working RPMs from @@ -66,13 +76,17 @@ + + ARM + -MPlayer works on Linux PDAs with ARM CPU e.g. Sharp Zaurus, -Compaq Ipaq. The easiest way to obtain MPlayer is to get it -from one of the OpenZaurus package feeds. If -you want to compile it yourself, you should look at the +MPlayer works on Linux PDAs with ARM CPU e.g. Sharp +Zaurus, Compaq Ipaq. The easiest way to obtain +MPlayer is to get it from one of the +OpenZaurus package feeds. +If you want to compile it yourself, you should look at the mplayer and the libavcodec @@ -83,8 +97,13 @@ + + + + *BSD + MPlayer runs on all known BSD flavors. There are ports/pkgsrc/fink/etc versions of MPlayer @@ -97,8 +116,9 @@ -If MPlayer complains about not finding /dev/cdrom -or /dev/dvd, create an appropriate symbolic link: +If MPlayer complains about not finding +/dev/cdrom or /dev/dvd, +create an appropriate symbolic link: ln -s /dev/your_cdrom_device /dev/cdrom @@ -109,9 +129,11 @@ where this is the default). + FreeBSD + If your CPU has SSE, recompile your kernel with "options CPU_ENABLE_SSE" (FreeBSD-STABLE or kernel @@ -119,27 +141,38 @@ + + OpenBSD + Due to limitations in different versions of gas (relocation vs MMX), you will need to compile in two steps: First make sure that the non-native as is first in your $PATH and do a gmake -k, then make sure that the native version is used and do gmake. + As of OpenBSD 3.4 the hack above is no longer needed. + + Darwin + See the Mac OS section. + + + + Commercial Unix @@ -150,16 +183,20 @@ adjustments to make the build work. + + Solaris + MPlayer should work on Solaris 2.6 or newer. Use the SUN audio driver with the option for sound. -On UltraSPARCs, MPlayer -takes advantage of their VIS extensions +On UltraSPARCs, +MPlayer takes advantage of their +VIS extensions (equivalent to MMX), currently only in libmpeg2, libvo @@ -172,18 +209,17 @@ Caveat: -mediaLib is -currently disabled by default in -MPlayer because of brokenness. SPARC users -who build MPlayer with mediaLib support have reported a thick, -green-tint on video encoded and decoded with libavcodec. You may enable -it if you wish with: - -$ ./configure --enable-mlib - -You do this at your own risk. x86 users should -never use mediaLib, as this will -result in very poor MPlayer performance. + + mediaLib is + currently disabled by default in + MPlayer because of brokenness. SPARC users + who build MPlayer with mediaLib support have reported a thick, + green-tint on video encoded and decoded with libavcodec. You may enable + it if you wish with: + ./configure --enable-mlib + You do this at your own risk. x86 users should + never use mediaLib, as this will + result in very poor MPlayer performance. @@ -193,8 +229,8 @@ Solaris make will not work. Typical error you get when building with Solaris' make instead of GNU make: - % /usr/ccs/bin/make - make: Fatal error in reader: Makefile, line 25: Unexpected end of line seen +% /usr/ccs/bin/make +make: Fatal error in reader: Makefile, line 25: Unexpected end of line seen @@ -207,13 +243,15 @@ On Solaris x86, you need the GNU assembler and the GNU C/C++ compiler, configured to use the GNU assembler! The MPlayer code on the x86 platform makes heavy use of MMX, SSE and 3DNOW! instructions -that cannot be compiled using Sun's assembler /usr/ccs/bin/as. +that cannot be compiled using Sun's assembler +/usr/ccs/bin/as. -The configure script tries to find out, which -assembler program is used by your "gcc" command (in case the autodetection -fails, use the +The configure script tries to find out, which assembler +program is used by your "gcc" command (in case the autodetection +fails, use the + option to tell the configure script where it can find GNU "as" on your system). @@ -221,35 +259,38 @@ Solutions to common problems: -Error message from configure on a Solaris x86 system using -GCC without GNU assembler: - - % configure - ... - Checking assembler (/usr/ccs/bin/as) ... , failed - Please upgrade(downgrade) binutils to 2.10.1... - -(Solution: Install and use a gcc configured with ) + Error message from configure on a Solaris x86 system + using GCC without GNU assembler: + +% configure +... +Checking assembler (/usr/ccs/bin/as) ... , failed +Please upgrade(downgrade) binutils to 2.10.1... + (Solution: Install and use a gcc configured with + ) -Typical error you get when building with a GNU C compiler that does not use GNU as: +Typical error you get when building with a GNU C compiler that does not +use GNU as: - % gmake - ... - gcc -c -Iloader -Ilibvo -O4 -march=i686 -mcpu=i686 -pipe -ffast-math - -fomit-frame-pointer -I/usr/local/include -o mplayer.o mplayer.c - Assembler: mplayer.c - "(stdin)", line 3567 : Illegal mnemonic - "(stdin)", line 3567 : Syntax error - ... more "Illegal mnemonic" and "Syntax error" errors ... +% gmake +... +gcc -c -Iloader -Ilibvo -O4 -march=i686 -mcpu=i686 -pipe -ffast-math + -fomit-frame-pointer -I/usr/local/include -o mplayer.o mplayer.c +Assembler: mplayer.c +"(stdin)", line 3567 : Illegal mnemonic +"(stdin)", line 3567 : Syntax error +... more "Illegal mnemonic" and "Syntax error" errors ... -MPlayer may segfault when decoding -and encoding video that uses the win32codecs: - + + MPlayer may segfault when decoding + and encoding video that uses the win32codecs: + ... Trying to force audio codec driver family acm... Opening audio decoder: [acm] Win32/ACM decoders @@ -258,50 +299,56 @@ MPlayer interrupted by signal 11 in module: init_audio_codec -... - -This is because of a change to sysi86() in Solaris 10 and pre-Solaris -Nevada b31 releases. This has been fixed in Solaris Nevada b32; -however, Sun has yet to backport the fix to Solaris 10. The MPlayer -Project has made Sun aware of the problem and a patch is currently in -progress for Solaris 10. More information about this bug can be found -at: -. - - +... + This is because of a change to sysi86() in Solaris 10 and pre-Solaris + Nevada b31 releases. This has been fixed in Solaris Nevada b32; + however, Sun has yet to backport the fix to Solaris 10. The MPlayer + Project has made Sun aware of the problem and a patch is currently in + progress for Solaris 10. More information about this bug can be found + at: + . + -Due to bugs in Solaris 8, you may not be able to play DVD discs larger than 4 GB: +Due to bugs in Solaris 8, +you may not be able to play DVD discs larger than 4 GB: -The sd(7D) driver on Solaris 8 x86 has a bug when accessing a disk block >4GB -on a device using a logical blocksize != DEV_BSIZE (i.e. CD-ROM and DVD media). -Due to a 32Bit int overflow, a disk address modulo 4GB is accessed -(). -This problem does not exist in the SPARC version of Solaris 8. + The sd(7D) driver on Solaris 8 x86 has a bug when accessing a disk block >4GB + on a device using a logical blocksize != DEV_BSIZE + (i.e. CD-ROM and DVD media). + Due to a 32Bit int overflow, a disk address modulo 4GB is accessed + (). + This problem does not exist in the SPARC version of Solaris 8. -A similar bug is present in the hsfs(7FS) filesystem code (AKA ISO9660), -hsfs may not not support partitions/disks larger than 4GB, all data is -accessed modulo 4GB -(). -The hsfs problem can be fixed by installing patch 109764-04 (sparc) / 109765-04 (x86). + A similar bug is present in the hsfs(7FS) filesystem code (AKA ISO9660), + hsfs may not not support partitions/disks larger than 4GB, all data is + accessed modulo 4GB + (). + The hsfs problem can be fixed by installing + patch 109764-04 (sparc) / 109765-04 (x86). + + IRIX + You can either try to install the GNU install program, and (if you did not put it in your global path) then point to the location with: -./configure --with-install=/path/and/name/of/install + +./configure --with-install=/path/and/name/of/install + @@ -309,15 +356,15 @@ you will have to edit the Makefile by hand a little bit. Change the following two lines: - $(INSTALL) -c -m 644 DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1 +$(INSTALL) -c -m 644 DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1 - $(INSTALL) -c -m 644 etc/codecs.conf $(CONFDIR)/codecs.conf +$(INSTALL) -c -m 644 etc/codecs.conf $(CONFDIR)/codecs.conf to: - $(INSTALL) -m 644 mplayer.1 $(MANDIR)/man1/ +$(INSTALL) -m 644 mplayer.1 $(MANDIR)/man1/ - $(INSTALL) -m 644 codecs.conf $(CONFDIR)/ +$(INSTALL) -m 644 codecs.conf $(CONFDIR)/ And then do (from within the MPlayer source dir): cp DOCS/mplayer.1 . ; cp etc/codecs.conf . @@ -325,9 +372,11 @@ + HP-UX + Joe Page hosts a detailed HP-UX MPlayer HOWTO @@ -347,7 +396,6 @@ Create the DVD device scan the SCSI bus with: - # ioscan -fn @@ -364,89 +412,81 @@ ... - The screen output shows a Pioneer DVD-ROM at SCSI address 2. The card instance for hardware path 8/16 is 1. Create a link from the raw device to the DVD device. - - -# ln -s /dev/rdsk/c<SCSI bus instance>t<SCSI target ID>d<LUN> /dev/<device> +ln -s /dev/rdsk/c<SCSI bus instance>t<SCSI target ID>d<LUN> /dev/<device> - - Example: +ln -s /dev/rdsk/c1t2d0 /dev/dvd - -# ln -s /dev/rdsk/c1t2d0 /dev/dvd - - Below are solutions for some common problems: - - -Crash at Start with the following error message: - -/usr/lib/dld.sl: Unresolved symbol: finite (code) from /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2/../../../libGL.sl - - - - -This means that the function .finite(). is not -available in the standard HP-UX math library. -Instead there is .isfinite().. -Solution: Use the latest Mesa depot file. - + + Crash at Start with the following error message: + +/usr/lib/dld.sl: Unresolved symbol: finite (code) from /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2/../../../libGL.sl + + + This means that the function .finite(). is not + available in the standard HP-UX math library. + Instead there is .isfinite().. + Solution: Use the latest Mesa depot file. + - -Crash at playback with the following error message: - -/usr/lib/dld.sl: Unresolved symbol: sem_init (code) from /usr/local/lib/libSDL-1.2.sl.0 - - - - -Solution: Use the extralibdir option of configure - - + + Crash at playback with the following error message: + +/usr/lib/dld.sl: Unresolved symbol: sem_init (code) from /usr/local/lib/libSDL-1.2.sl.0 + + + Solution: Use the extralibdir option of configure + + - -MPlayer segfaults with a message like this: - + + MPlayer segfaults with a message like this: + Pid 10166 received a SIGSEGV for stack growth failure. Possible causes: insufficient memory or swap space, or stack size exceeded maxssiz. -Segmentation fault - - - - -Solution: -The HP-UX kernel has a default stack size of 8MB(?) per process.(11.0 and -newer 10.20 patches let you increase maxssiz up to -350MB for 32-bit programs). You need to extend maxssiz -and recompile the kernel (and reboot). You can use SAM to do this. (While at -it, check out the maxdsiz parameter for the maximum -amount of data a program can use. It depends on your applications, if the -default of 64MB is enough or not.) - +Segmentation fault + + + Solution: + The HP-UX kernel has a default stack size of 8MB(?) per process.(11.0 and + newer 10.20 patches let you increase maxssiz up to + 350MB for 32-bit programs). You need to extend + maxssiz and recompile the kernel (and reboot). + You can use SAM to do this. + (While at it, check out the maxdsiz parameter for + the maximum amount of data a program can use. + It depends on your applications, if the default of 64MB is enough or not.) + + + - + AIX + MPlayer builds successfully on AIX 5.1, 5.2, and 5.3, using GCC 3.3 or greater. Building @@ -469,26 +509,25 @@ -604e -POWER3 -POWER4 + 604e + POWER3 + POWER4 The following architectures are untested, but should still work: + + POWER + POWER2 + POWER5 + - -POWER -POWER2 -POWER5 - Sound via the Ultimedia Services is not supported, as Ultimedia was dropped in AIX 5.1; therefore, the only option is to use the AIX Open -Sound System (OSS) drivers from 4Front Technologies at http://www.opensound.com/aix.html -. +Sound System (OSS) drivers from 4Front Technologies at +http://www.opensound.com/aix.html. 4Front Technologies freely provides OSS drivers for AIX 5.1 for non-commercial use; however, there are currently no sound output drivers for AIX 5.2 or 5.3. This means AIX 5.2 @@ -500,99 +539,103 @@ -If you encounter this error message from configure: - + If you encounter this error message from ./configure: + $ ./configure ... Checking for iconv program ... no No working iconv program found, use --charset=US-ASCII to continue anyway. -Messages in the GTK-2 interface will be broken then. - -This is because AIX uses non-standard character set names; therefore, -converting MPlayer output to another character set is currently not -supported. The solution is to use: - -$ ./configure --charset=noconv - - +Messages in the GTK-2 interface will be broken then. + This is because AIX uses non-standard character set names; therefore, + converting MPlayer output to another character set is currently not + supported. The solution is to use: + $ ./configure --charset=noconv + - + + + + Windows -Yes, MPlayer runs on Windows under - Cygwin and - MinGW. - It does not have an official GUI yet, but the command line version - is completely functional. You should check out the - MPlayer-cygwin - mailing list for help and latest information. - Official Windows binaries can be found on the - download page. - Installer packages and simple GUI frontends are available from external - sources, we have collected then in the Windows section of our - projects page. + +Yes, MPlayer runs on Windows under +Cygwin +and +MinGW. +It does not have an official GUI yet, but the command line version +is completely functional. You should check out the +MPlayer-cygwin +mailing list for help and latest information. +Official Windows binaries can be found on the +download page. +Installer packages and simple GUI frontends are available from external +sources, we have collected then in the Windows section of our +projects page. -If you wish to avoid using the command line, a simple trick is - to put a shortcut on your desktop that contains something like the - following in the execute section: - c:\path\to\mplayer.exe %1 - This will make MPlayer play any movie that is - dropped on the shortcut. Add for fullscreen mode. + +If you wish to avoid using the command line, a simple trick is +to put a shortcut on your desktop that contains something like the +following in the execute section: +c:\path\to\mplayer.exe %1 +This will make MPlayer play any movie that is +dropped on the shortcut. Add for fullscreen mode. -Best results are achieved with the native DirectX video output driver - (). Alternatives are OpenGL and SDL, but OpenGL - performance varies greatly between systems and SDL is known to - distort video or crash on some systems. If the image is - distorted, try turning off hardware acceleration with - . Download - DirectX 7 header files - to compile the DirectX video output driver. Furthermore you need to have - DirectX 7 or later installed for the DirectX video output driver to work. - - -VIDIX now works under Windows as - , although it is still experimental - and needs a bit of manual setup. Download - dhahelper.sys or - dhahelper.sys (with MTRR support) - and copy it to the - libdha/dhahelperwin directory in your - MPlayer source tree. - Open a console and change to that directory. Then type - - gcc -o dhasetup.exe dhasetup.c + +Best results are achieved with the native DirectX video output driver +(). Alternatives are OpenGL and SDL, but OpenGL +performance varies greatly between systems and SDL is known to +distort video or crash on some systems. If the image is +distorted, try turning off hardware acceleration with +. Download +DirectX 7 header files +to compile the DirectX video output driver. Furthermore you need to have +DirectX 7 or later installed for the DirectX video output driver to work. + - and execute - - dhasetup.exe install - - as Administrator. After that you will have to reboot. When you are - done, copy the .so files from - vidix/drivers to the - mplayer/vidix directory - relative to your mplayer.exe. + +VIDIX now works under Windows as +, although it is still experimental +and needs a bit of manual setup. Download +dhahelper.sys or +dhahelper.sys (with MTRR support) +and copy it to the libdha/dhahelperwin +directory in your MPlayer source tree. +Open a console and change to that directory. Then type +gcc -o dhasetup.exe dhasetup.c +and execute +dhasetup.exe install +as Administrator. After that you will have to reboot. When you are +done, copy the .so files from +vidix/drivers to the +mplayer/vidix directory +relative to your mplayer.exe. + -For best results MPlayer should use a - colorspace that your video card supports in hardware. Unfortunately many - Windows graphics drivers wrongly report some colorspaces as supported in - hardware. To find out which, try - - mplayer -benchmark -nosound -frames 100 -vf format=colorspace movie - - where colorspace can be any colorspace - printed by the option. If you - find a colorspace your card handles particularly bad - - will keep it from being used. Add this to your config file to permanently - keep it from being used. + +For best results MPlayer should use a +colorspace that your video card supports in hardware. Unfortunately many +Windows graphics drivers wrongly report some colorspaces as supported in +hardware. To find out which, try + +mplayer -benchmark -nosound -frames 100 -vf format=colorspace movie + +where colorspace can be any colorspace +printed by the option. If you +find a colorspace your card handles particularly bad + +will keep it from being used. Add this to your config file to permanently +keep it from being used. + There are special codec packages for Windows available on our download page @@ -604,83 +647,102 @@ only on Cygwin) to configure. We have had some reports that Real DLLs need to be writable by the user running MPlayer, but only on some systems (NT4). - Try making them writable if you have problems. - -You can play VCDs by playing the .DAT or .MPG files - that Windows exposes on VCDs. It works like this (adjust for the drive letter - of your CD-ROM): - -mplayer d:/mpegav/avseq01.dat + Try making them writable if you have problems. + -DVDs also work, adjust for the drive letter - of your DVD-ROM: - -mplayer dvd://<title> -dvd-device d: - -The Cygwin/MinGW - console is rather slow. Redirecting output or using the - option has been reported to improve performance on - some systems. Direct rendering () may also help. - If playback is jerky, try - . If some of these options help you, you - may want to put them in your config file. + +You can play VCDs by playing the .DAT or +.MPG files that Windows exposes on VCDs. It works like +this (adjust for the drive letter of your CD-ROM): +mplayer d:/mpegav/avseq01.dat +DVDs also work, adjust for the drive letter +of your DVD-ROM: + +mplayer dvd://<title> -dvd-device d: + +The Cygwin/MinGW +console is rather slow. Redirecting output or using the + option has been reported to improve performance on +some systems. Direct rendering () may also help. +If playback is jerky, try +. If some of these options help you, you +may want to put them in your config file. + - -On Windows the runtime CPU detection disables SSE support - because of recurring and hard-to-trace SSE-related crashes. If you - wish to have SSE support under Windows, you will have to compile without - runtime CPU-detection. + +On Windows the runtime CPU detection disables SSE support +because of recurring and hard-to-trace SSE-related crashes. If you +wish to have SSE support under Windows, you will have to compile without +runtime CPU-detection. -If you have a Pentium 4 and are experiencing a crash using the - RealPlayer codecs, you may need to disable hyperthreading support. + +If you have a Pentium 4 and are experiencing a crash using the +RealPlayer codecs, you may need to disable hyperthreading support. - + <application>Cygwin</application> -You need to run Cygwin 1.5.0 or later in - order to compile MPlayer. + +You need to run Cygwin 1.5.0 or later in +order to compile MPlayer. + -DirectX header files need to be extracted to /usr/include/ or - /usr/local/include/. + +DirectX header files need to be extracted to +/usr/include/ or +/usr/local/include/. + -Instructions and files for making SDL run under - Cygwin can be found on the - libsdl site. - + +Instructions and files for making SDL run under +Cygwin can be found on the +libsdl site. + + <application>MinGW</application> -Installing a version of MinGW that could - compile MPlayer used to be quite tricky, but it - works out of the box now. Just install MinGW - 3.1.0 or later and MSYS 1.0.9 or later and tell the MSYS postinstall that - MinGW is installed. + +Installing a version of MinGW that could +compile MPlayer used to be quite tricky, but it +works out of the box now. Just install MinGW +3.1.0 or later and MSYS 1.0.9 or later and tell the MSYS postinstall that +MinGW is installed. + -Extract DirectX header files to /mingw/include/. + +Extract DirectX header files to +/mingw/include/. + -MOV compressed header support requires - zlib, which - MinGW does not provide by default. - Configure it with and install - it before compiling MPlayer. + +MOV compressed header support requires +zlib, +which MinGW does not provide by default. +Configure it with and install +it before compiling MPlayer. + -Complete instructions for building MPlayer - and necessary libraries can be found in the - MPlayer MinGW HOWTO. - + +Complete instructions for building MPlayer +and necessary libraries can be found in the +MPlayer MinGW HOWTO. + + - + + Mac OS @@ -736,11 +798,16 @@ PKG_CONFIG_PATH and PATH environment variables so that configure finds the libraries installed with MacPorts): -PKG_CONFIG_PATH=/opt/local/lib/pkgconfig/ PATH=$PATH:/opt/local/bin/ ./configure + +PKG_CONFIG_PATH=/opt/local/lib/pkgconfig/ PATH=$PATH:/opt/local/bin/ ./configure + + + MPlayer OS X GUI + You can get a native GUI for MPlayer together with precompiled MPlayer binaries for Mac OS X from the @@ -770,7 +837,6 @@ To check out SVN modules use: - svn checkout svn://svn.mplayerhq.hu/mplayerosx/trunk/ mplayerosx svn checkout svn://svn.mplayerhq.hu/mplayer/trunk/ main @@ -780,7 +846,6 @@ In order to build MPlayerOSX you will need to set up something like this: - MPlayer_source_directory | @@ -788,15 +853,13 @@ | |--->main_noaltivec (MPlayer Subversion source configured with --disable-altivec) | - |--->mplayerosx (MPlayer OS X Subversion source) + \--->mplayerosx (MPlayer OS X Subversion source) - You first need to build main and main_noaltivec. Next, set a global variable: - export MACOSX_DEPLOYMENT_TARGET=10.3 @@ -811,8 +874,8 @@ If you configure for a G3-powered machine without AltiVec, use: -./configure --with-termcaplib=ncurses.5 --disable-gl --disable-x11 ---disable-altivec +./configure --with-termcaplib=ncurses.5 --disable-gl --disable-x11 \ + --disable-altivec You may need to edit config.mak and change -mcpu and -mtune @@ -821,14 +884,9 @@ Continue with - -make - +make then go to the mplayerosx directory and type - - -make dist - +make dist This will create a compressed .dmg archive with the ready to use binary. @@ -841,6 +899,10 @@ + + + + Exotic Platforms @@ -851,8 +913,11 @@ For build instructions you should refer to the system-specific documentation. + + QNX + You'll need to download and install SDL for QNX. Then run MPlayer with @@ -865,10 +930,13 @@ + + Amiga/MorphOS (GeekGadgets) -The people over at www.amigasoft.net +The people over at +www.amigasoft.net make current MPlayer and MEncoder packages. @@ -882,16 +950,16 @@ Get if from MorphZone: - -MPlayer 0.91 binary + + MPlayer 0.91 binary - -MPlayer 0.91 source + + MPlayer 0.91 source - -MEncoder 1.0pre3 binary + + MEncoder 1.0pre3 binary diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/radio.xml --- a/DOCS/xml/en/radio.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/radio.xml Fri Dec 08 11:38:06 2006 +0000 @@ -12,96 +12,80 @@ description of radio options and keyboard controls. + Compilation - First, you have to recompile MPlayer using ./configure with - and (if you want capture support) + First, you have to recompile MPlayer using ./configure + with and (if you want capture support) . - + Make sure your tuner works with another radio software in Linux, for example XawTV. - + + + Usage tips + The full listing of the options is available in the manual page. Here are just a few tips: - - - -Use the option. An example: --radio channels=104.4-Sibir,103.9-Maximum -Explanation: With this option, only the 104.4 and 103.9 radio stations -will be usable. There will be a nice OSD text upon channel switching, -displaying the channel's name. Spaces in the channel name must be -replaced by the "_" character. + + Use the option. An example: + -radio channels=104.4-Sibir,103.9-Maximum + Explanation: With this option, only the 104.4 and 103.9 radio stations + will be usable. There will be a nice OSD text upon channel switching, + displaying the channel's name. Spaces in the channel name must be + replaced by the "_" character. + + + There are several ways of capturing audio. You can grab the sound either using + your sound card via an external cable connection between video card and + line-in, or using the built-in ADC in the saa7134 chip. In the latter case, + you have to load the saa7134-alsa or +saa7134-oss driver. + + + MEncoder cannot be used for audio capture, + because it requires a video stream to work. So your can either use + arecord from ALSA project or + use . In the latter case you + will not hear any sound (unless you are using a line-in cable and + have switched line-in mute off). + + - - - - -There are several ways of capturing audio. You can grab the sound either using -your sound card via an external cable connection between video card and line-in, -or using the built-in ADC in the saa7134 chip. In the latter case, you have to -load the saa7134-alsa or -saa7134-oss driver. - - - - - -MEncoder cannot be used for audio capture, because it -requires a video stream to work. So your can either use -arecord from ALSA project or -use . In the latter case you -will not hear any sound (unless you are using a line-in cable and -have switched line-in mute off). - - - + Examples - - - + Input from standard V4L (using line-in cable, capture switched off): - -mplayer radio://104.4 - - - +mplayer radio://104.4 + - - + Input from standard V4L (using line-in cable, capture switched off, V4Lv1 interface): - -mplayer -radio driver=v4l radio://104.4 - - - +mplayer -radio driver=v4l radio://104.4 + - - + Playing second channel from channel list: - -mplayer -radio channels=104.4=Sibir,103.9=Maximm radio://2 - - - +mplayer -radio channels=104.4=Sibir,103.9=Maximm radio://2 + @@ -110,7 +94,8 @@ (ALSA device hw:1,0). For saa7134-based cards either the saa7134-alsa or saa7134-oss module must be loaded. -mplayer -rawaudio rate=32000 -radio adevice=hw=1.0:arate=32000:channels=104.4=Sibir,103.9=Maximm radio://2/capture +mplayer -rawaudio rate=32000 radio://2/capture \ + -radio adevice=hw=1.0:arate=32000:channels=104.4=Sibir,103.9=Maximm When using ALSA device names colons must be replaced by equal signs, commas by periods. diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/skin.xml --- a/DOCS/xml/en/skin.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/skin.xml Fri Dec 08 11:38:06 2006 +0000 @@ -5,33 +5,39 @@ Overview + It does not really have anything to do with the skin format, but you should -know that MPlayer has no -builtin skin, so at least one skin must be installed -in order to be able to use the GUI. +know that MPlayer has +no builtin skin, so +at least one skin must be installed in order to be able +to use the GUI. + + Directories + The directories searched for skins are (in order): -$(DATADIR)/skins/ + $(DATADIR)/skins/ -$(PREFIX)/share/mplayer/skins/ + $(PREFIX)/share/mplayer/skins/ -~/.mplayer/skins/ + ~/.mplayer/skins/ -Note that the first path may vary according to the way MPlayer -was configured (see the and +Note that the first path may vary according to the way +MPlayer was configured (see the + and arguments of the configure script). @@ -42,8 +48,11 @@ + + Image formats + Images must be truecolor (24 or 32 bpp) PNGs. In the main window and in the playbar (see below) you can use images with @@ -55,6 +64,7 @@ Skin components + Skins are quite free-format (unlike the fixed-format skins of Winamp/XMMS, @@ -70,48 +80,61 @@ by a right click). - + + The main window and/or the playbar is where you can control MPlayer. The background of the window is an image. - Various items can (and must) be placed in the window: buttons, - potmeters (sliders) and labels. + Various items can (and must) be placed in the window: + buttons, potmeters (sliders) and + labels. For every item, you must specify its position and size. - + + + A button has three states (pressed, released, disabled), thus its image must be divided into three parts vertically. See the button item for details. - + + + A potmeter (mainly used for the seek bar and volume/balance control) can have any number of phases by dividing its image into different parts below each other. See hpotmeter and potmeter for details. - + + + Labels are a bit special: The characters needed to draw them are taken from an image file, and the characters in the - image are described by a font description file. + image are described by a + font description file. The latter is a plain text file which specifies the x,y position and size of each character in the image (the image file and its font description file - form a font together). See dlabel + form a font together). + See dlabel and slabel for details. - -All images can have full transparency as described in the section about + + + + All images can have full transparency as described in the section about image formats. If the X server doesn't support the XShape extension, the parts marked transparent will be black. If you'd like to use this feature, the width of the main window's background image must be dividable by 8. - + The subwindow is where the movie appears. It can display a specified image if there is no movie loaded (it is quite boring - to have an empty window :-)) Note: transparency - is not allowed here. + to have an empty window :-)) Note: + transparency is not allowed here. - + + The skin menu is just a way to control MPlayer by means of menu entries. Two images are required for the menu: one of them is the base image that shows the @@ -120,24 +143,30 @@ the mouse over the menu entries, the currently selected entry is copied from the second image over the menu entry below the mouse pointer (the second image is never shown as a whole). - + + A menu entry is defined by its position and size in the image (see the - section about the skin menu for details). - + section about the skin menu for + details). + + - There is an important thing not mentioned yet: For buttons, potmeters and - menu entries to work, MPlayer must know what to - do if they are clicked. This is done by messages - (events). For these items you must define the messages to be generated when - they are clicked. +There is an important thing not mentioned yet: For buttons, potmeters and +menu entries to work, MPlayer must know what to +do if they are clicked. This is done by messages +(events). For these items you must define the messages to be generated when +they are clicked. + + Files + You need the following files to build a skin: @@ -168,12 +197,17 @@ + + + + The skin file + As mentioned above, this is the skin configuration file. It is line oriented; -comment lines start with a ';' character at the beginning -of the line (only spaces and tabs are allowed before the ';'). +comment lines start with a ';' character at the beginning of +the line (only spaces and tabs are allowed before the ';'). @@ -189,8 +223,8 @@ -Currently there is only one application, so you need only one section: its name is -movieplayer. +Currently there is only one application, so you need only one section: its name +is movieplayer. @@ -207,10 +241,18 @@ where window name can be one of these strings: -main - for the main window -sub - for the subwindow -menu - for the skin menu -playbar - playbar + + main - for the main window + + + sub - for the subwindow + + + menu - for the skin menu + + + playbar - playbar + @@ -262,12 +304,19 @@ -Finally some words about positioning. The main window and the subwindow can -be placed in the different corners of the screen by giving X and -Y coordinates. 0 is top or left, +Here is an example to make this clear. Suppose that you have an image called +main.png that you use for the main window: +base = main, -1, -1 +MPlayer tries to load main, +main.png, main.PNG files. + + + +Finally some words about positioning. The main window and the subwindow can be +placed in the different corners of the screen by giving X +and Y coordinates. 0 is top or left, -1 is center and -2 is right or bottom, as shown in this illustration: - (0, 0)----(-1, 0)----(-2, 0) @@ -279,18 +328,13 @@ (0,-2)----(-1,-2)----(-2,-2) - - -Here is an example to make this clear. Suppose that you have an image called -main.png that you use for the main window: -base = main, -1, -1 -MPlayer tries to load main, -main.png, main.PNG files. + Main window and playbar + Below is the list of entries that can be used in the 'window = main' ... 'end', @@ -303,40 +347,44 @@ base = image, X, Y - -Lets you specify the background image to be used for the main window. -The window will appear at the given X,Y position on -the screen The window will have the size of the image. - - These coordinates do not currently work for the display window. - Transparent regions in the image (colored #FF00FF) appear black - on X servers without the XShape extension. The image's width must be dividable - by 8. - + + + Lets you specify the background image to be used for the main window. + The window will appear at the given X,Y position on + the screen The window will have the size of the image. + + + These coordinates do not currently work for the display window. + + Transparent regions in the image (colored #FF00FF) appear black + on X servers without the XShape extension. The image's width must be dividable + by 8. + button = image, X, Y, width, height, message - -Place a button of width * height size at -position X,Y. The specified message is -generated when the button is clicked. The image given by image -must have three parts below each other (according to the possible states of the -button), like this: - - - + + + Place a button of width * height size at + position X,Y. The specified message is + generated when the button is clicked. The image given by + image must have three parts below each other (according to + the possible states of the button), like this: + + + +------------+ | pressed | +------------+ | released | +------------+ | disabled | -+------------+ - - ++------------+ + @@ -344,11 +392,14 @@ decoration = enable|disable - -Enable or disable window manager decoration of the main window. Default is -disable. - - This doesn't work for the display window, there is no need to. + + + Enable or disable window manager decoration of the main window. Default is + disable. + + + This doesn't work for the display window, there is no need to. + @@ -357,8 +408,7 @@ hpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message - - + @@ -366,29 +416,29 @@ vpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message -Place a horizontal (hpotmeter) or vertical (vpotmeter) potmeter of -width * height size at position -X,Y. The image can be divided into different parts for the -different phases of the potmeter (for example, you can have a pot for volume -control that turns from green to red while its value changes from the minimum -to the maximum.). hpotmeter can have a button that can be -dragged horizontally. The parameters are: - - - button - the image to be used for the + Place a horizontal (hpotmeter) or vertical (vpotmeter) potmeter of + width * height size at position + X,Y. The image can be divided into different parts for the + different phases of the potmeter (for example, you can have a pot for volume + control that turns from green to red while its value changes from the minimum + to the maximum.). hpotmeter can have a button that can be + dragged horizontally. The parameters are: + + + button - the image to be used for the button (must have three parts below each other, like in case of button) - - bwidth, bheight - size + + + bwidth, bheight - size of the button - - phases - the image to be used for the - different phases of the hpotmeter. A special value of NULL - can be used if you want no such image. The image must be divided into - numphases parts vertically like this: - - - + + + phases - the image to be used for the + different phases of the hpotmeter. A special value of NULL + can be used if you want no such image. The image must be divided into + numphases parts vertically like this: + +------------+ | phase #1 | +------------+ @@ -397,27 +447,30 @@ ... +------------+ | phase #n | -+------------+ - - - - numphases - number of phases stored in the ++------------+ + + + numphases - number of phases stored in the phases image - - default - default value for hpotmeter + + + default - default value for hpotmeter (in the range 0 to 100) - - X, Y - position for the hpotmeter - - width, height - width and height + + + X, Y - position for the hpotmeter + + + width, height - width and height of the hpotmeter - - message - the message to be generated when the + + + message - the message to be generated when the value of hpotmeter is changed - - - - + + + @@ -425,12 +478,12 @@ potmeter = phases, numphases, default, X, Y, width, height, message -A hpotmeter without a button. (I guess it is meant to be -turned around, but it reacts to horizontal dragging only.) For the description -of the parameters see hpotmeter. -phases can be NULL, but it is quite useless, -since you cannot see where the potmeter is set. - + A hpotmeter without a button. (I guess it is meant to be + turned around, but it reacts to horizontal dragging only.) For the description + of the parameters see hpotmeter. + phases can be NULL, but it is quite + useless, since you cannot see where the potmeter is set. + @@ -438,11 +491,12 @@ font = fontfile, fontid -Defines a font. fontfile is the name of a font description file -with a .fnt extension (do not specify the extension here). -fontid is used to refer to the font (see dlabel -and slabel). Up to 25 fonts can be defined. - + Defines a font. fontfile is the name of a font description + file with a .fnt extension (do not specify the extension + here). fontid is used to refer to the font + (see dlabel + and slabel). Up to 25 fonts can be defined. + @@ -450,12 +504,13 @@ slabel = X, Y, fontid, "text" -Place a static label at the position X,Y. text -is displayed using the font identified by fontid. The text is -just a raw string ($x variables do not work) that must be enclosed -between double quotes (but the " character cannot be part of the text). The -label is displayed using the font identified by fontid. - + Place a static label at the position X,Y. + text is displayed using the font identified by + fontid. The text is just a raw string + ($x variables do not work) that must be enclosed between + double quotes (but the " character cannot be part of the text). The + label is displayed using the font identified by fontid. + @@ -463,154 +518,159 @@ dlabel = X, Y, length, align, fontid, "text" - -Place a dynamic label at the position X,Y. The label is called -dynamic because its text is refreshed periodically. The maximum length of the -label is given by length (its height is the height of a -character). If the text to be displayed is wider than that, it will be scrolled, -otherwise it is aligned within the specified space by the value of the -align parameter: 0 is for right, -1 is for center, 2 is for left. - - -The text to be displayed is given by text: It must be written -between double quotes (but the " character cannot be part of the text). The -label is displayed using the font identified by fontid. You -can use the following variables in the text: - + + Place a dynamic label at the position X,Y. The label is + called dynamic because its text is refreshed periodically. The maximum length + of the label is given by length (its height is the height + of a character). If the text to be displayed is wider than that, it will be + scrolled, + otherwise it is aligned within the specified space by the value of the + align parameter: 0 is for right, + 1 is for center, 2 is for left. + + + The text to be displayed is given by text: It must be + written between double quotes (but the " character cannot be part of the + text). The label is displayed using the font identified by + fontid. You can use the following variables in the text: + - - - - VariableMeaning - - - -$1 -play time in hh:mm:ss format - - -$2 -play time in mmmm:ss format - - -$3 -play time in hh format (hours) - - -$4 -play time in mm format (minutes) - - -$5 -play time in ss format (seconds) - - -$6 -movie length in hh:mm:ss format - - -$7 -movie length in mmmm:ss format - - -$8 -play time in h:mm:ss format - - -$v -volume in xxx.xx% format - - -$V -volume in xxx.xx format - - -$b -balance in xxx.xx% format - - -$B -balance in xxx.xx format - - -$$ -the $ character - - -$a -a character according to the audio type (none: n, -mono: m, stereo: t) - - -$t -track number (in playlist) - - -$o -filename - - -$f -filename in lower case - - -$F -filename in upper case - - -$T -a character according to the stream type (file: f, -Video CD: v, DVD: d, URL: u) - - -$p -the p character (if a movie is playing and the font has -the p character) - - -$s -the s character (if the movie is stopped and the font has -the s character) - - -$e -the e character (if playback is paused and the font has -the e character) - - -$x -movie width - - -$y -movie height - - -$C -name of the codec used - + + + + VariableMeaning + + + + $1 + play time in hh:mm:ss format + + + $2 + play time in mmmm:ss format + + + $3 + play time in hh format (hours) + + + $4 + play time in mm format (minutes) + + + $5 + play time in ss format (seconds) + + + $6 + movie length in hh:mm:ss format + + + $7 + movie length in mmmm:ss format + + + $8 + play time in h:mm:ss format + + + $v + volume in xxx.xx% format + + + $V + volume in xxx.xx format + + + $b + balance in xxx.xx% format + + + $B + balance in xxx.xx format + + + $$ + the $ character + + + $a + a character according to the audio type (none: n, + mono: m, stereo: t) + + + $t + track number (in playlist) + + + $o + filename + + + $f + filename in lower case + + + $F + filename in upper case + + + $T + + a character according to the stream type (file: f, + Video CD: v, DVD: d, + URL: u) + + + + $p + the p character (if a movie is playing and the font + has the p character) + + + $s + the s character (if the movie is stopped and the + font has the s character) + + + $e + the e character (if playback is paused and the font + has the e character) + + + $x + movie width + + + $y + movie height + + + $C + name of the codec used + + + + - - - - - + + The $a, $T, $p, $s and $e + variables all return characters that should be displayed as special symbols + (for example, e is for the pause symbol that usually looks + something like ||). You should have a font for normal characters and + a different font for symbols. See the section about + symbols for more information. + + + - -The $a, $T, $p, $s and $e -variables all return characters that should be displayed as special symbols (for -example, e is for the pause symbol that usually looks something -like ||). You should have a font for normal characters and a different font for -symbols. See the section about symbols -for more information. - - + Subwindow + The following entries can be used in the 'window = sub' . . . 'end' block. @@ -622,14 +682,15 @@ base = image, X, Y, width, height -The image to be displayed in the window. The window will appear at the given -X,Y position on the screen (0,0 is the -top left corner). You can specify -1 for center and -2 -for right (X) and bottom (Y). The window -will be as large as the image. width and height -denote the size of the window; they are optional (if they are missing, the -window is the same size as the image). - + The image to be displayed in the window. The window will appear at the given + X,Y position on the screen (0,0 is the + top left corner). You can specify -1 for center and + -2 for right (X) and bottom + (Y). The window will be as large as the image. + width and height + denote the size of the window; they are optional (if they are missing, the + window is the same size as the image). + @@ -637,17 +698,20 @@ background = R, G, B -Lets you set the background color. It is useful if the image is smaller than -the window. R, G and B -specifies the red, green and blue component of the color (each of them is a -decimal number from 0 to 255). - + Lets you set the background color. It is useful if the image is smaller than + the window. R, G and + B specifies the red, green and blue component of the color + (each of them is a decimal number from 0 to 255). + + + Skin menu + As mentioned earlier, the menu is displayed using two images. Normal menu entries are taken from the image specified by the base item, @@ -667,8 +731,8 @@ base = image -The image for normal menu entries. - + The image for normal menu entries. + @@ -676,8 +740,8 @@ selected = image -The image showing the menu with all entries selected. - + The image showing the menu with all entries selected. + @@ -685,22 +749,26 @@ menu = X, Y, width, height, message -Defines the X,Y position and the size of a menu entry in -the image. message is the message to be generated when the -mouse button is released over the entry. - + Defines the X,Y position and the size of a menu entry in + the image. message is the message to be generated when the + mouse button is released over the entry. + + + + + Fonts As mentioned in the section about the parts of a skin, a font is defined by an -image and a description file. You can place the characters anywhere in the image, -but make sure that their position and size is given in the description file -exactly. +image and a description file. You can place the characters anywhere in the +image, but make sure that their position and size is given in the description +file exactly. @@ -732,14 +800,18 @@ + + Symbols + Some characters have special meanings when returned by some of the variables used in dlabel. These characters are meant to be shown as symbols so that things like a nice DVD logo can be displayed instead of the character 'd' for a DVD stream. + The following table lists all the characters that can be used to display symbols (and thus require a different font). @@ -751,24 +823,29 @@ CharacterSymbol -pplay -sstop -epause -nno sound -mmono sound -tstereo sound -fstream is a file -vstream is a Video CD -dstream is a DVD -ustream is a URL + pplay + sstop + epause + nno sound + mmono sound + tstereo sound + fstream is a file + vstream is a Video CD + dstream is a DVD + ustream is a URL + + + + GUI messages + These are the messages that can be generated by buttons, potmeters and menu entries. @@ -779,49 +856,50 @@ evNext -Jump to next track in the playlist. - + Jump to next track in the playlist. + evPause -Forms a switch together with evPlaySwitchToPause. They can -be used to have a common play/pause button. Both messages should be assigned to -buttons displayed at the very same position in the window. This message pauses -playing and the image for the evPlaySwitchToPause button is -displayed (to indicate that the button can be pressed to continue playing). - + Forms a switch together with evPlaySwitchToPause. They can + be used to have a common play/pause button. Both messages should be assigned + to buttons displayed at the very same position in the window. This message + pauses playing and the image for the evPlaySwitchToPause + button is displayed (to indicate that the button can be pressed to continue + playing). + evPlay -Start playing. - + Start playing. + evPlaySwitchToPause -The opposite of evPauseSwitchToPlay. This message starts -playing and the image for the evPauseSwitchToPlay button -is displayed (to indicate that the button can be pressed to pause playing). - + The opposite of evPauseSwitchToPlay. This message starts + playing and the image for the evPauseSwitchToPlay button + is displayed (to indicate that the button can be pressed to pause playing). + evPrev -Jump to previous track in the playlist. - + Jump to previous track in the playlist. + evStop -Stop playing. - + Stop playing. + @@ -830,51 +908,51 @@ evBackward10sec -Seek backward 10 seconds. - + Seek backward 10 seconds. + evBackward1min -Seek backward 1 minute. - + Seek backward 1 minute. + evBackward10min -Seek backward 10 minutes. - + Seek backward 10 minutes. + evForward10sec -Seek forward 10 seconds. - + Seek forward 10 seconds. + evForward1min -Seek forward 1 minute. - + Seek forward 1 minute. + evForward10min -Seek forward 10 minutes. - + Seek forward 10 minutes. + evSetMoviePosition -Seek to position (can be used by a potmeter; the -relative value (0-100%) of the potmeter is used). - + Seek to position (can be used by a potmeter; the + relative value (0-100%) of the potmeter is used). + @@ -883,26 +961,26 @@ evHalfSize -Set the movie window to half size. - + Set the movie window to half size. + evDoubleSize -Set the movie window to double size. - + Set the movie window to double size. + evFullScreen -Switch fullscreen mode on/off. - + Switch fullscreen mode on/off. + evNormalSize -Set the movie window to its normal size. - + Set the movie window to its normal size. + @@ -911,66 +989,66 @@ evDecAudioBufDelay -Decrease audio buffer delay. - + Decrease audio buffer delay. + evDecBalance -Decrease balance. - + Decrease balance. + evDecVolume -Decrease volume. - + Decrease volume. + evIncAudioBufDelay -Increase audio buffer delay. - + Increase audio buffer delay. + evIncBalance -Increase balance. - + Increase balance. + evIncVolume -Increase volume. - + Increase volume. + evMute -Mute/unmute the sound. - + Mute/unmute the sound. + evSetBalance -Set balance (can be used by a potmeter; the -relative value (0-100%) of the potmeter is used). - + Set balance (can be used by a potmeter; the + relative value (0-100%) of the potmeter is used). + evSetVolume -Set volume (can be used by a potmeter; the relative -value (0-100%) of the potmeter is used). - + Set volume (can be used by a potmeter; the relative + value (0-100%) of the potmeter is used). + @@ -979,125 +1057,128 @@ evAbout -Open the about window. - + Open the about window. + evDropSubtitle -Disables the currently used subtitle. - + Disables the currently used subtitle. + evEqualizer -Turn the equalizer on/off. - + Turn the equalizer on/off. + evExit -Quit the program. - + Quit the program. + evIconify -Iconify the window. - + Iconify the window. + evLoad -Load a file (by opening a file browser window, where you can choose a file). - + Load a file (by opening a file browser window, where you can choose a file). + evLoadPlay -Does the same as evLoad, but it automatically starts playing after -the file is loaded. - + Does the same as evLoad, but it automatically starts + playing after the file is loaded. + evLoadSubtitle -Loads a subtitle file (with the fileselector) - + Loads a subtitle file (with the fileselector) + evLoadAudioFile -Loads an audio file (with the fileselector) - + Loads an audio file (with the fileselector) + evNone -Empty message, it has no effect (except maybe in Subversion versions :-)). - + Empty message, it has no effect (except maybe in Subversion versions :-)). + evPlaylist -Open/close the playlist window. - + Open/close the playlist window. + evPlayDVD -Tries to open the disc in the given DVD-ROM drive. - + Tries to open the disc in the given DVD-ROM drive. + evPlayVCD -Tries to open the disc in the given CD-ROM drive. - + Tries to open the disc in the given CD-ROM drive. + evPreferences -Open the preferences window. - + Open the preferences window. + evSetAspect -Sets displayed image aspect. - + Sets displayed image aspect. + evSetURL -Displays the URL dialog window. - + Displays the URL dialog window. + evSkinBrowser -Open the skin browser window. - + Open the skin browser window. + + - + + + Creating quality skins @@ -1122,31 +1203,40 @@ - Each skin should come with a + + Each skin should come with a README file that contains information about you, the author, copyright and license notices and anything else you wish to add. If you wish to have a changelog, this file is a - good place. + good place. + - There should be a file VERSION + + There should be a file VERSION with nothing more than the version number of the skin on a single - line (e.g. 1.0). + line (e.g. 1.0). + - Horizontal and vertical controls (sliders like volume + + Horizontal and vertical controls (sliders like volume or position) should have the center of the knob properly centered on the middle of the slider. It should be possible to move the knob to - both ends of the slider, but not past it. + both ends of the slider, but not past it. + - Skin elements should have the right sizes declared + + Skin elements should have the right sizes declared in the skin file. If this is not the case you can click outside of e.g. a button and still trigger it or click inside its area and not - trigger it. + trigger it. + - The skin file should be + + The skin file should be prettyprinted and not contain tabs. Prettyprinted means that the - numbers should line up neatly in columns. + numbers should line up neatly in columns. + - diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/tvinput.xml --- a/DOCS/xml/en/tvinput.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/tvinput.xml Fri Dec 08 11:38:06 2006 +0000 @@ -12,6 +12,7 @@ of TV options and keyboard controls. + Compilation @@ -22,196 +23,165 @@ autodetect kernel headers of v4l stuff and the existence of /dev/video* entries. If they exist, TV support will be built (see the output of ./configure). - + Make sure your tuner works with another TV software in Linux, for example XawTV. - + + + Usage tips + The full listing of the options is available on the manual page. Here are just a few tips: + - - -Use the option. An example: --tv channels=26-MTV1,23-TV2 -Explanation: using this option, only the 26 and 23 channels will be usable, -and there will be a nice OSD text upon channel switching, displaying the -channel's name. Spaces in the channel name must be replaced by the -"_" character. - - - - - -Choose some sane image dimensions. The dimensions of the resulting image should -be divisible by 16. - - - - - -If you capture the video with the vertical resolution higher than half -of the full resolution (i.e. 288 for PAL or 240 for NTSC), then the -'frames' you get will really be interleaved pairs of fields. -Depending on what you want to do with the video you may leave it in -this form, destructively deinterlace, or break the pairs apart into -individual fields. - - -Otherwise you'll get a movie which is distorted during -fast-motion scenes and the bitrate controller will be probably even unable -to retain the specified bitrate as the interlacing artifacts produce high -amount of detail and thus consume lot of bandwidth. You can enable -deinterlacing with . Usually - does a good job, but it can be matter of personal -preference. See other deinterlacing algorithms in the manual and give it a try. - - - - - -Crop out the dead space. When you capture the video, the areas at the edges -are usually black or contain some noise. These again consume lots of -unnecessary bandwidth. More precisely it's not the black areas themselves -but the sharp transitions between the black and the brighter video image -which do but that's not important for now. Before you start capturing, -adjust the arguments of the option so that all the -crap at the margins is cropped out. Again, don't forget to keep the resulting -dimensions sane. - - - + + Use the option. An example: + -tv channels=26-MTV1,23-TV2 + Explanation: using this option, only the 26 and 23 channels will be usable, + and there will be a nice OSD text upon channel switching, displaying the + channel's name. Spaces in the channel name must be replaced by the + "_" character. + + + Choose some sane image dimensions. The dimensions of the resulting image + should be divisible by 16. + - -Watch out for CPU load. It shouldn't cross the 90% boundary for most of the -time. If you have a large capture buffer, MEncoder -can survive an overload for few seconds but nothing more. It's better to -turn off the 3D OpenGL screensavers and similar stuff. - - - - - -Don't mess with the system clock. MEncoder uses the -system clock for doing A/V sync. If you adjust the system clock (especially -backwards in time), MEncoder gets confused and you -will lose frames. This is an important issue if you are hooked to a network -and run some time synchronization software like NTP. You have to turn NTP -off during the capture process if you want to capture reliably. - + + If you capture the video with the vertical resolution higher than half + of the full resolution (i.e. 288 for PAL or 240 for NTSC), then the + 'frames' you get will really be interleaved pairs of fields. + Depending on what you want to do with the video you may leave it in + this form, destructively deinterlace, or break the pairs apart into + individual fields. + + + Otherwise you'll get a movie which is distorted during + fast-motion scenes and the bitrate controller will be probably even unable + to retain the specified bitrate as the interlacing artifacts produce high + amount of detail and thus consume lot of bandwidth. You can enable + deinterlacing with . + Usually does a good job, but it can be matter of + personal preference. + See other deinterlacing algorithms in the manual and give it a try. + - - - -Don't change the unless you know what you are doing -or your card/driver really doesn't support the default (YV12 colorspace). -In the older versions of MPlayer/ -MEncoder it was necessary to specify the output -format. This issue should be fixed in the current releases and -isn't required anymore, and the default suits the most purposes. For example, -if you are capturing into DivX using -libavcodec and specify - in order to increase the quality of the captured -images, the captured image will be actually later converted back into YV12 so -the only thing you achieve is a massive waste of CPU power. - - - - - -To specify the I420 colorspace (), you have to add an -option due to a fourcc conflict with an Intel Indeo -video codec. - - - - - -There are several ways of capturing audio. You can grab the sound either using -your sound card via an external cable connection between video card and line-in, -or using the built-in ADC in the bt878 chip. In the latter case, you have to -load the btaudio driver. Read the -linux/Documentation/sound/btaudio file (in the kernel -tree, not MPlayer's) for some instructions on using -this driver. - - - - - -If MEncoder cannot open the audio device, make -sure that it is really available. There can be some trouble with the sound -servers like aRts (KDE) or ESD (GNOME). If you have a full duplex sound card -(almost any decent card supports it today), and you are using KDE, try to -check the "full duplex" option in the sound server preference menu. - - + + Crop out the dead space. When you capture the video, the areas at the edges + are usually black or contain some noise. These again consume lots of + unnecessary bandwidth. More precisely it's not the black areas themselves + but the sharp transitions between the black and the brighter video image + which do but that's not important for now. Before you start capturing, + adjust the arguments of the option so that all the + crap at the margins is cropped out. Again, don't forget to keep the resulting + dimensions sane. + + + Watch out for CPU load. It shouldn't cross the 90% boundary for most of the + time. If you have a large capture buffer, MEncoder + can survive an overload for few seconds but nothing more. It's better to + turn off the 3D OpenGL screensavers and similar stuff. + + + Don't mess with the system clock. MEncoder uses the + system clock for doing A/V sync. If you adjust the system clock (especially + backwards in time), MEncoder gets confused and you + will lose frames. This is an important issue if you are hooked to a network + and run some time synchronization software like NTP. You have to turn NTP + off during the capture process if you want to capture reliably. + + + Don't change the unless you know what you are doing + or your card/driver really doesn't support the default (YV12 colorspace). + In the older versions of MPlayer/ + MEncoder it was necessary to specify the output + format. This issue should be fixed in the current releases and + isn't required anymore, and the default suits the + most purposes. For example, if you are capturing into DivX using + libavcodec and specify + in order to increase the quality of the captured + images, the captured image will be actually later converted back into YV12 so + the only thing you achieve is a massive waste of CPU power. + + + To specify the I420 colorspace (), you have to + add an option due to a fourcc conflict with an + Intel Indeo video codec. + + + There are several ways of capturing audio. You can grab the sound either using + your sound card via an external cable connection between video card and + line-in, or using the built-in ADC in the bt878 chip. In the latter case, you + have to load the btaudio driver. Read the + linux/Documentation/sound/btaudio file (in the kernel + tree, not MPlayer's) for some instructions on using + this driver. + + + If MEncoder cannot open the audio device, make + sure that it is really available. There can be some trouble with the sound + servers like aRts (KDE) or ESD (GNOME). If you have a full duplex sound card + (almost any decent card supports it today), and you are using KDE, try to + check the "full duplex" option in the sound server preference menu. + + Examples - - + Dummy output, to AAlib :) - -mplayer -tv driver=dummy:width=640:height=480 -vo aa tv:// - - +mplayer -tv driver=dummy:width=640:height=480 -vo aa tv:// + - - + Input from standard V4L: -mplayer -tv driver=v4l:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv tv:// - - +mplayer -tv driver=v4l:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv tv:// + + - - + A more sophisticated example. This makes MEncoder capture the full PAL image, crop the margins, and deinterlace the picture using a linear blend algorithm. Audio is compressed with a constant bitrate of 64kbps, using LAME codec. This setup is suitable for capturing movies. - mencoder -tv driver=v4l:width=768:height=576 \ - -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 \ - -oac mp3lame -lameopts cbr:br=64 \ - -vf crop=720:544:24:16,pp=lb -o output.avi tv:// +mencoder -tv driver=v4l:width=768:height=576 -oac mp3lame -lameopts cbr:br=64\ + -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 \ + -vf crop=720:544:24:16,pp=lb -o output.avi tv:// - - + - - + This will additionally rescale the image to 384x288 and compresses the video with the bitrate of 350kbps in high quality mode. The vqmax option looses the quantizer and allows the video compressor to actually reach so low bitrate even at the expense of the quality. This can be used for capturing long TV series, where the video quality isn't so important. - mencoder -tv driver=v4l:width=768:height=576 \ - -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=350:vhq:vqmax=31:keyint=300 \ - -oac mp3lame -lameopts cbr:br=48 \ - -vf crop=720:540:24:18,pp=lb,scale=384:288 -sws 1 -o output.avi tv:// +mencoder -tv driver=v4l:width=768:height=576 \ + -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=350:vhq:vqmax=31:keyint=300 \ + -oac mp3lame -lameopts cbr:br=48 -sws 1 -o output.avi\ + -vf crop=720:540:24:18,pp=lb,scale=384:288 tv:// -It's also possible to specify smaller image dimensions in the -option and omit the software scaling but this approach uses the maximum available -information and is a little more resistant to noise. The bt8x8 chips can do the -pixel averaging only in the horizontal direction due to a hardware limitation. - - +It's also possible to specify smaller image dimensions in the + option and omit the software scaling but this approach +uses the maximum available information and is a little more resistant to noise. +The bt8x8 chips can do the pixel averaging only in the horizontal direction due +to a hardware limitation. + diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/usage.xml --- a/DOCS/xml/en/usage.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/usage.xml Fri Dec 08 11:38:06 2006 +0000 @@ -9,21 +9,18 @@ MPlayer utilizes a complex playtree. It consists of global options written as first, for example - mplayer -vfm 5 - and options written after filenames, that apply only to the given filename/URL/whatever, for example: - -mplayer -vfm 5 movie1.avi movie2.avi -vfm 4 + +mplayer -vfm 5 movie1.avi movie2.avi -vfm 4 + You can group filenames/URLs together using { and }. It is useful with option : - mplayer { 1.avi -loop 2 2.avi } -loop 3 - The above command will play files in this order: 1, 1, 2, 1, 1, 2, 1, 1, 2. @@ -105,6 +102,12 @@ + + + + + + Subtitles and OSD @@ -112,33 +115,35 @@ MPlayer can display subtitles along with movie files. Currently the following formats are supported: -VOBsub -OGM -CC (closed caption) -MicroDVD -SubRip -SubViewer -Sami -VPlayer -RT -SSA -PJS (Phoenix Japanimation Society) -MPsub -AQTitle -JACOsub + VOBsub + OGM + CC (closed caption) + MicroDVD + SubRip + SubViewer + Sami + VPlayer + RT + SSA + PJS (Phoenix Japanimation Society) + MPsub + AQTitle + + JACOsub + -MPlayer can dump the previously listed subtitle formats -(except the three first) into the following -destination formats, with the given options: +MPlayer can dump the previously listed subtitle +formats (except the three first) into the +following destination formats, with the given options: -MPsub: -SubRip: -MicroDVD: -JACOsub: -Sami: + MPsub: + SubRip: + MicroDVD: + JACOsub: + Sami: @@ -154,9 +159,9 @@ VOBsub subtitles -VOBsub subtitles consist of a big (some megabytes) .SUB file, -and optional .IDX and/or .IFO -files. If you have files like +VOBsub subtitles consist of a big (some megabytes) .SUB +file, and optional .IDX and/or .IFO +files. If you have files like sample.sub, sample.ifo (optional), sample.idx - you have to pass @@ -166,9 +171,9 @@ for DVDs, you can choose between subtitle tracks (languages) with it. In case that is omitted, MPlayer will try to use the languages given by the - option and fall back to the langidx -in the .IDX file to set the subtitle language. If it fails, -there will be no subtitles. + option and fall back to the +langidx in the .IDX file to set +the subtitle language. If it fails, there will be no subtitles. @@ -190,19 +195,19 @@ Delays subtitles by seconds. Can be negative. The value is added to movie's time position counter. - + Specify frame/sec rate of subtitle file (float number). - + Specify the position of subtitles. - + @@ -217,7 +222,10 @@ MPlayer can do this conversion for you: -mplayer -dumpmicrodvdsub -fps subtitles_fps -subfps avi_fps -sub subtitle_filename dummy.avi + +mplayer -dumpmicrodvdsub -fps subtitles_fps -subfps avi_fps \ + -sub subtitle_filename dummy.avi + @@ -226,6 +234,12 @@ + + + + + + Control @@ -236,6 +250,7 @@ control (using LIRC). See the man page for the complete list of keyboard controls. + Controls configuration @@ -275,6 +290,7 @@ + Control from LIRC @@ -339,9 +355,11 @@ + Slave mode + The slave mode allows you to build simple frontends to MPlayer. When run with the @@ -353,6 +371,10 @@ + + + + Streaming from network or pipes @@ -382,25 +404,32 @@ wget ftp://micorsops.com/something.avi -O - | mplayer -cache 8192 - + + Saving streamed content + - Once you succeed in making MPlayer play - your favorite internet stream, you can use the option - to save the stream into a file. - For example: +Once you succeed in making MPlayer play +your favorite internet stream, you can use the option + to save the stream into a file. +For example: - mplayer http://217.71.208.37:8006 -dumpstream -dumpfile stream.asf +mplayer http://217.71.208.37:8006 -dumpstream -dumpfile stream.asf - will save the content streamed from - http://217.71.208.37:8006 into - stream.asf. - This works with all protocols supported by - MPlayer, like MMS, RSTP, and so forth. +will save the content streamed from +http://217.71.208.37:8006 into +stream.asf. +This works with all protocols supported by +MPlayer, like MMS, RSTP, and so forth. + - + + + + Remote streams @@ -415,8 +444,11 @@ require an insane amount of bandwidth. + + Compiling the server + After having compiled MPlayer go to the TOOLS/netstream directory and enter @@ -427,8 +459,11 @@ + + Using remote streams + First you have to start the server on the computer you intend to remotely access. Currently the server is very basic and does not have any commands @@ -442,8 +477,8 @@ mplayer -cache 5000 mpst://servername//usr/local/movies/lol.avi Note that paths which aren't starting with a / will be relative to -the directory where the server is running. The option is not -needed but highly recommended. +the directory where the server is running. The option +is not needed but highly recommended. @@ -451,10 +486,12 @@ about the numerous exploits which are possible through this. Instead send some (good) patch to make it better or start writing your own server. + + - - + + Edit Decision Lists (EDL) @@ -477,8 +514,11 @@ indicates what to do (skip/mute) and when to do it (using pts in seconds). + + Using an EDL file + Include the flag when you run MPlayer, with the name of the EDL file you @@ -486,13 +526,14 @@ + + Making an EDL file + The current EDL file format is: - -[begin second] [end second] [action] - +[begin second] [end second] [action] Where the seconds are floating-point numbers and the action is either 0 for skip or 1 for mute. Example: @@ -507,15 +548,18 @@ -To create an EDL file to work from, use the -flag. During playback, just hit i to mark the beginning and -end of a skip block. A corresponding entry will be written to the file for -that time. You can then go back and fine-tune the generated EDL file as well as +To create an EDL file to work from, use the flag. During playback, just hit i to +mark the beginning and end of a skip block. +A corresponding entry will be written to the file for that time. +You can then go back and fine-tune the generated EDL file as well as change the default operation which is to skip the block described by each line. + - + + @@ -526,23 +570,20 @@ DVDs + Most DVDs and many other files include surround sound. MPlayer supports surround playback but does not enable it by default because stereo equipment is by far more common. To play a file that has more than two channels of audio use . For example, to play a DVD with 5.1 audio: - mplayer dvd://1 -channels 6 - Note that despite the name "5.1" there are actually six discrete channels. If you have surround sound equipment it is safe to put the option in your MPlayer configuration file ~/.mplayer/config. For example, to make quadraphonic playback the default, add this line: - channels=4 - MPlayer will then output audio in four channels when all four channels are available. @@ -555,14 +596,11 @@ MPlayer does not duplicate any channels by default, and neither do most audio drivers. If you want to do that manually: - mplayer filename -af channels=2:2:0:1:0:0 - See the section on channel copying for an explanation. - @@ -586,13 +624,13 @@ To enable passthrough on the command line: -For AC3 only, use + For AC3 only, use -For DTS only, use + For DTS only, use -For both AC3 and DTS, use + For both AC3 and DTS, use @@ -600,13 +638,13 @@ To enable passthrough in the <application>MPlayer</application> configuration file: -For AC3 only, use + For AC3 only, use -For DTS only, use + For DTS only, use -For both AC3 and DTS, use + For both AC3 and DTS, use @@ -618,8 +656,8 @@ does not need a comma; MPlayer will fall back anyway when an audio family is specified. + - MPEG audio Passthrough @@ -639,12 +677,14 @@ + Matrix-encoded audio ***TODO*** + This section has yet to be written and cannot be completed until somebody provides sample files for us to test. If you have any matrix-encoded audio @@ -653,6 +693,7 @@ MPlayer-DOCS mailing list. Put "[matrix-encoded audio]" in the subject line. + If no files or further information are forthcoming this section will be dropped. @@ -661,14 +702,13 @@ Good links: -http://electronics.howstuffworks.com/surround-sound5.htm + http://electronics.howstuffworks.com/surround-sound5.htm -http://www.extremetech.com/article2/0,1697,1016875,00.asp + http://www.extremetech.com/article2/0,1697,1016875,00.asp - @@ -695,9 +735,7 @@ To play a DVD with HRTF: - mplayer dvd://1 -channels 6 -af hrtf - @@ -705,11 +743,10 @@ requires 48 kHz audio. DVD audio is already 48 kHz, but if you have a file with a different sampling rate that you want to play using you must resample it: - -mplayer filename -channels 6 -af resample=48000,hrtf - + +mplayer filename -channels 6 -af resample=48000,hrtf + - @@ -721,11 +758,10 @@ settings with a mixer program such as alsamixer; audio outputs are often muted and set to zero volume by default. - - + Channel manipulation @@ -740,50 +776,49 @@ mono -center + center stereo -left -right + left + right quadraphonic -left front -right front -left rear -right rear + left front + right front + left rear + right rear surround 4.0 -left front -right front -center rear -center front + left front + right front + center rear + center front surround 5.0 -left front -right front -left rear -right rear -center front + left front + right front + left rear + right rear + center front surround 5.1 -left front -right front -left rear -right rear -center front -subwoofer + left front + right front + left rear + right rear + center front + subwoofer - @@ -800,7 +835,6 @@ channels and is useful for controlling the number of channels sent to the sound card. See the following sections for more information on channel manipulation. - @@ -814,9 +848,7 @@ actually encoded as stereo with one channel silent. The easiest and most foolproof way to make both speakers output the same audio is the filter: - mplayer filename -af extrastereo=0 - @@ -826,11 +858,10 @@ depending on which channel to keep. If you really need to maintain the volume, it may be easier to experiment with the filter and find the right value. For example: - -mplayer filename -af extrastereo=0,volume=5 - + +mplayer filename -af extrastereo=0,volume=5 + - @@ -844,55 +875,53 @@ -Decide how many output channels you need. This is the first suboption. + Decide how many output channels you need. This is the first suboption. -Count how many channel moves you will do. This is the second suboption. Each -channel can be moved to several different channels at the same time, but keep in -mind that when a channel is moved (even if to only one destination) the source -channel will be empty unless another channel is moved into it. To copy a -channel, keeping the source the same, simply move the channel into both the -destination and the source. For example: - + Count how many channel moves you will do. This is the second suboption. Each + channel can be moved to several different channels at the same time, but keep + in mind that when a channel is moved (even if to only one destination) the + source channel will be empty unless another channel is moved into it. To copy + a channel, keeping the source the same, simply move the channel into both the + destination and the source. For example: + channel 2 --> channel 3 -channel 2 --> channel 2 - +channel 2 --> channel 2 -Write out the channel copies as pairs of suboptions. Note that the first channel -is 0, the second is 1, etc. The order of these suboptions does not matter as -long as they are properly grouped into + Write out the channel copies as pairs of suboptions. Note that the first + channel is 0, the second is 1, etc. The order of these suboptions does not + matter as long as they are properly grouped into source:destination pairs. - - Example: one channel in two speakers - Here is an example of another way to play one channel in both speakers. Suppose for this example that the left channel should be played and the right channel discarded. Following the steps above: -In order to provide an output channel for each of the two speakers, the first -suboption must be "2". + In order to provide an output channel for each of the two speakers, the first + suboption must be "2". -The left channel needs to be moved to the right channel, and also must be moved -to itself so it won't be empty. This is a total of two moves, making the second -suboption "2" as well. + The left channel needs to be moved to the right channel, and also must be + moved to itself so it won't be empty. This is a total of two moves, making + the second suboption "2" as well. -To move the left channel (channel 0) into the right channel (channel 1), the -suboption pair is "0:1", "0:0" moves the left channel onto itself. + To move the left channel (channel 0) into the right channel (channel 1), the + suboption pair is "0:1", "0:0" moves the left channel onto itself. Putting that all together gives: - -mplayer filename -af channels=2:2:0:1:0:0 + +mplayer filename -af channels=2:2:0:1:0:0 + @@ -903,13 +932,10 @@ Example: left channel in two speakers shortcut - There is actually a much easier way to use the filter for playing the left channel in both speakers: - mplayer filename -af channels=1 - The second channel is discarded and, with no further suboptions, the single remaining channel is left alone. Sound card drivers automatically play single-channel audio in both speakers. This only works when the desired channel @@ -922,24 +948,24 @@ on the rear speakers of a quadraphonic setup. -There should be four output channels. The first suboption is "4". + There should be four output channels. The first suboption is "4". -Each of the two front channels needs to be moved to the corresponding rear -channel and also to itself. This is four moves, so the second suboption is "4". + Each of the two front channels needs to be moved to the corresponding rear + channel and also to itself. This is four moves, so the second suboption is "4". -The left front (channel 0) needs to moved to the left rear (channel 2): "0:2". -The left front also needs to be moved to itself: "0:0". The right front (channel -1) is moved to the right rear (channel 3): "1:3", and also to itself: "1:1". + The left front (channel 0) needs to moved to the left rear (channel 2): + "0:2". The left front also needs to be moved to itself: "0:0". The right + front (channel 1) is moved to the right rear (channel 3): "1:3", and also to + itself: "1:1". Combine all the suboptions to get: - -mplayer filename -af channels=4:4:0:2:0:0:1:3:1:1 - + +mplayer filename -af channels=4:4:0:2:0:0:1:3:1:1 + - @@ -952,73 +978,69 @@ more. Unfortunately, the suboptions are much more complicated. -Decide how many channels to work with. You may need to specify this with - and/or . Later examples -will show when to use which. - - -Decide how many channels to feed into (further decoded -channels are discarded). This is the first suboption, and it also controls how -many channels to employ for output. + Decide how many channels to work with. You may need to specify this with + and/or . + Later examples will show when to use which. -The remaining suboptions specify how much of each channel gets mixed into each -other channel. This is the complicated part. To break the task down, split the -suboptions into several sets, one set for each output channel. Each suboption -within a set corresponds to an input channel. The number you specify will be the -percentage of the input channel that gets mixed into the output channel. - - - accepts values from 0 to 512, yielding 0% to 51200% of the -original volume. Be careful when using values greater than 1. Not only can this -give you very high volume, but if you exceed the sample range of your sound card -you may hear painful pops and clicks. If you want you can follow - with to enable clipping, but it is -best to keep the values of low enough that clipping is not -necessary. + Decide how many channels to feed into (further decoded + channels are discarded). This is the first suboption, and it also controls how + many channels to employ for output. + + + The remaining suboptions specify how much of each channel gets mixed into each + other channel. This is the complicated part. To break the task down, split the + suboptions into several sets, one set for each output channel. Each suboption + within a set corresponds to an input channel. The number you specify will be + the percentage of the input channel that gets mixed into the output channel. + + + accepts values from 0 to 512, yielding 0% to 51200% of + the original volume. Be careful when using values greater than 1. Not only + can this give you very high volume, but if you exceed the sample range of + your sound card you may hear painful pops and clicks. If you want you can + follow with to enable clipping, + but it is best to keep the values of low enough that + clipping is not necessary. + + Example: one channel in two speakers - Here is yet another example for playing the left channel in two speakers. Follow the steps above: - should output two channels, so the first -suboption is "2". + should output two channels, so the first + suboption is "2". -Since we have two input channels, there will be two sets of suboptions. -Since there are also two output channels, -there will be two suboptions per set. -The left channel from the file should go with full volume to -the new left and the right channels. -Thus the first set of suboptions is "1:1". -The right channel should be discarded, so the second would be "0:0". -Any 0 values at the end can be left out, but for ease of -understanding we will keep them. + Since we have two input channels, there will be two sets of suboptions. + Since there are also two output channels, + there will be two suboptions per set. + The left channel from the file should go with full volume to + the new left and the right channels. + Thus the first set of suboptions is "1:1". + The right channel should be discarded, so the second would be "0:0". + Any 0 values at the end can be left out, but for ease of + understanding we will keep them. Putting those options together gives: - mplayer filename -af pan=2:1:1:0:0 - If the right channel is desired instead of the left, the suboptions to will be "2:0:0:1:1". Example: left channel in two speakers shortcut - As with , there is a shortcut that only works with the left channel: - mplayer filename -af pan=1:1 - Since has only one channel of input (the other channel is discarded), there is only one set with one suboption, which specifies that the only channel gets 100% of itself. @@ -1030,40 +1052,39 @@ downmixing. Here is a way to downmix PCM using : -The number of output channels is 2, so the first suboption is "2". + The number of output channels is 2, so the first suboption is "2". -With six input channels there will be six sets of options. Fortunately, -since we only care about the output of the first two channels, we only need to -make two sets; the remaining four sets can be omitted. Beware that not all -multichannel audio files have the same channel order! This example -demonstrates downmixing a file with the same channels as AC3 5.1: - + With six input channels there will be six sets of options. Fortunately, + since we only care about the output of the first two channels, we only need to + make two sets; the remaining four sets can be omitted. Beware that not all + multichannel audio files have the same channel order! This example + demonstrates downmixing a file with the same channels as AC3 5.1: + 0 - front left 1 - front right 2 - rear left 3 - rear right 4 - center front -5 - subwoofer - -The first set of suboptions lists the percentages of the original volume, in -order, which each output channel should receive from the -front left channel: "1:0". -The front right channel should go into the right output: "0:1". -The same for the rear channels: "1:0" and "0:1". -The center channel goes into both output channels with half volume: -"0.5:0.5", and the subwoofer goes into both with full volume: "1:1". +5 - subwoofer + The first set of suboptions lists the percentages of the original volume, in + order, which each output channel should receive from the + front left channel: "1:0". + The front right channel should go into the right output: "0:1". + The same for the rear channels: "1:0" and "0:1". + The center channel goes into both output channels with half volume: + "0.5:0.5", and the subwoofer goes into both with full volume: "1:1". Put all that together, for: - -mplayer 6-channel.wav -af pan=2:1:0:0:1:1:0:0:1:0.5:0.5:1:1 - + +mplayer 6-channel.wav -af pan=2:1:0:0:1:1:0:0:1:0.5:0.5:1:1 + The percentages listed above are only a rough example. Feel free to tweak them. Example: Playing 5.1 audio on big speakers without a subwoofer - If you have a huge pair of front speakers you may not want to waste any money on buying a subwoofer for a complete 5.1 sound system. If you use @@ -1071,56 +1092,54 @@ the subwoofer channel is simply discarded. If you want to distribute the subwoofer channel yourself you need to downmix manually with : - -Since needs to examine all six channels, specify - so liba52 decodes them all. + Since needs to examine all six channels, specify + so liba52 decodes them all. - outputs to only five channels, the first suboption is 5. + outputs to only five channels, the first suboption is 5. -Six input channels and five output channels means six sets of five suboptions. + Six input channels and five output channels means six sets of five suboptions. - The left front channel only replicates onto itself: - "1:0:0:0:0" + The left front channel only replicates onto itself: + "1:0:0:0:0" - Same for the right front channel: - "0:1:0:0:0" + Same for the right front channel: + "0:1:0:0:0" - Same for the left rear channel: - "0:0:1:0:0" + Same for the left rear channel: + "0:0:1:0:0" - And also the same for the right rear channel: - "0:0:0:1:0" + And also the same for the right rear channel: + "0:0:0:1:0" - Center front, too: - "0:0:0:0:1" + Center front, too: + "0:0:0:0:1" - And now we have to decide what to do with the subwoofer, - e.g. half into front right and front left: - "0.5:0.5:0:0:0" + And now we have to decide what to do with the subwoofer, + e.g. half into front right and front left: + "0.5:0.5:0:0:0" Combine all those options to get: - -mplayer dvd://1 -channels 6 -af pan=5:1:0:0:0:0:0:1:0:0:0:0:0:1:0:0:0:0:0:1:0:0:0:0:0:1:0.5:0.5:0:0:0 - + +mplayer dvd://1 -channels 6 -af pan=5:1:0:0:0:0:0:1:0:0:0:0:0:1:0:0:0:0:0:1:0:0:0:0:0:1:0.5:0.5:0:0:0 + - - + Software Volume adjustment @@ -1134,11 +1153,10 @@ 0) to reach much higher volume levels. Note that this does not bypass your sound card's mixer; MPlayer only amplifies the signal before sending it to your sound card. - The following example is a good start: - -mplayer quiet-file -softvol -softvol-max 300 - + +mplayer quiet-file -softvol -softvol-max 300 + The option specifies the maximum allowable output volume as a percentage of the original volume. For example, would allow the @@ -1156,20 +1174,15 @@ The option works by controlling the audio filter. If you want to play a file at a certain volume from the beginning you can specify manually: - mplayer quiet-file -af volume=10 - This will play the file with a ten decibel gain. Be careful when using the filter - you could easily hurt your ears if you use too high a value. Start low and work your way up gradually until you get a feel for how much adjustment is required. Also, if you specify excessively high -values, may need to clip the signal to avoid sending your -sound card data that is outside the allowable range; this will result in +values, may need to clip the signal to avoid sending +your sound card data that is outside the allowable range; this will result in distorted audio. - - - diff -r 0977cf2eb136 -r b210a229fbcb DOCS/xml/en/video.xml --- a/DOCS/xml/en/video.xml Fri Dec 08 09:50:12 2006 +0000 +++ b/DOCS/xml/en/video.xml Fri Dec 08 11:38:06 2006 +0000 @@ -58,12 +58,12 @@ -1 MB0x100000 -2 MB0x200000 -4 MB0x400000 -8 MB0x800000 -16 MB0x1000000 -32 MB0x2000000 + 1 MB0x100000 + 2 MB0x200000 + 4 MB0x400000 + 8 MB0x800000 + 16 MB0x1000000 + 32 MB0x2000000 @@ -119,8 +119,8 @@ in /var/log/XFree86.0.log This loads only the XFree86's extension. In a good install, this is - always loaded, and doesn't mean that the card's - XVideo support is loaded! + always loaded, and doesn't mean that the + card's XVideo support is loaded! @@ -159,9 +159,7 @@ And finally, check if MPlayer was compiled with 'xv' support. Do a mplayer -vo help | grep xv . If 'xv' support was built a line similar to this should appear: - - xv X11/Xv + xv X11/Xv @@ -205,13 +203,11 @@ will also help). - - + It's currently unclear which Savage models lack YV12 support, and convert by driver (slow). If you suspect your card, get a newer driver, or ask politely on the MPlayer-users mailing list for an MMX/3DNow! enabled driver. - - + @@ -254,8 +250,9 @@ Radeon VE - if you need X, use XFree86 4.2.0 or greater for this card. No TV out support. Of course with MPlayer you can -happily get accelerated display, with or without -TV output, and no libraries or X are needed. +happily get accelerated display, with or +without TV output, and no libraries or X are +needed. Read the VIDIX section. @@ -275,8 +272,8 @@ XFree86 4.3.0 includes Xv support, yet Bohdan Horst sent a small patch against the XFree86 sources that speeds up framebuffer operations (so XVideo) -up to four times. The patch has been included in XFree86 CVS and should be in the -next release after 4.3.0. +up to four times. The patch has been included in XFree86 CVS and should be in +the next release after 4.3.0. @@ -381,7 +378,8 @@ (II) Loading extension XFree86-DGA -See, XFree86 4.0.x or greater is highly recommended! +See, XFree86 4.0.x or greater is +highly recommended! MPlayer's DGA driver is autodetected by ./configure, or you can force it with . @@ -413,9 +411,9 @@ Security risk This is a big security risk! -Never do this on a server or on a computer that can be -accessed by other people because they can gain root privileges through SUID root -MPlayer. +Never do this on a server or on a computer +that can be accessed by other people because they can gain root privileges +through SUID root MPlayer. @@ -605,7 +603,6 @@ - @@ -655,14 +652,12 @@ - - + Be sure not to use the switch, since it toggles the usage of the software scaler, and it's slow. If you really need it, use the option which will produce bad quality, but is somewhat faster. - - + EGA (4BPP) SUPPORT @@ -790,8 +785,8 @@ option, then that. - option isn't supported (use ). - You can't use 8bpp (or less) modes. + option isn't supported + (use ). You can't use 8bpp (or less) modes. You possibly want to turn the cursor off: @@ -807,13 +802,11 @@ - - + FBdev video mode changing does not work with the VESA framebuffer, and don't ask for it, since it's not an MPlayer limitation. - - + @@ -828,12 +821,10 @@ framebuffer console and under X. - - + This is Linux only! On non-Linux (tested on FreeBSD) systems, you can use VIDIX instead! - - + Installation: @@ -948,7 +939,7 @@ -AAlib - text mode displaying +AAlib – text mode displaying AAlib is a library for displaying graphics in text mode, using powerful @@ -1049,15 +1040,13 @@ - - + The rendering is very CPU intensive, especially when using AA-on-X (using aalib on X), and it's least CPU intensive on standard, non-framebuffer console. Use SVGATextMode to set up a big textmode, then enjoy! (secondary head Hercules cards rock :)) (but IMHO you can use option to get graphics on hgafb:) - - + Use the option if your computer isn't fast @@ -1078,7 +1067,9 @@ -<systemitem class="library">libcaca</systemitem> - Color ASCII Art library + +<systemitem class="library">libcaca</systemitem> – Color ASCII Art library + The libcaca @@ -1141,7 +1132,8 @@ -<systemitem class="library">libcaca</systemitem> will also look for certain environment variables: +<systemitem class="library">libcaca</systemitem> will also look for + certain environment variables: @@ -1255,12 +1247,10 @@ - - + Don't use this driver with GCC 2.96! It won't work! - - + COMMAND LINE OPTIONS AVAILABLE FOR VESA @@ -1296,8 +1286,9 @@ be activated anyway and you will need restart your computer. - Often after terminating VESA driver you get black - screen. To return your screen to original state - simply switch to other console + Often after terminating VESA driver you get + black screen. To return your screen to + original state - simply switch to other console (by pressing Alt+F<x>) then switch to your previous console by the same way. @@ -1363,16 +1354,18 @@ VIDIX - -PREAMBLE +PREAMBLE -VIDIX is the abbreviation for VIDeo -Interface for *niX. +VIDIX is the abbreviation for +VIDeo +Interface +for *niX. VIDIX was designed and introduced as an interface for fast user-space drivers -providing such video performance as mga_vid does for Matrox cards. It's also very -portable. +providing such video performance as mga_vid does for Matrox cards. It's also +very portable. + This interface was designed as an attempt to fit existing video acceleration interfaces (known as mga_vid, rage128_vid, radeon_vid, @@ -1443,8 +1436,7 @@ - -USAGE METHODS +USAGE METHODS When VIDIX is used as subdevice () then video mode configuration is performed by video @@ -1460,9 +1452,13 @@ Also you can specify VIDIX's driver directly as third subargument in command line: -mplayer -vo xvidix:mga_vid.so -fs -zoom -double file.avi + +mplayer -vo xvidix:mga_vid.so -fs -zoom -double file.avi + or -mplayer -vo vesa:vidix:radeon_vid.so -fs -zoom -double -bpp 32 file.avi + +mplayer -vo vesa:vidix:radeon_vid.so -fs -zoom -double -bpp 32 file.avi + But it's dangerous, and you shouldn't do that. In this case given driver will be forced and result is unpredictable (it may freeze your computer). You should do that @@ -1481,29 +1477,34 @@ - Download the development version + Download the + development version of svgalib (for example 1.9.17), OR - download a version made by Alex especially for usage with MPlayer - (it doesn't need the svgalib source to compile) from + download a version made by Alex especially for usage with + MPlayer (it doesn't need the svgalib source to + compile) from here. - Compile the module in the svgalib_helper - directory (it can be found inside the svgalib-1.9.17/kernel/ - directory if you've downloaded the source from the svgalib site) and insmod it. + Compile the module in the + svgalib_helper directory (it can be + found inside the + svgalib-1.9.17/kernel/ directory if + you've downloaded the source from the svgalib site) and insmod it. - To create the necessary devices in the /dev - directory, do a make device in the svgalib_helper - dir, as root. + To create the necessary devices in the + /dev directory, do a + make device in the + svgalib_helper dir, as root. Move the svgalib_helper directory to mplayer/main/libdha/svgalib_helper. - Required if you download the source from the svgalib site: Remove the comment before the - CFLAGS line containing "svgalib_helper" string from the + Required if you download the source from the svgalib site: Remove the comment + before the CFLAGS line containing "svgalib_helper" string from the libdha/Makefile. @@ -1571,11 +1572,11 @@ nVidia cards - An unique feature of the nvidia_vid driver is its ability to display video on - plain, pure, text-only console - with no - framebuffer or X magic whatsoever. For this purpose, we'll have to use the - video output, as the following example shows: - mplayer -vo cvidix example.avi +An unique feature of the nvidia_vid driver is its ability to display video on +plain, pure, text-only console - with no +framebuffer or X magic whatsoever. For this purpose, we'll have to use the + video output, as the following example shows: +mplayer -vo cvidix example.avi @@ -1606,23 +1607,24 @@
"DirectFB is a graphics library which was designed with embedded systems in mind. It offers maximum hardware accelerated performance at a minimum -of resource usage and overhead." - quoted from +of resource usage and overhead." - quoted from +
I'll exclude DirectFB features from this section. Though MPlayer is not supported as a "video -provider" in DirectFB, this output driver will enable video playback through -DirectFB. It will - of course - be accelerated, on my Matrox G400 DirectFB's speed -was the same as XVideo. +provider" in DirectFB, this output driver will enable video playback +through DirectFB. It will - of course - be accelerated, on my Matrox G400 +DirectFB's speed was the same as XVideo. -Always try to use the newest version of DirectFB. You can use DirectFB options on -the command line, using the option. Layer selection can -be done by the subdevice method, e.g.: -(layer -1 is default: autodetect) +Always try to use the newest version of DirectFB. You can use DirectFB options +on the command line, using the option. Layer +selection can be done by the subdevice method, e.g.: + (layer -1 is default: autodetect)
@@ -1632,8 +1634,8 @@ DirectFB/Matrox (dfbmga) -Please read the main DirectFB section for general -information. +Please read the main DirectFB section for +general information. @@ -1673,78 +1675,68 @@ MPlayer supports cards with the Siemens DVB chipset from vendors like Siemens, Technotrend, Galaxis or Hauppauge. The latest DVB -drivers are available from the Linux TV site. +drivers are available from the +Linux TV site. If you want to do software transcoding you should have at least a 1GHz CPU. Configure should detect your DVB card. If it did not, force detection with - - -./configure --enable-dvb - -If you have ost headers at a non-standard path, set the path with +./configure --enable-dvb +If you have ost headers at a non-standard path, set the path with + +./configure --with-extraincdir=DVB source directory/ost/include + +Then compile and install as usual. -./configure --with-extraincdir=DVB source directory/ost/include - - -Then compile and install as usual. - - -USAGE +USAGE -Hardware decoding (playing standard MPEG-1/2 files) can be done with this command: +Hardware decoding (playing standard MPEG-1/2 files) can be done with this +command: + +mplayer -ao mpegpes -vo mpegpes file.mpg|vob + -mplayer -ao mpegpes -vo mpegpes file.mpg|vob - - - -Software decoding or transcoding different formats to MPEG-1 can be achieved using -a command like this: - - +Software decoding or transcoding different formats to MPEG-1 can be achieved +using a command like this: + mplayer -ao mpegpes -vo mpegpes yourfile.ext mplayer -ao mpegpes -vo mpegpes -vf expand yourfile.ext Note that DVB cards only support heights 288 and 576 for PAL or 240 and 480 for -NTSC. You must rescale for other heights by adding - with the width and height you want to the - option. DVB cards accept various widths, like 720, 704, -640, 512, 480, 352 etc. and do hardware scaling in horizontal direction, so you -do not need to scale horizontally in most cases. For a 512x384 (aspect 4:3) -MPEG-4 (DivX) try: - - -mplayer -ao mpegpes -vo mpegpes -vf scale=512:576 - -If you have a widescreen movie and you do not want to scale it to full height, -you can use the filter to add black bands. To view a -640x384 MPEG-4 (DivX), try: +NTSC. You must rescale for other heights by +adding with the width and height you want +to the option. DVB cards accept various widths, like 720, +704, 640, 512, 480, 352 etc. and do hardware scaling in horizontal direction, +so you do not need to scale horizontally in most cases. +For a 512x384 (aspect 4:3) MPEG-4 (DivX) try: +mplayer -ao mpegpes -vo mpegpes -vf scale=512:576 -mplayer -ao mpegpes -vo mpegpes -vf expand=640:576 file.avi +If you have a widescreen movie and you do not want to scale it to full height, +you can use the filter to add black bands. To view a +640x384 MPEG-4 (DivX), try: + +mplayer -ao mpegpes -vo mpegpes -vf expand=640:576 file.avi If your CPU is too slow for a full size 720x576 MPEG-4 (DivX), try downscaling: - - - -mplayer -ao mpegpes -vo mpegpes -vf scale=352:576 file.avi + +mplayer -ao mpegpes -vo mpegpes -vf scale=352:576 file.avi -If speed does not improve, try vertical downscaling, too: - - -mplayer -ao mpegpes -vo mpegpes -vf scale=352:288 file.avi +If speed does not improve, try vertical downscaling, too: + +mplayer -ao mpegpes -vo mpegpes -vf scale=352:288 file.avi @@ -1753,8 +1745,9 @@ or , use (the 5th parameter at the end will enable OSD rendering). You may want to move the image up a bit -to get a bigger black zone for subtitles. You may also want to move subtitles up, -if they are outside your TV screen, use the +to get a bigger black zone for subtitles. You may also want to move subtitles +up, if they are outside your TV screen, use the + option to adjust this ( is a good choice). @@ -1767,140 +1760,127 @@ To keep the aspect ratio of MPEG-4 (DivX) files and get the optimal scaling parameters (hardware horizontal scaling and software vertical scaling while keeping the right aspect ratio), use the new dvbscale filter: -
- - + for a 4:3 TV: -vf dvbscale,scale=-1:0,expand=-1:576:-1:-1:1 for a 16:9 TV: -vf dvbscale=1024,scale=-1:0,expand=-1:576:-1:-1:1 - + +
- -Digital TV (DVB input module) +Digital TV (DVB input module) You can use your DVB card for watching Digital TV. - You should have the programs scan and - szap/tzap/czap/azap installed; they are all included in - the drivers package. +You should have the programs scan and +szap/tzap/czap/azap installed; they are all included in +the drivers package. - Verify that your drivers are working properly with a program such as - dvbstream - (that is the base of the DVB input module). +Verify that your drivers are working properly with a program such as +dvbstream +(that is the base of the DVB input module). - Now you should compile a ~/.mplayer/channels.conf - file, with the syntax accepted by szap/tzap/czap/azap, or - have scan compile it for you. +Now you should compile a ~/.mplayer/channels.conf +file, with the syntax accepted by szap/tzap/czap/azap, or +have scan compile it for you. - If you have more than one card type (e.g. Satellitar, Terrestrial, Cable and ATSC) - you can save your channels files as - ~/.mplayer/channels.conf.sat, - ~/.mplayer/channels.conf.ter, - ~/.mplayer/channels.conf.cbl, - and ~/.mplayer/channels.conf.atsc, - respectively, so as to implicitly hint MPlayer - to use these files rather than ~/.mplayer/channels.conf, - and you only need to specify which card to use. +If you have more than one card type (e.g. Satellitar, Terrestrial, Cable and ATSC) +you can save your channels files as +~/.mplayer/channels.conf.sat, +~/.mplayer/channels.conf.ter, +~/.mplayer/channels.conf.cbl, +and ~/.mplayer/channels.conf.atsc, +respectively, so as to implicitly hint MPlayer +to use these files rather than ~/.mplayer/channels.conf, +and you only need to specify which card to use. - Make sure that you have have only Free to Air - channels in your channels.conf file, or - MPlayer will try to skip to the next visible one, - but it may take long if there are many consecutive encrypted channels. +Make sure that you have have only Free to Air +channels in your channels.conf file, or +MPlayer will try to skip to the next visible one, +but it may take long if there are many consecutive encrypted channels. - In your audio and video fields you can use an extended syntax: - (for a maximum of 6 pids each); - in this case MPlayer will include in the - stream all the indicated pids, plus pid 0 (that contains the PAT). - You are encouraged to include in each row the PMT pid for the - corresponding channel (if you know it). - Other possible uses are: televideo pid, second audio track, etc. - - - - If MPlayer complains frequently about - Too many video/audio packets in the buffer or - if you notice a growing desynchronization between audio and - video try to use the libavformat MPEG-TS demuxer by adding - - to your command line. +In your audio and video fields you can use an extended syntax: + (for a maximum of 6 pids each); +in this case MPlayer will include in the +stream all the indicated pids, plus pid 0 (that contains the PAT). +You are encouraged to include in each row the PMT pid for the +corresponding channel (if you know it). +Other possible uses are: televideo pid, second audio track, etc. - To show the first of the channels present in your list, run +If MPlayer complains frequently about +Too many video/audio packets in the buffer or +if you notice a growing desynchronization between audio and +video try to use the libavformat MPEG-TS demuxer by adding + +to your command line. - - mplayer dvb:// - - - If you want to watch a specific channel, such as R1, run +To show the first of the channels present in your list, run +mplayer dvb:// - - mplayer dvb://R1 - - - If you have more than one card you also need to specify the number of the card - where the channel is visible (e.g. 2) with the syntax: +If you want to watch a specific channel, such as R1, run +mplayer dvb://R1 - - mplayer dvb://2@R1 - + +If you have more than one card you also need to specify the number of the card +where the channel is visible (e.g. 2) with the syntax: +mplayer dvb://2@R1 + - To change channels press the h (next) and - k (previous) keys, or use the - OSD menu. +To change channels press the h (next) and +k (previous) keys, or use the +OSD menu. - If your ~/.mplayer/menu.conf contains a - <dvbsel> entry, such as the one in the example - file etc/dvb-menu.conf (that you can use to overwrite - ~/.mplayer/menu.conf), the main menu will show a - sub-menu entry that will permit you to choose one of the channels present - in your channels.conf, possibly preceded by a menu - with the list of cards available if more than one is usable by - MPlayer. +If your ~/.mplayer/menu.conf contains a +<dvbsel> entry, such as the one in the example +file etc/dvb-menu.conf (that you can use to overwrite +~/.mplayer/menu.conf), the main menu will show a +sub-menu entry that will permit you to choose one of the channels present +in your channels.conf, possibly preceded by a menu +with the list of cards available if more than one is usable by +MPlayer. - If you want to save a program to disk you can use - - +If you want to save a program to disk you can use - mplayer -dumpfile r1.ts -dumpstream dvb://R1 +mplayer -dumpfile r1.ts -dumpstream dvb://R1 - - - If you want to record it in a different format (re-encoding it) instead - you can run a command such as + +If you want to record it in a different format (re-encoding it) instead +you can run a command such as - mencoder -o r1.avi -ovc xvid -xvidencopts bitrate=800 -oac mp3lame -lameopts cbr:br=128 -pp=ci dvb://R1 +mencoder -o r1.avi -ovc xvid -xvidencopts bitrate=800 \ + -oac mp3lame -lameopts cbr:br=128 -pp=ci dvb://R1 + - Read the man page for a list of options that you can pass to the - DVB input module. +Read the man page for a list of options that you can pass to the +DVB input module. - -FUTURE +FUTURE If you have questions or want to hear feature announcements and take part in discussions on this subject, join our @@ -1922,29 +1902,31 @@ DXR2 -MPlayer supports hardware accelerated playback - with the Creative DXR2 card. + +MPlayer supports hardware accelerated playback +with the Creative DXR2 card. + + First of all you will need properly installed DXR2 drivers. You can find the drivers and installation instructions at the DXR2 Resource Center site. - -USAGE +USAGE - -Enable TV output. + + Enable TV output. - - or -Enable Overlay output in X11. + or + Enable Overlay output in X11. - - -This option is used to control the DXR2 driver. + + + This option is used to control the DXR2 driver. + @@ -1993,11 +1975,13 @@ will be supported by the MPlayer GUI in the future. When overlay is properly set up you will no longer need to use dxr3view. turns on prebuffering. Prebuffering is a feature of the -em8300 chip that enables it to hold more than one frame of video at a time. This -means that when you are running with prebuffering MPlayer -will try to keep the video buffer filled with data at all times. If you are on -a slow machine MPlayer will probably use close to, -or precisely 100% of CPU. This is especially common if you play pure MPEG streams +em8300 chip that enables it to hold more than one frame of video at a time. +This means that when you are running with prebuffering +MPlayer will try to keep the video buffer filled +with data at all times. +If you are on a slow machine MPlayer will probably +use close to, or precisely 100% of CPU. +This is especially common if you play pure MPEG streams (like DVDs, SVCDs a.s.o.) since MPlayer will not have to reencode it to MPEG it will fill the buffer very fast. With prebuffering video playback is much @@ -2007,79 +1991,84 @@ so it is highly suggested that you turn on MPlayer's option to avoid further loss of sync. will turn on the new sync-engine. This is currently an -experimental feature. With the sync feature turned on the em8300's internal clock -will be monitored at all times, if it starts to deviate from -MPlayer's clock it will be reset causing the em8300 to -drop any frames that are lagging behind. +experimental feature. With the sync feature turned on the em8300's internal +clock will be monitored at all times, if it starts to deviate from +MPlayer's clock it will be reset causing the em8300 +to drop any frames that are lagging behind. will set the TV norm of the DXR3 card without the need for external tools like em8300setup. Valid norms are 5 = NTSC, 4 = PAL-60, 3 = PAL. Special norms are 2 (auto-adjust using PAL/PAL-60) and 1 (auto-adjust using PAL/NTSC) because they decide which norm to use by looking at the frame rate of the movie. norm = 0 (default) does not change the current norm. - = device number to use if you have more than one em8300 -card. -Any of these options may be left out. - seems to work great when playing MPEG-4 (DivX) movies. People -have reported problems using the prebuf option when playing MPEG-1/2 files. You -might want to try running without any options first, if you have sync problems, -or DVD subtitle problems, give a try. - - - - - - -For audio output, where X is the device number (0 if one card). - - - - - - -The em8300 cannot play back samplerates lower than 44100Hz. If the sample -rate is below 44100Hz select either 44100Hz or 48000Hz depending on which -one matches closest. I.e. if the movie uses 22050Hz use 44100Hz as -44100 / 2 = 22050, if it is 24000Hz use 48000Hz as 48000 / 2 = 24000 and so on. -This does not work with digital audio output (). + = device number to use if +you have more than one em8300 card. Any of these options may be left out. + seems to work great when playing MPEG-4 (DivX) +movies. People have reported problems using the prebuf option when playing +MPEG-1/2 files. +You might want to try running without any options first, if you have sync +problems, or DVD subtitle problems, give a try. - - -To watch non-MPEG content on the em8300 (i.e. MPEG-4 (DivX) or RealVideo) -you have to specify an MPEG-1 video filter such as -libavcodec (lavc). -See the man page for further info about . -Currently there is no way of setting the fps -of the em8300 which means that it is fixed to 30000/1001 fps. Because of this it is -highly recommended that you use -especially if you are using prebuffering. Then why 25 and not 30000/1001? Well, the -thing is that when you use 30000/1001 the picture becomes a bit jumpy. The reason for -this is unknown to us. If you set it to somewhere between 25 and 27 the picture -becomes stable. For now all we can do is accept this for a fact. - + + + For audio output, where X is the device number + (0 if one card). + + + + + + + The em8300 cannot play back samplerates lower than 44100Hz. If the sample + rate is below 44100Hz select either 44100Hz or 48000Hz depending on which + one matches closest. I.e. if the movie uses 22050Hz use 44100Hz as + 44100 / 2 = 22050, if it is 24000Hz use 48000Hz as 48000 / 2 = 24000 + and so on. + This does not work with digital audio output (). + - - -Although the DXR3 driver can put some OSD onto the MPEG-1/2/4 video, it has -much lower quality than MPlayer's traditional OSD, -and has several refresh problems as well. The command line above will firstly -convert the input video to MPEG-4 (this is mandatory, sorry), then apply an -expand filter which won't expand anything (-1: default), but apply the normal -OSD onto the picture (that's what the "1" at the end does). - + + + To watch non-MPEG content on the em8300 (i.e. MPEG-4 (DivX) or RealVideo) + you have to specify an MPEG-1 video filter such as + libavcodec (lavc). + See the man page for further info about . + Currently there is no way of setting the fps of the em8300 which means that + it is fixed to 30000/1001 fps. + Because of this it is highly recommended that you use + + especially if you are using prebuffering. Then why 25 and not 30000/1001? + Well, the thing is that when you use 30000/1001 the picture becomes a bit + jumpy. + The reason for this is unknown to us. + If you set it to somewhere between 25 and 27 the picture becomes stable. + For now all we can do is accept this for a fact. + - - -The em8300 supports playing back AC3 audio (surround sound) through the -digital audio output of the card. See the option above, -it must be used to specify the DXR3's output instead of a sound card. - + + + Although the DXR3 driver can put some OSD onto the MPEG-1/2/4 video, it has + much lower quality than MPlayer's traditional OSD, + and has several refresh problems as well. The command line above will firstly + convert the input video to MPEG-4 (this is mandatory, sorry), then apply an + expand filter which won't expand anything (-1: default), but apply the normal + OSD onto the picture (that's what the "1" at the end does). + + + + + + + The em8300 supports playing back AC3 audio (surround sound) through the + digital audio output of the card. See the option + above, it must be used to specify the DXR3's output instead of a sound card. +
@@ -2113,10 +2102,12 @@ This driver talks to the kernel driver available at , so -you must get it working first. The presence of an MJPEG card is autodetected by the -configure script, if autodetection fails, force detection with +you must get it working first. The presence of an MJPEG card is autodetected by +the configure script, if autodetection fails, force +detection with ./configure --enable-zr + The output can be controlled by several options, a long description of the options can be found in the man page, a short list of options can be viewed @@ -2155,9 +2146,10 @@ -Extra occurrences of invoke cinerama -mode, i.e. you can distribute the movie over several TV's or beamers to create a -larger screen. Suppose you have two beamers. The left one is connected to your +Extra occurrences of invoke +cinerama mode, i.e. you can distribute the movie over +several TV's or beamers to create a larger screen. +Suppose you have two beamers. The left one is connected to your Buz at /dev/video1 and the right one is connected to your DC10+ at /dev/video0. The movie has a resolution of 704x288. Suppose also that you want the right beamer in black and white and @@ -2165,8 +2157,8 @@ issue the following command mplayer -vo zr -zrdev /dev/video0 -zrcrop 352x288+352+0 -zrxdoff 0 -zrbw \ - -zrcrop 352x288+0+0 -zrdev /dev/video1 -zrquality 10 \ - movie.avi + -zrcrop 352x288+0+0 -zrdev /dev/video1 -zrquality 10 \ + movie.avi @@ -2181,8 +2173,9 @@ Finally an important remark: Do not start or stop XawTV on the playback device during playback, it will crash your computer. It is, however, fine to -FIRST start XawTV, THEN -start MPlayer, wait for MPlayer +FIRST start XawTV, +THEN start MPlayer, +wait for MPlayer to finish and THEN stop XawTV. @@ -2230,22 +2223,26 @@ XFree86 - + + Using the driver and the HAL module, available from the Matrox site. This will give you X on the TV. - + + This method doesn't give you accelerated playback - as under Windows! The second head has only YUV framebuffer, the BES - (Back End Scaler, the YUV scaler on G200/G400/G450/G550 cards) doesn't - work on it! The windows driver somehow workarounds this, probably by - using the 3D engine to zoom, and the YUV framebuffer to display the - zoomed image. If you really want to use X, use the options, but it will be SLOW, - and has Macrovision copy protection enabled + as under Windows! The second head has only YUV framebuffer, the + BES (Back End Scaler, the YUV scaler on + G200/G400/G450/G550 cards) doesn't work on it! The windows driver somehow + workarounds this, probably by using the 3D engine to zoom, and the YUV + framebuffer to display the zoomed image. If you really want to use X, use + the options, but it will be + SLOW, and has + Macrovision copy protection enabled (you can "workaround" Macrovision using this perl script). - + + Framebuffer @@ -2253,8 +2250,9 @@ Using the matroxfb modules in the 2.4 kernels. 2.2 kernels don't have the TVout feature in them, thus unusable - for this. You have to enable ALL matroxfb-specific feature during compilation - (except MultiHead), and compile them into modules! + for this. You have to enable ALL matroxfb-specific feature during + compilation (except MultiHead), and compile them into + modules! You'll also need I2C enabled. @@ -2276,8 +2274,8 @@ somewhere into your PATH. - Then enter into the TVout/ directory - in the MPlayer source, and execute + Then enter into the TVout/ + directory in the MPlayer source, and execute ./modules as root. Your text-mode console will enter into framebuffer mode (no way back!). @@ -2320,7 +2318,7 @@ Ctrl+Alt+F1.) Change 640 and 512 if you set the resolution to other... - + Enjoy the ultra-fast ultra-featured Matrox TV output (better than Xv)! @@ -2330,16 +2328,14 @@ - -Building a Matrox TV-out cable +Building a Matrox TV-out cable No one takes any responsibility, nor guarantee for any damage caused by this documentation. - -Cable for G400 +Cable for G400 The CRTC2 connector's fourth pin is the composite video signal. The ground are the sixth, seventh and eighth pins. (info contributed @@ -2347,8 +2343,7 @@ - -Cable for G450 +Cable for G450 The CRTC2 connector's first pin is the composite video signal. The ground are the fifth, sixth, seventh, and fifteenth (5, 6, 7, 15) @@ -2364,13 +2359,14 @@ TV output support for these cards has only been recently introduced, and is -not yet in the mainstream kernel. Currently the mga_vid -module can't be used AFAIK, because the G450/G550 driver works only in one -configuration: the first CRTC chip (with much more features) on the first display -(on monitor), and the second CRTC (no BES - for +not yet in the mainstream kernel. +Currently the mga_vid module can't be used +AFAIK, because the G450/G550 driver works only in one configuration: the first +CRTC chip (with much more features) on the first display (on monitor), +and the second CRTC (no BES - for explanation on BES, please see the G400 section above) on TV. So you can only -use MPlayer's fbdev output driver -at the present. +use MPlayer's fbdev output +driver at the present. @@ -2391,8 +2387,7 @@ ATI cards - -PREAMBLE +PREAMBLE Currently ATI doesn't want to support any of its TV-out chips under Linux, because of their licensed Macrovision technology. @@ -2417,7 +2412,8 @@ Rage Mobility P/M, Radeon, Rage 128, Mobility M3/M4: - supported by atitvout. + supported by + atitvout. @@ -2439,9 +2435,10 @@ nVidia -First, you MUST download the closed-source drivers from . -I will not describe the installation and configuration process because it does not cover -the scope of this documentation. +First, you MUST download the closed-source drivers from +. +I will not describe the installation and configuration process because it does +not cover the scope of this documentation.