SimpleRip

This page generates the necessary commands to encode a movie directly from a DVD title to an Xvid file using MEncoder without the need for other applications or helper scripts.

Input source path

Output file

In kilobits per second (kbps)

In kilobits per second (kbps)

Range: -10 (quieter) to 10 (louder)

Range: -20 (high priority) to 20 (low priority)

Number of encoding passes

(optional) Example: 704:464:10:8

(optional) Example: 704:294

(optional) Extra flags to pass to mencoder

(mencoder commands will magically appear here)

Options

Source file

This is the input file to read. This will typically be dvd://1, where 1 is the DVD title to rip. However, this can also be a .VOB file or any other video file that is readable by Mplayer.

Output file

This is the .AVI file that results when the encoding is complete.

Audio and video bitrates

For movies, 128kbps for audio is typically plenty. Some people recommend bumping audio down to 96kbps. The result is slightly less quality audio with a bump up in video bitrate for the same output size. It is recommended that a video bitrate of 700kbps or above be used.

Volume gain

Value from -10 to 10. The higher the value, the more gain. This is useful for correcting movies that have a subnormal volume.

Process nice

Value from -20 to 19. Adjusting this value will adjust the priority mencoder is given when encoding. A priority of 0 is normal, a negative priority is higher than normal, and a positive priority is less than normal.

Crop

Cropping is necessary to remove the black borders at the top and bottom of widescreen-format DVDs, and scaling will resize the output video to a smaller pixel by pixel area, resulting in increased quality.

Mplayer can automatically detect the crop settings. To determine the appropriate settings for your video (they will likely change per movie), open a terminal and execute mplayer dvd://1 -vf cropdetect where dvd://1 is your source. Play for about 20 seconds and wait until the output is stable. You should see something like -vf crop=704:464:10:8 printed repeatedly. In this case, the 704:464:10:8 is the important part.

The format for this option is W:H:X:Y, where:

W, H
Cropped width and height.
X, Y
Position of the cropped picture.

Scale

For determining the scale, decide if the movie widescreen (16:9 ratio) or fullscreen (4:3).

  • Widescreen: use scale 704:294 (2.35:1) or 768:432 (16:9)
  • Fullscreen: use scale 640:480

This option is complicated. See the scale video filter options in the manpage for details.

Passes

Value: 1 or 2. A two-pass encode is recommended. The quality is significantly better with a two-pass, but, as the name suggests, the video is passed over twice, roughly doubling the encode time.

Extra options

Here you can place extra options to pass to mencoder. Some useful options may be:

-ss <time>
Seek to given time position. (Start encoding here)
-endpos <[[hh:]mm:]ss[.ms]|size[b|kb|mb]>
Stop encoding at the given time or byte position.

See these options and more in the mplayer manpage.

About this document

I wrote this 'program' in 2005 after I read up on encoding in Linux and investigating other solutions. I tried dvd::rip, but had problems with various bugs, and I craved more automation. I moved on to writing a shell script, but then realized there were too many settings for a simple implementation. Considering various options for GUI setups, the idea to use JavaScript seemed appealing for a couple of reasons:

  1. I wanted to experiment with the capabilities of JavaScript
  2. With this web-based approach, anyone can easily generate the necessary commands to encode the video in the desired way, without installing extra software or messing with commandline switches, which seem to be forgotten just after they're used.

So, this is SimpleRip, the JavaScript mencoder command generator, the product of my experimentation of Linux DVD ripping.

Further reading