Using Ubuntu to Convert a DVD to an MP4 File

Use Handbrake to backup your DVDs on Ubuntu

This guide shows how to convert DVDs to the MP4 file format in the Ubuntu/Linux operating system. This process is commonly known as ripping.

Hand inserting a disc into a laptop computer
LdF / E+ / Getty Images

Legal Considerations When Ripping DVDs

You must know your local laws when it comes to copyrights. In many countries, you cannot legally convert DVDs to a digital format if the DVD has copyright protection. Not all DVDs, however, have copyright. For example, school plays and weddings are often filmed by a professional and distributed on a DVD. It is unlikely that anything is stopping you from legally converting the content on the DVD to a digital format.

Set up Ubuntu and Install Handbrake

Install the Handbrake, Ubuntu Restricted Extras, and Libdvd-pkg software before ripping a DVD.

Handbrake is included in the default Ubuntu repositories, but there's a chance that the package is outdated. To get the latest release, go to the official Ubuntu PPA.

  1. Open a terminal window and type the following command to add the PPA to your system:

    sudo add-apt-repository ppa:stebbins/handbrake-releases
  2. Update your package database, then install Handbrake. This installs the video decoding software for converting DVDs to MP4.

    sudo apt update
    sudo apt install handbrake-gtk
  3. Type the following command at the terminal prompt to install the restricted extras package. This installs a collection of codecs.

    sudo apt install ubuntu-restricted-extras
  4. During the installation, a purple screen appears with a license agreement. Press Tab to highlight the Ok option to accept the agreement, then press Enter.

    OK button in Ubuntu
  5. Install the libdvd-pkg to install a library that plays DVDs in Ubuntu by entering the following command:

    sudo apt install libdvd-pkg
  6. During the installation, you are asked to accept an agreement. Press Tab to select the Ok option, then press Enter.

    OK button in Ubuntu
  7. At the end of the process, you may get a message saying you need to run another apt-get command to continue installing the package. If you get this message, type the following command:

    sudo dpkg-reconfigure libdvd-pkg
  8. Allow the installation to finish, then run Handbrake either by pressing the super key to bring up the dash and searching for Handbrake or by running the following command in the terminal:

    handbrake &
    Ubuntu launch Handbrake
  9. You're now ready to set up the DVD device and file format.

Select DVD Device and Set File Name and Format Settings

After installing and launching Handbrake in Ubuntu, insert a DVD into your disc drive.

  1. In Handbrake, press Open Source in the upper-left corner of the screen.

    OpenSource button in Handbrake
  2. In the new file browser that opens, select the Detected DVD Devices drop-down menu, choose your DVD player from the list, then select OK. You can also select the DVD from the left menu if it appears there. A scan takes place to import information about the DVD.

  3. Select the Summary tab to display details for the DVD that you intend to rip along with the settings. To change the output format, select the Format drop-down menu and choose from the available options. The most common format is MP4, but MKV is also common.

    Summary tab in HandBrake
  4. In the Save As field, enter a name for the converted file, then set the location where you want to save the file.

    Save As field in HandBrake
  5. Select the Preset drop-down menu and choose a video output format and resolution.

    Preset category in HandBrake
  6. Additionally, choose a preset for encoding the DVD in the best format for certain devices such as iPods and Android tablets. You can choose to encode the entire DVD or a range of chapters. You can also optimize the output for putting the final video on the web.

Picture and Video Settings

The Dimensions tab isn't particularly useful unless you want to crop the video's dimensions.

Dimensions tab in HandBrake

The Video tab lets you choose the video encoder and determine the quality of the final output. The encoders available include H.264, H.265, MPEG-4, and MPEG-2.

You can also choose between a constant and a variable framerate. In most situations, choose a constant framerate rather than a variable framerate.

Video tab in HandBrake

Other settings include the ability to choose the quality, a profile, and a level. The defaults suffice in most cases. However, if you convert cartoons and use the H.264 encoder, there is a Tune option called Animation, and this is better than the default option.

The best way to get the most out of Handbrake is with trial and error. These settings work well for most DVDs, but you can try different settings to see what works for you.

Audio and Subtitle Settings

A DVD may be encoded in different languages. You can choose the languages you wish to use on the Audio Defaults tab. Choose individual languages by selecting the Add button and the Remove icon to the right of the entry.

Add and Remove options in the Audio tab of HandBrake

By default, the AAC encoder is selected for ripping the audio from the DVD. It is worth adding a second encoder for MP3, in case the machine playing the ripped file isn't capable of playing AAC encoded files.

The Subtitles tab lets you select the languages to use for subtitles. It works in the same way as the ​Audio tab. If you don't want subtitles, choose None as the selection behavior.

Tags for Your Video

The Chapters tab has a list of the DVD's chapters. You can name each chapter to make it more memorable during playback.

The Tags tab lets you add information about the video, such as the title, the actors, the director, release date, comments, genre, description, and details about the plot.

Tags tab in HandBrake

Rip Your DVD

When you finish adjusting the settings for your video, start the ripping process. Select Start at the top of the screen. The process can take a while depending on the length of the DVD. When the process is complete, you can find the ripped video file in the location you chose for it.

Start button in HandBrake