From fad08c508f1d7d2802dd1518b122fadeca3b724a Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 2 Jan 2004 23:07:07 +0000 Subject: =?UTF-8?q?DVD=20ripping=20section=20added=20courtesy=20of=20Samul?= =?UTF-8?q?i=20K=C3=A4rkk=C3=A4inen=20with=20some=20improvements=20made=20?= =?UTF-8?q?by=20me.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11733 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/en/mencoder.xml | 183 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 181 insertions(+), 2 deletions(-) (limited to 'DOCS') diff --git a/DOCS/xml/en/mencoder.xml b/DOCS/xml/en/mencoder.xml index 64367e9872..086465560f 100644 --- a/DOCS/xml/en/mencoder.xml +++ b/DOCS/xml/en/mencoder.xml @@ -62,7 +62,7 @@ once, unlike in 2-pass mode. The schematics: 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 @@ are reported as working. -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 @@ vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37, + +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 . + + + + + -- cgit v1.2.3