# HG changeset patch
# User diego
# Date 1073084827 0
# Node ID d5784b575959de3f37ce8a70bf1d743202eb9fa6
# Parent d5c84f4b8740e30bf9c68ddbebbf86395dadc78b
DVD ripping section added courtesy of Samuli K¸«£rkk¸«£inen with some
improvements made by me.
diff -r d5c84f4b8740 -r d5784b575959 DOCS/xml/en/mencoder.xml
--- a/DOCS/xml/en/mencoder.xml Fri Jan 02 23:03:50 2004 +0000
+++ b/DOCS/xml/en/mencoder.xml Fri Jan 02 23:07:07 2004 +0000
@@ -62,7 +62,7 @@
First pass:mencoder file/DVD -ovc frameno -oac mp3lame -lameopts vbr=3 -o frameno.avi
-
+
An audio-only avi file will be created, containing
only the requested audio stream. Don't forget
, if you need to set it. If you were encoding a
@@ -515,7 +515,7 @@
-A typical usage of this feature is to set the matrices preferred by the
+A typical usage of this feature is to set the matrices preferred by the
KVCD specifications.
@@ -569,4 +569,183 @@
+
+Making a high quality MPEG4 ("DivX") rip of a DVD movie
+
+
+ Ripping a DVD title into a maximally high quality MPEG4 (DivX) file
+ involves many considerations. Below is an example of the process when
+ there is no file size goal (other than perhaps fitting the result into 2GB).
+ libavcodec will be used for the video,
+ and the audio will be copied as is without any changes.
+
+
+
+Cropping
+
+ Play the DVD and run the crop detection filter
+ () on it. This gives you a crop rectangle
+ to use for encoding. The reason for cropping is that many movies are
+ not shot in a standard DVD aspect ratio (16/9 or 4/3), or, for whatever
+ reason, the picture does not properly fill the frame. So you want to crop
+ out the pointless black bars when you rip. It also improves the quality
+ of the rip since the sharp edge of the black bars wastes a lot of bits.
+ A common aspect is 2.35, which is cinescope. Most big blockbuster
+ movies have this aspect ratio.
+
+
+
+
+Quality level
+
+ Next you need to choose the desired quality level. When there is no
+ need to fit the resulting file on CDs or the like, using constant
+ quantizing AKA constant quality is a good choice. That way each frame
+ is given as much bits as its needs to keep the quality at the desired
+ level, but multiple encoding passes are not needed. With
+ libavcodec, you get constant
+ quality by using
+ .
+ should give you a file below 2GB in size,
+ depending mainly on the movie length and video noisiness (the more
+ noise, the harder it is to compress.)
+
+
+
+Files over 2GB
+
+ If the file resulting from constant quality encoding is over 2GB big,
+ you will have to create an index to be able to view it properly.
+ Either
+
+
+
+ play the file with to create an index
+ on the fly or
+
+
+ use to write an index to a file once and
+ to use it when playing the file.
+
+
+
+ If this bothers you, you may want to keep the file size below 2GB.
+
+
+
+ There are two ways to avoid this. You can try encoding again using
+ and see if both the resulting file size
+ and picture quality are acceptable. You can also use
+ 2 pass encoding.
+ As you will be copying the audio track as is and hence know its
+ bitrate, and you know the running time of the movie, you can
+ compute the required bitrate to give to the
+
+ option without using
+ 3 pass encoding.
+
+
+
+Deinterlacing
+
+ If the movie is interlaced, you may want to deinterlace it as part of
+ the ripping. It is debatable whether deinterlacing should be done at
+ this stage. The benefit is that deinterlacing when converting to
+ MPEG4 makes compression better, and viewing easier and less CPU
+ intensive on computer monitors as no deinterlacing is required at
+ that stage.
+
+
+
+ If deinterlacing at the ripping stage is a good idea depends on
+ the DVD. If the DVD is made from film, which was shot at 24 fps, you
+ can as well deinterlace while ripping. If, however, the original was
+ 50/60 fps video, converting into deinterlaced 23.976/25 fps video
+ will lose information. If you do decide to interlace, you can further
+ experiment with different deinterlacing filters. See
+ http://www.wieser-web.de/MPlayer/
+ for examples. A good starting point is .
+
+
+
+ If you are both cropping and deinterlacing, deinterlace
+ before cropping. Actually, this is not necessary
+ if the crop offset is vertically a multiple of 2 pixels. However with
+ some other filters like dering you should always crop last, so it's a
+ good habit to put the crop filter last.
+
+
+
+Inverse telecine
+
+ If you are ripping a PAL DVD, which is 25 fps, you do not need to
+ think about the fps. Just use 25 fps. NTSC DVDs on the other hand are
+ 29.97 fps (often rounded to 30 fps, but that is not what they are).
+ If the movie was shot for TV, you again do not need to touch the fps.
+ But if the movie was shot on film, and hence at (exactly) 24 fps,
+ it has been converted to 29.97 fps when making the DVD. That
+ conversion where 12 fields are added to each 24 frames of film is
+ called telecine. For more info about telecine, see a
+
+ Google search for "telecine field 23.976".
+
+
+
+ In case you have such a telecined DVD, you will want to do inverse
+ telecine, that is convert the movie to 23.976 fps (29.97*4/5).
+ Otherwise camera panning will look jerky and awful. You can use
+ for this. Anything that is shown in
+ theatres is shot on film and needs inverse telecine, TV shows do not.
+
+
+
+Scaling and aspect ratio
+
+ For best quality, do not scale the movie while ripping. Scaling
+ causes artifacts and makes the file larger. Pixels in DVD movies
+ are not square, so DVD movies include info about the correct aspect
+ ratio. It is possible to store the aspect ratio in the MPEG4 header
+ of the output file. Most video players ignore this info, but
+ MPlayer honors it. So if you are only
+ going to use MPlayer for viewing the
+ ripped file, you do not need to scale the movie, just pass
+ to
+ MEncoder and things will
+ automagically work right. If you must scale the movie, be
+ careful about getting the size right especially if you do cropping.
+
+
+
+
+Summing it up
+
+ With all of the above mentioned in mind, a suitable encoding command
+ might be
+
+
+mencoder dvd://1 -aid 128 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vqscale=3:vhq:v4mv:trell:autoaspect \
+ -ofps 23.976 -vf crop=720:364:0:56 -o Harry_Potter_2.avi
+
+
+ Here gives the DVD title to rip. Option
+ says to use audio track 128, and
+ to copy it as is. You'll have to use
+ MPlayer to find out the right values for
+ these options.
+
+
+
+ Options for
+ improve quality versus bitrate, but make
+ encoding take longer. Especially slows
+ encoding down but also increases quality visibly. If you want to
+ deinterlace, add a filter to
+ , for example
+ (in that order). If you don't need
+ inverse telecine, leave out the .
+
+
+
+
+