📄 menc-feat-dvd-mpeg4.html
字号:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>14.1.聽Making a high quality MPEG-4 ("DivX") rip of a DVD movie</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="MPlayer - The Movie Player"><link rel="up" href="encoding-guide.html" title="Chapter聽14.聽Encoding with MEncoder"><link rel="prev" href="encoding-guide.html" title="Chapter聽14.聽Encoding with MEncoder"><link rel="next" href="menc-feat-telecine.html" title="14.2.聽How to deal with telecine and interlacing within NTSC DVDs"><link rel="preface" href="howtoread.html" title="How to read this documentation"><link rel="chapter" href="intro.html" title="Chapter聽1.聽Introduction"><link rel="chapter" href="install.html" title="Chapter聽2.聽Installation"><link rel="chapter" href="usage.html" title="Chapter聽3.聽Usage"><link rel="chapter" href="cd-dvd.html" title="Chapter聽4.聽CD/DVD usage"><link rel="chapter" href="faq.html" title="Chapter聽5.聽Frequently Asked Questions"><link rel="chapter" href="containers.html" title="Chapter聽6.聽Containers"><link rel="chapter" href="codecs.html" title="Chapter聽7.聽Codecs"><link rel="chapter" href="video.html" title="Chapter聽8.聽Video output devices"><link rel="chapter" href="audio.html" title="Chapter聽9.聽Audio output devices"><link rel="chapter" href="tv.html" title="Chapter聽10.聽TV"><link rel="chapter" href="radio.html" title="Chapter聽11.聽Radio"><link rel="chapter" href="ports.html" title="Chapter聽12.聽Ports"><link rel="chapter" href="mencoder.html" title="Chapter聽13.聽Basic usage of MEncoder"><link rel="chapter" href="encoding-guide.html" title="Chapter聽14.聽Encoding with MEncoder"><link rel="appendix" href="bugreports.html" title="Appendix聽A.聽How to report bugs"><link rel="appendix" href="bugs.html" title="Appendix聽B.聽Known bugs"><link rel="appendix" href="skin.html" title="Appendix聽C.聽MPlayer skin format"><link rel="appendix" href="history.html" title="Appendix聽D.聽History"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-preparing-encode" title="14.1.1.聽Preparing to encode: Identifying source material and framerate"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-2pass" title="14.1.2.聽Constant quantizer vs. multipass"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-constraints" title="14.1.3.聽Constraints for efficient encoding"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-crop" title="14.1.4.聽Cropping and Scaling"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-resolution-bitrate" title="14.1.5.聽Choosing resolution and bitrate"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-filtering" title="14.1.6.聽Filtering"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-interlacing" title="14.1.7.聽Interlacing and Telecine"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-encoding-interlaced" title="14.1.8.聽Encoding interlaced video"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-av-sync" title="14.1.9.聽Notes on Audio/Video synchronization"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-codec" title="14.1.10.聽Choosing the video codec"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-audio" title="14.1.11.聽Audio"><link rel="subsection" href="menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-muxing" title="14.1.12.聽Muxing"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">14.1.聽Making a high quality MPEG-4 ("DivX")
rip of a DVD movie</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="encoding-guide.html">Prev</a>聽</td><th width="60%" align="center">Chapter聽14.聽Encoding with <span class="application">MEncoder</span></th><td width="20%" align="right">聽<a accesskey="n" href="menc-feat-telecine.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="menc-feat-dvd-mpeg4"></a>14.1.聽Making a high quality MPEG-4 ("DivX")
rip of a DVD movie</h2></div></div></div><p>
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."
</p><p>
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.
</p><p>
In fact, the reason you want to transcode a DVD into MPEG-4 is
specifically because you <span class="bold"><strong>do</strong></span> care about
file size.
</p><p>
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
<code class="systemitem">libavcodec</code> to encode the video,
although the theory applies to other codecs as well.
</p><p>
If this seems to be too much for you, you should probably use one of the
many fine frontends that are listed in the
<a class="ulink" href="http://www.mplayerhq.hu/design7/projects.html#mencoder_frontends" target="_top">MEncoder section</a>
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.
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="menc-feat-dvd-mpeg4-preparing-encode"></a>14.1.1.聽Preparing to encode: Identifying source material and framerate</h3></div></div></div><p>
Before you even think about encoding a movie, you need to take
several preliminary steps.
</p><p>
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
<span class="bold"><strong>not</strong></span> 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.
</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-dvd-mpeg4-preparing-encode-fps"></a>14.1.1.1.聽Identifying source framerate</h4></div></div></div><p>
Here is a list of common types of source material, where you are
likely to find them, and their properties:
</p><div class="itemizedlist"><ul type="disc"><li><p>
<span class="bold"><strong>Standard Film</strong></span>: Produced for
theatrical display at 24fps.
</p></li><li><p>
<span class="bold"><strong>PAL video</strong></span>: Recorded with a PAL
video camera at 50 fields per second.
A field consists of just the odd- or even-numbered lines of a
frame.
Television was designed to refresh these in alternation as a
cheap form of analog compression.
The human eye supposedly compensates for this, but once you
understand interlacing you will learn to see it on TV too and
never enjoy TV again.
Two fields do <span class="bold"><strong>not</strong></span> make a
complete frame, because they are captured 1/50 of a second apart
in time, and thus they do not line up unless there is no motion.
</p></li><li><p>
<span class="bold"><strong>NTSC Video</strong></span>: Recorded with an
NTSC video camera at 60000/1001 fields per second, or 60 fields per
second in the pre-color era.
Otherwise similar to PAL.
</p></li><li><p>
<span class="bold"><strong>Animation</strong></span>: Usually drawn at
24fps, but also comes in mixed-framerate varieties.
</p></li><li><p>
<span class="bold"><strong>Computer Graphics (CG)</strong></span>: Can be
any framerate, but some are more common than others; 24 and
30 frames per second are typical for NTSC, and 25fps is typical
for PAL.
</p></li><li><p>
<span class="bold"><strong>Old Film</strong></span>: Various lower
framerates.
</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="menc-feat-dvd-mpeg4-preparing-encode-material"></a>14.1.1.2.聽Identifying source material</h4></div></div></div><p>
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.
</p><p>
To further complicate matters, some movies will be a mix of
several of the above.
</p><p>
The most important distinction to make between all of these
formats is that some are frame-based, while others are
field-based.
<span class="bold"><strong>Whenever</strong></span> 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.
</p><div class="itemizedlist"><p class="title"><b>There are several common types of pulldown:</b></p><ul type="disc"><li><p>
<span class="bold"><strong>PAL 2:2 pulldown</strong></span>: The nicest of
them all.
Each frame is shown for the duration of two fields, by extracting the
even and odd lines and showing them in alternation.
If the original material is 24fps, this process speeds up the
movie by 4%.
</p></li><li><p>
<span class="bold"><strong>PAL 2:2:2:2:2:2:2:2:2:2:2:3 pulldown</strong></span>:
Every 12th frame is shown for the duration of three fields, instead of
just two.
This avoids the 4% speedup issue, but makes the process much
more difficult to reverse.
It is usually seen in musical productions where adjusting the
speed by 4% would seriously damage the musical score.
</p></li><li><p>
<span class="bold"><strong>NTSC 3:2 telecine</strong></span>: Frames are
shown alternately for the duration of 3 fields or 2 fields.
This gives a fieldrate 2.5 times the original framerate.
The result is also slowed down very slightly from 60 fields per
second to 60000/1001 fields per second to maintain NTSC fieldrate.
</p></li><li><p>
<span class="bold"><strong>NTSC 2:2 pulldown</strong></span>: Used for
showing 30fps material on NTSC.
Nice, just like 2:2 PAL pulldown.
</p></li></ul></div><p>
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.
</p><p>
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.
</p><p>
The procedures for dealing with these cases will be covered
<a class="link" href="menc-feat-telecine.html" title="14.2.聽How to deal with telecine and interlacing within NTSC DVDs">later in this guide</a>.
For now, we leave you with some guides to identifying which type
of material you are dealing with:
</p><div class="itemizedlist"><p class="title"><b>NTSC regions:</b></p><ul type="disc"><li><p>
If <span class="application">MPlayer</span> prints that the framerate
has changed to 24000/1001 when watching your movie, and never changes
back, it is almost certainly progressive content that has been
"soft telecined".
</p></li><li><p>
If <span class="application">MPlayer</span> shows the framerate
switching back and forth between 24000/1001 and 30000/1001, and you see
"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.
</p></li><li><p>
If <span class="application">MPlayer</span> never shows the framerate
changing, and every single frame with motion appears combed, your
movie is NTSC video at 60000/1001 fields per second.
</p></li><li><p>
If <span class="application">MPlayer</span> never shows the framerate
changing, and two frames out of every five appear combed, your
movie is "hard telecined" 24000/1001fps content.
</p></li></ul></div><div class="itemizedlist"><p class="title"><b>PAL regions:</b></p><ul type="disc"><li><p>
If you never see any combing, your movie is 2:2 pulldown.
</p></li><li><p>
If you see combing alternating in and out every half second,
then your movie is 2:2:2:2:2:2:2:2:2:2:2:3 pulldown.
</p></li><li><p>
If you always see combing during motion, then your movie is PAL
video at 50 fields per second.
</p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Hint:</h3><p>
<span class="application">MPlayer</span> can slow down movie playback
with the -speed option or play it frame-by-frame.
Try using <tt class="option">-speed</tt> 0.2 to watch the movie very
slowly or press the "<span class="keycap"><b>.</b></span>" key repeatedly to play one frame at
a time and identify the pattern, if you cannot see it at full speed.
</p></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="menc-feat-dvd-mpeg4-2pass"></a>14.1.2.聽Constant quantizer vs. multipass</h3></div></div></div><p>
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -