# HG changeset patch # User gpoirier # Date 1113166773 0 # Node ID a53b942816a5a45d03321c485ca61c34f99b962b # Parent 4433dd3106572f5fc4632a5c4d7d861914217455 Removes the section "menc-feat-fix-avi" as part of it was wrong and the other belonged to the faq. Does a bit of reformating and spellings fixes. diff -r 4433dd310657 -r a53b942816a5 DOCS/xml/en/mencoder.xml --- a/DOCS/xml/en/mencoder.xml Sun Apr 10 20:53:48 2005 +0000 +++ b/DOCS/xml/en/mencoder.xml Sun Apr 10 20:59:33 2005 +0000 @@ -140,47 +140,6 @@ - -Fixing AVIs with broken index or interleaving - - -Easiest thing. We simply copy the video and audio streams, and -MEncoder generates the index. Of course this cannot fix possible bugs in -the video and/or audio streams. It also fixes files with broken interleaving, -thus the option won't be needed for them anymore. - - - -Command: - -mencoder -idx input.avi -ovc copy -oac copy -o output.avi - - - - -Appending multiple AVI files - - -As a side-effect, the broken AVI fixer function enables MEncoder -to append 2 (or more) AVI files: - - - -Command: -cat 1.avi 2.avi > 3.avi -mencoder -noidx -ovc copy -oac copy -o output.avi 3.avi - - - -This expects 1.avi and 2.avi to use -the same codecs, resolution, stream rate etc, and at least 1.avi -must not be broken. You may need to fix your input AVI files first, as described -above. - - - - Encoding with the <systemitem class="library">libavcodec</systemitem> codec family @@ -660,14 +619,17 @@ 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 + 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. + of audio track, the video bitrate will have to be: + (702 - 60) * 1024 * 1024 / (120*60) * 8 / 1000 + = 740kbps + Cropping and Scaling @@ -721,7 +683,7 @@ First, you should compute the encoded aspect ratio: - ARc = (Wc x (ARa / PRdvd )) / Hc + ARc = (Wc x (ARa / PRdvd )) / Hc where: @@ -739,8 +701,8 @@ 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 - ResX = INT( ResY * ARc / 16) * 16 + ResY = INT(SQRT( 1000*Bitrate/25/ARc/CQ )/16) * 16 + ResX = INT( ResY * ARc / 16) * 16 @@ -751,6 +713,9 @@ However, if you have a target size for your movie (1 or 2 CDs for instance), there's a limited total number of bits that you can spend; therefore it's necessary to find a good tradeoff between compressibility and quality. + + + The CQ depends both on the bitrate and the movie resolution. In order to raise the CQ, typically you'd downscale the movie given that the bitrate is computed in function of the target size and the length of the @@ -762,7 +727,10 @@ visible). It's 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. - Please thake note that the CQ is just an indicative figure, as depending on + + + + 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's worthless to raise CQ higher than 0.30 as you'd @@ -820,8 +788,11 @@ 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 Ogg Vorbis files - into a video stream because it can only create AVI and MPEG files. + 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. Don't worry, this document will show you how you can do that with third party programs. @@ -915,8 +886,8 @@ - -Encoding options + +Encoding options of libavcodec Ideally, you'd probably want to be able to just tell the encoder to switch @@ -1299,7 +1270,7 @@ document are not intended for actual use. They are simply the bare minimum required to encode the pertaining video category. How to make good DVD rips or fine-tune - libavcodec for maximum + libavcodec for maximal quality is not within the scope of this document.