OGMRip is a set of tools and libraries especially developed to make DVD encoding much easier. This document describes how to use the GUI.

Introduction

OGMRip rips and encodes DVD into very high quality AVI, OGM, MP4, or Matroska files. It supports a wide variety of video (XviD, Lavc, X264 and Ogg Theora) and audio (Ogg Vorbis, MP3, PCM, AC3, DTS and AAC) codecs and can extract SRT or VobSub subtitles. OGMRip tries as much as possible to automate most of the steps of the encoding: it computes the video bitrate for a given output file size, autodetects cropping and scaling parameters, ... It also allows to embed multiple audio and subtitle streams in a single file and to encode only a few chapters of a DVD title.

The GUI features a clean HIG-compliant GNOME 2 interface.

OGMRip is made up of many interacting components, some being libraries, others executables. Some are absolutely mandatory, others are optional.

  • libogmdvd: a helper library to access DVD-Video
  • libogmdvd-gtk: a library of GTK+ widgets related to DVD-Video
  • libogmjob: a library for spawning and controlling processes
  • libogmrip: a library for encoding DVD titles
  • libogmrip-gtk: a library of GTK+ widgets specific to OGMRip
  • dvdcpy: a tool to copy a full DVD or a single title on the hard drive
  • subptools: a tool to manipulate XML subtitles files
  • subp2pgm: a tool to convert VobSub subtitles into PGM files
  • subp2png: a tool to convert VobSub subtitles into PNG files
  • subp2tiff: a tool to convert VobSub subtitles into TIFF files
  • theoraenc: an minimalist Ogg Theora encoder
  • ogmrip: the GUI

Installation

OGMRip has been developed in C and needs some libraries and software to be configured and compiled. Some components are optional and some functionalities of OGMRip will automatically be activated if they are already installed. Those functionalities can be deactivated by configuration.

Required components

The following software are absolutely mandatory in order to build OGMRip:

  • glib >= 2.14.0: the GLib library of C routines
  • libxml >= 2.0: a library to manipulate XML files
  • dvdread >= 0.9.4: a simple foundation library for reading DVD-Video
  • MPlayer >= 0.92: the media player OGMRip is based upon
  • MEncoder >= 0.92: the media encoder of MPlayer
  • enca >= 1.9: a library to detect the character coding of a file
  • intltool >= 0.35: a set of tools for extracting translatable strings from various source files
  • pkgconfig >= 0.12: a package config system that manages compile/link flags

Optional Components

To build the GUI:

  • gtk+ >= 2.12.0: the Gimp Toolkit +
  • gconf >= 2.6.0: the Gnome Configuration System and Daemon
  • libglade >= 2.5.0: a library to construct graphical interfaces at runtime

To use DBus:

  • dbus-glib >= 0.7.2: a message bus system, a simple way for applications to talk to each other

To add support for the Ogg Media container:

  • ogmtools >= 1.0: a set of tools to get information about, to extract streams from and create OGG media streams

To add support for the Matroska container:

  • mkvtoolnix >= 0.9.5: a set of tools to create, alter, and inspect Matroska files

To add support for the MP4 container:

  • gpac >= 0.4.2: an implementation of the Mpeg-4 standard

To add support for the Ogg Theora video codec:

  • libtheora >= 1.0alpha5: a library decode and encode Ogg Theora files

To add support for the MP3 audio codec:

  • lame >= 3.96: an MP3 encoder

To add support for the Ogg Vorbis audio codec:

  • vorbistools >= 1.0: an Ogg Vorbis encoder

To add support for the AAC audio codec:

  • faac >= 1.24: a free MPEG-4 audio codec

To add support for the SRT subtitle format:

  • gocr >= 0.39, ocrad >= 0.15 or tesseract >= 2.0: an OCR (Optical Character Recognition) reader

To add support for spell checking text subtitles:

  • enchant >= 1.1: a spellchecker wrapping library

To add support for notifications:

  • libnotify >= 0.4.3: the notifications library

To add support for the X264 video codec:

  • MPlayer built with X264 support

To add support for the DTS audio format:

  • MPlayer built with DTS support

To extract subtitles in PNG

  • libpng: the portable network graphics library

To extract subtitles in TIFF (for tesseract support)

  • libtiff: a library for manipulating TIFF images

To create the documentation:

  • xsltproc: a command line XSLT processor part of libxslt

Configuration options

By default, OGMRip autodetects the functionalities that should be enabled depending on the software and libraries already installed. It is possible, however, to inhibit some of those functionalities at configuration time.

  • --enable-maintainer-mode: enables the debug mode; OGMRip will then print a lot of information to help detecting and fixing bugs
  • --enable-gtk-doc: enables the generation of the documentation
  • --disable-gtk-support: disables the compilation of the GUI; only some of the libraries will be built: libogmdvd, libogmjob and libogmrip
  • --disable-dbus-support: disables DBus support
  • --disable-enchant-support: disables spell checking of text subtitles
  • --disable-aac-support: disables support of the AAC audio codec
  • --disable-lavc-support: disables support of the Lavc video codec
  • --disable-lavf-support: disables support of the Lavf containers
  • --disable-mkv-support: disables support of the Matroska container
  • --disable-mp3-support: disables support of the MP3 audio codec
  • --disable-ogm-support: disables support of the Ogg Media container
  • --disable-srt-support: disables support of the SRT subtitle codec
  • --disable-theora-support: disables support of the Ogg Theora video codec
  • --disable-vorbis-support: disables support of the Ogg Vorbis audio codec
  • --disable-x264-support: disables support of the X264 video codec
  • --disable-xvid-support: disables support of the XviD video codec
  • --disable-libnotify-support: disables support of notifications

Some functionalities can also be parametrized at configuration time.

  • --with-ocr=auto|gocr|ocrad|tesseract: this option should be used to specify the OCR software to be used

Preferences

The Preferences dialog is divided into two tabs.

General

pref-generalThis tab groups all the options related to the encoding process as a whole.

Paths

  • Output Path: The folder in which the movie, the subtitles and, possibly, the log file will be stored at the end of the rip.
  • File Name: A list of templates for the filename of the rip. The extension is always the one of the container.

Preferred Languages

  • Audio: The first audio track of this language will automatically be selected when a DVD is inserted.
  • Subtitles: The first subtitles of this language will automatically be selected when a DVD is inserted.
  • Chapters: This option should be used to specify the language of the chapter information.

Avanced

pref-advancedThis tab groups the options for the advanced users.

DVD Copy

  • Copy DVD on hard drive before encoding: The DVD title is copied on the hard drive before the encoding. It takes a lot of disk space (between 5 and 10 GB) but it notably accelerates the encoding.
  • After the encoding: This option specifies what to do with the copy after the title has been encoded. It is possible to remove the copy, to keep it on the hard drive, to keep it on the hard drive and update the GUI so that any subsequent encodings are made from the copy or to ask the user.

Misc

  • Temporary Path: The folder in which all the temporary files while be stored.
  • Do not remove temporary files: The temporary files won't be removed and kept in the temporary folder. This option is only useful for debugging purpose.
  • Log commands output: The output of the commands spawned by OGMRip as well as the command lines themselves will be stored in a file with the same name as the rip but with the .log extension.

Profiles

profilesTo ease working with different configurations and simplify the choice of the container, the codecs and their options, OGMRip supports encoding profiles. By default, OGMRip provides a few profiles for relatively standard configurations but it is of course possible to mofify, copy, remove, rename, or export existing profiles and to add or import new ones.

The default profiles are:

  • PC, High Quality: Encodes the video in X264 and the audio in AAC, in a Matroska container, with options improving quality over speed, for an output size of 700 MB.
  • PC, Low Quality: Encodes the video in Mpeg-4 and the audio in Vorbis, in an Ogg Media container, with options improving speed over quality, for an output size of 700 MB.
  • DivX for Standalone Player: Encodes the video in Xvid and the audio in MP3, in an AVI container, with options improving compatibility with standalone players, for an output size of 700 MB.

More profiles are available on OGMRip's web site.

The following sections describe the profile editor dialog.

General

profile-generalThis tab contains the options related to the container and the encoding method.

Container

  • Format: The container in which the video, audio and subtitle streams will be joined. It also contains the necessary synchronisation information required to play the movie correctly.
  • FourCC: The FourCC is a four character code identifying the format of the video stream. It is generally not necessary to force the FourCC but it can be required by some standalone players.
  • Ensure A/V synchronization: This option should be used to improve the audio video synchronization by encoding a very low quality audio track along with the video stream. The encoding will, however, take some more time and disk space. Anyway, this option is not very expensive and seems to provide some reel improvement.

Encoding

OGMRip provides three encoding methods:

  • Fixed size: OGMRip can estimate the video bitrate based on the total size of the file it should create. The file could then be split in several tracks. Those options should then be used to specify the number of files that should be created and the size of each file.
  • Constant bitrate: The user specifies the video bitrate (in kbps). A higher bitrate gives a better quality.
  • Constant quantizer: Also called constant quality, this encoding method gives very high quality videos but very big files. A lower quantizer gives a better result.

Video

profile-videoThis tab groups all the options related to the encoding of the video stream.

Codec

The codec to encode the video. Four video codecs are supported by OGMRip at the moment, but only those with which it has been configured will appear here. XviD and Lavc Mpeg-4 are implementations of the Mpeg-4 (Part 2) standard for coding video; Ogg Theora is based on the freed VP3 codec from On2 Technologies; X264 is used to encode video streams in H.264/AVC.

Options

  • Passes: Specifies the number of passes to encode the video title. Encoding in 2 or even 3 passes provides a better distribution of the bits and greatly improves the global quality.
  • Quality: This option defines the quality of the rip. Be aware, however, that the highest quality can be extremely slow.
  • Reduce image noise: This option aims to reduce image noise producing smooth images and making still images really still. This should enhance compressibility.
  • Trellis searched quantization: Trellis quantization is a kind of adaptive quantization method that saves bits by modifying quantized coefficients to make them more compressible.
  • Use quarter pel motion compensation: MPEG-4 uses a half pixel precision for its motion search by default. The standard proposes a mode where encoders are allowed to use quarter pixel precision. This option usually results in a sharper image. Unfortunately it has a great impact on bitrate and sometimes the higher bitrate use will prevent it from giving a better image quality at a fixed bitrate.
  • Use a deblocking filter: TODO.
  • Use a deringing filter: TODO.
  • Turbo: Dramatically speeds up pass one using faster algorithms and disabling CPU-intensive options.

More Options

  • Crop image: When this option is checked, the image is croppable.
  • Scaler: To improve the quality of the rip, it is almost always necessary to downscale the image. This option specifies the software scaler algorithm to be used. The default option is recommended by MPlayer.
  • Minimum image size: This option specifies the minimum size under which the image cannot be scaled. If you don't want a minimum size, set width or height to 0.
  • Maximum image size: This option specifies the maximum size above which the image cannot be scaled. If you don't want a maximum size, set width or height to 0.
  • Expand image to maximum size: With the option, the image will be expanded to the maximum size by adding black bars around it.

Audio

profile-audioThis tab groups all the options related to the encoding of the audio streams.

Codecs

The codec to encode the audio. Four audio codec are supported by OGMRip at the moment, but only those with which it has been configured will appear here. OGMRip can also only extract audio tracks without encoding and then keep the quality of the AC3 or DTS formats for more data. MP3 is a lossy compression format widely used to exchange audio files. Ogg Vorbis has better performances but is rarely supported by standalone players. WAV is the most common format for uncompressed audio. Advanced Audio Coding or AAC offers a better quality/compression ratio than MP3.

Options

  • Quality: This option specifies the quality of the audio coding, 0 being the lowest quality, 10 the highest.
  • Channels: This option should be used to reduce the number of channels by merging their content.
  • Sample Rate: If the audio sample rate in the DVD is not the same as required by the target format, sample rate conversion is required.
  • Normalization: Maximizes the volume without distorting the sound.

Subtitles

profile-subpThis tab groups all the options related to subtitles extraction.

Codecs

The format of the subtitles. Two formats are supported by OGMRip at the moment, but only those with which it has been configured will appear here. SRT is a very simple yet sufficent text subtitles format. VobSub is the format of DVD subtitles. This is a binary format where subtitles are stored as images.

  • Forced subtitles only: With this option, only forced subtitles will be extracted.

Text Options

(These options are only accessible if the selected codec can extract text subtitles.)

  • Character Set: The character set to be used for the subtitles. Standalone players seems to prefer ISO-8859 or ASCII but some characters can only by stored in UTF-8.
  • End of line: End of line characters are not the same under DOS/Windows and UNIX. Some standalone players seem to prefer the DOS format.
  • Spell Checking: optical character recognition is not 100% sure and it is often necessary to perform spell checking.

Encoding

The encoding process is performed in several steps described hereafter. First, select the source. It can be either a DVD, the copy on the hard drive of a DVD or an ISO image. Next, select the title, audio tracks, subtitles and chapters to encode. Finally, set some DVD specific options.

Source Selection

loadTo select the source, click on the "Load" button to show the DVD Selection dialog. Then, either select a DVD-Video from the list or browse for a DVD structure or an ISO image. If you want to encode a disc that is not yet in the drive, you can click on the "Eject" button. Once you've made your choice, click on the "Load" button and the DVD will be loaded.

It is also possible to specify a device, a directory or an ISO image directely on the command line:

$ ogmrip image.iso

Main Window

mainOnce the DVD has been loaded, the main window shows the table of contents of the DVD sorted by titles. Each time a new title is selected, the audio tracks, subtitles and chapter information change accordingly.

Title and chapter information

The title of the DVD is automatically retrieved. It will be used as the basename of all the files. The names of the chapters, however, are not stored in the DVD. They should be specified by the user if necessary by double-clicking in the Name cells of the chapters list. Chapter information can also be imported from a file in the simple format or the Matroska XML format (see mkvmerge) with the "Import chapters" menu item. Only Matroska and OGM containers can store chapter information. It can be used by media players to navigate chapter by chapter.

Chapter information can also be exported for later use with the "Export chapters" menu item".

Video title, audio tracks and subtitles

OGMRip can only encode one video title at a time; by default, it will be the longest title. OGMRip, however, can encode several audio tracks and subtitles for a given video title, container permitting. That is the case for OGM and Matroska. This should also be the case for AVI and MP4, but MEncoder does not support it. By default, the first audio track and the first subtitles in the preferred language are selected. To add new streams, click on a '+' button and select the stream. To remove a stream, click on a '-' button.

OGMRip also supports external audio tracks and subtitles.

Chapters and relative mode

By default, all the chapters of a video title are selected for extraction. It is however possible to only extract a subset of contiguous chapters. In order to do so, one must check the boxes in the 'Extract?' column of the chapters list. As soon as a few chapters only are selected, the 'Relative Mode' check box becomes sensitive. When checked, OGMRip shall estimate the video bitrate as if all the chapters were encoded. This mode can be used to get a preview of one chapter or two to check the quality before encoding the full video title.

Options

optionsSome options can't be globally set, they are specific to a given encoding.

  • Profile: Use this list to select the encoding profile, that is, the container, the codecs and, moreover, their specific options.
  • Automatic cropping: By default, OGMRip automatically determines the cropping parameters to remove the black bands from widescreen movies. In some cases, the detection can be wrong and it is necessary to tweak those parameters.
  • Automatic scaling: Again, OGMRip tries to optimize the quality of the rip by downscaling the video to an optimal bits par pixel of 0.25. It is however possible to specify a custom image size or to use some predefined image sizes respecting the aspect ration of the movie. It should be noted that scaling parameters can only be autodetected if the bitrate and the cropping parameters have been explicitly specified.
  • Automatic compressibility test: It is also possible to improved the quality of the rip by testing the compressibility of the movie and adjusting the scaling parameters accordingly. By default, OGMRip automatically performs a compressibility test, but it is possible to deactivate this feature.
  • Cartoon: Activates cartoon specific optimisations to improve the quality.
  • Deinterlacer: For a very compatible movie, it can be necessary to deinterlace the video. But if you are encoding for high quality archival purposes, it is recommended not to deinterlace and to deinterlace the movie at playback time.

You can now click on the "Extract" button to encode the DVD title immediately, or press the "Enqueue" button and add it to the encoding manager.

Encoding Manager

encoding-queueEncoding multiple DVD titles can be a very long process if you must wait for an encoding to complete before starting the other. OGMRip now provides an encoding manager which takes care of this for you.

Here is how it works:

  • if necessary, it copies all the DVD titles on the hard drive
  • it then encodes the DVD titles
  • as soon as a DVD title isn't necessary anymore, it is removed from the hard drive

This way, you only have to wait until all DVD titles are copied, the encoding not requiring any human intervention.

Conclusion

Encoding a video is a complex process; encoding a high quality video is much harder. OGMRip tries as much as possible to simplify all this and to optimize the options and is quite good at it. In some cases, however, OGMRip does not provide enough control and settings and the audio and video streams can be slightly out of synchronization.

Appendix

OGMRip also provides a few executables that can used independently.

dvdcpy

dvdcpy is used to copy on the hard drive a full DVD or a some titles only, with or without the main menu.

$ dvdcpy -h
Usage:
  dvdcpy [OPTION...] <DVD DEVICE>

Help Options:
  -h, --help              Show help options

Application Options:
  -o, --output output     Specify the output directory
  -t, --title title       Select the title to copy. This option may be
                          specified multiple times (default: all titles)
  -m, --menu              Copy the DVD menu

subptools

subptools is the successor of srttool (see subtitleripper) and srtutil. It performs various manipulations on XML subtitles files from subp2pgm, subp2png and subp2tiff and convert them in the SRT or spumux format.

$ subptools -h
Usage:
  subptools [OPTION...]

Help Options:
  -h, --help                     Show help options

Application Options:
  -v, --verbose                  Verbose
  -r, --renumber                 Renumber all entries
  -s, --subst                    Substitute filename after time stamps by its
                                 content
  -w, --strip                    Remove leading white space in text lines
  -d, --shift=<time>             Shift all timestamps by <time> seconds
  -c, --cut=<first[,last]>       Write only entries from first to last (default:
                                 all entries) to output
  -a, --adjust=<hh:mm:ss,ms>     Adjust all time stamps so that the first tag
                                 begins at hh:mm:ss,ms
  -e, --expand=<seconds>         Expand the subtitle hour by <seconds>
  -t, --convert=<format>         Convert the subtitle in the given format (srt,
                                 spumux)
  -i, --input=<filename>         Use filename for input (default: stdin)
  -o, --output=<filename>        Use filename for output (default: stdout)

subp2pgm, subp2png, subp2tiff

subp2pgm, subp2png and subp2tiff can be used to extract PGM, PNG and TIFF images respectively from VobSub subtitles.

$ subp2pgm -h
Usage:
  subp2pgm [OPTION...] <vobsub basename>

Help Options:
  -h, --help                  Show help options

Application Options:
  -o, --output=<filename>     Use filename for output (default: stdout)
  -s, --sid=<sid>             The subtitle id (default: 0)
  -f, --forced                Extract only forced subtitles
  -v, --verbose               Increase verbosity level

theoraenc

theoraenc is a simple and minimalist Ogg Theora encoder.

$ theoraenc -h
Usage:
  theoraenc [OPTION...] <VIDEO FILE>

Help Options:
  -h, --help        Show help options

Application Options:
  -o, --output=<filename>     Use filename for output (default: stdout)
  -b, --bitrate=<bitrate>     Bitrate target for Theora video
  -q, --quality=<quality>     Theora quality selector from 0 to 10 (0 yields
                              smallest files but lowest video quality. 10 yields
                              highest fidelity but large files)
  -a, --aspect=<aspect>       Set the aspect ratio of the input file
  -f, --framerate=<rate>      Set the framerate of the input file

theoraenc only accepts YUV4MPEG2 uncompressed video.