1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-17 04:15:13 +00:00

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.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15114 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
gpoirier 2005-04-10 20:59:33 +00:00
parent b98d1030b6
commit 4dd0b0def3

View File

@ -140,47 +140,6 @@ them. This section is about <emphasis role="bold">copying</emphasis>.
</sect1> </sect1>
<sect1 id="menc-feat-fix-avi">
<title>Fixing AVIs with broken index or interleaving</title>
<para>
Easiest thing. We simply copy the video and audio streams, and
<application>MEncoder</application> 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>-ni</option> option won't be needed for them anymore.
</para>
<para>
Command:
<screen>
mencoder -idx <replaceable>input.avi</replaceable> -ovc copy -oac copy -o <replaceable>output.avi</replaceable><!--
--></screen>
</para>
<sect2 id="menc-feat-appending">
<title>Appending multiple AVI files</title>
<para>
As a side-effect, the broken AVI fixer function enables <application>MEncoder</application>
to append 2 (or more) AVI files:
</para>
<para>
Command:
<screen>cat <replaceable>1.avi</replaceable> <replaceable>2.avi</replaceable> &gt; <replaceable>3.avi</replaceable>
mencoder -noidx -ovc copy -oac copy -o <replaceable>output.avi</replaceable> <replaceable>3.avi</replaceable></screen>
</para>
<note><para>
This expects <filename>1.avi</filename> and <filename>2.avi</filename> to use
the same codecs, resolution, stream rate etc, and at least <filename>1.avi</filename>
must not be broken. You may need to fix your input AVI files first, as described
<link linkend="menc-feat-fix-avi">above</link>.
</para></note>
</sect2>
</sect1>
<sect1 id="menc-feat-enc-libavcodec"> <sect1 id="menc-feat-enc-libavcodec">
<title>Encoding with the <systemitem class="library">libavcodec</systemitem> <title>Encoding with the <systemitem class="library">libavcodec</systemitem>
codec family</title> codec family</title>
@ -660,14 +619,17 @@ vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,
audio track(s), so you should <link linkend="menc-feat-dvd-mpeg4-audio">rip audio track(s), so you should <link linkend="menc-feat-dvd-mpeg4-audio">rip
those</link> first. those</link> first.
You can compute the bitrate with the following equation: 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 <equation>bitrate = (target_size_in_Mbytes - sound_size_in_Mbytes) *
1024 * 1024 / length_in_secs * 8 / 1000</equation>
For instance, to squeeze a two-hour movie onto a 702MB CD, with 60MB For instance, to squeeze a two-hour movie onto a 702MB CD, with 60MB
of audio track, the video bitrate will have to be of audio track, the video bitrate will have to be:
(702 - 60) * 1024 * 1024 / (120*60) * 8 / 1000 = 740kbps. <equation>(702 - 60) * 1024 * 1024 / (120*60) * 8 / 1000
= 740kbps</equation>
</para> </para>
</sect2> </sect2>
<sect2 id="menc-feat-dvd-mpeg4-crop"> <sect2 id="menc-feat-dvd-mpeg4-crop">
<title>Cropping and Scaling</title> <title>Cropping and Scaling</title>
@ -721,7 +683,7 @@ vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,
<para> <para>
First, you should compute the encoded aspect ratio: First, you should compute the encoded aspect ratio:
ARc = (Wc x (ARa / PRdvd )) / Hc <equation>ARc = (Wc x (ARa / PRdvd )) / Hc</equation>
<itemizedlist> <itemizedlist>
<title>where:</title> <title>where:</title>
<listitem><para> <listitem><para>
@ -739,8 +701,8 @@ vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,
<para> <para>
Then, you can compute the X and Y resolution, according to a certain Then, you can compute the X and Y resolution, according to a certain
Compression Quality (CQ) factor: Compression Quality (CQ) factor:
ResY = INT( SQRT(1000 * Bitrate / 25 / ARc / CQ) / 16 ) * 16 <equation>ResY = INT(SQRT( 1000*Bitrate/25/ARc/CQ )/16) * 16</equation>
ResX = INT( ResY * ARc / 16) * 16 <equation>ResX = INT( ResY * ARc / 16) * 16</equation>
</para> </para>
<para> <para>
@ -751,6 +713,9 @@ vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,
However, if you have a target size for your movie (1 or 2 CDs for instance), 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 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. necessary to find a good tradeoff between compressibility and quality.
</para>
<para>
The CQ depends both on the bitrate and the movie resolution. 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 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 bitrate is computed in function of the target size and the length of the
@ -762,7 +727,10 @@ vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,
visible). visible).
It's therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, 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. and 0.26-0.28 for 2 CDs.
Please thake note that the CQ is just an indicative figure, as depending on </para>
<para>
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 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. 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 On the other hand, it's worthless to raise CQ higher than 0.30 as you'd
@ -820,8 +788,11 @@ vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,
will encode destination_sound.wav with the encoding quality 1, which is 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 roughly equivalent to 80Kb/s, and is the minimum quality at which you
should encode if you care about quality. should encode if you care about quality.
Please note that MEncoder currently cannot mux Ogg Vorbis files Please note that MEncoder currently cannot mux Vorbis audio tracks
into a video stream because it can only create AVI and MPEG files. 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 Don't worry, this document will show you how you can do that with third
party programs. party programs.
</para> </para>
@ -915,8 +886,8 @@ vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,
</sect2> </sect2>
<sect2 id="menc-feat-dvd-mpeg4-encoding-options"> <sect2 id="menc-feat-dvd-mpeg4-lavc-encoding-options">
<title>Encoding options</title> <title>Encoding options of libavcodec</title>
<para> <para>
Ideally, you'd probably want to be able to just tell the encoder to switch Ideally, you'd probably want to be able to just tell the encoder to switch
@ -1299,7 +1270,7 @@ vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,
document are <emphasis role="bold">not</emphasis> intended for document are <emphasis role="bold">not</emphasis> intended for
actual use. They are simply the bare minimum required to encode the actual use. They are simply the bare minimum required to encode the
pertaining video category. How to make good DVD rips or fine-tune pertaining video category. How to make good DVD rips or fine-tune
<systemitem class="library">libavcodec</systemitem> for maximum <systemitem class="library">libavcodec</systemitem> for maximal
quality is not within the scope of this document. quality is not within the scope of this document.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>