Hack61.Rip and Encode DVDs with a mencoder Frontend

Hack 61. Rip and Encode DVDs with a mencoder Frontend

The acidrip utility gives you access to many of the common mencoder functions that rip and encode a DVD in a GUI.

In "Encode a DVD to MPEG4 from the Command Line" [Hack #60], I discuss how to use mencoder's 2-pass encoding to turn VOB files you have extracted from a DVD into an MPEG4 .avi file. This method works great; however, some people are turned off by the thought of doing encoding entirely from the command line. If you want to use mencoder to encode a DVD, but would rather have a GUI, the acidrip utility provides you with most of the major mencoder options you might want in a GUI interface.

First, install acidrip. If you search Google a bit, you can find third-party acidrip packages for most distributions. For example, Debian packages are available in Marillat's third-party repository that also houses packages such as mplayer and mencoder. If you can't find a pre-built package, then download the acidrip and accompanying lsdvd packages from the official site at http://untrepid.com/acidrip and follow the installation instructions.

With acidrip installed, type acidrip to start the program. The default screen that greets you (see Figure 3-5) can be a bit intimidating at first since it has so many options. For basic ripping there are only a few options you need to worry about, and the nice thing is that acidrip will remember your settings for next time. That means that after you have it set up, you can rip multiple DVDs with minimal effort.

Figure 3-5. acidrip default window

To rip a DVD, first locate the section on the right side of the window labeled Video source and type the path to your DVD in the Path field. If you are ripping directly from a DVD, insert the DVD and type the path to your DVD device (such as /dev/dvd). Otherwise if you have already ripped the DVD to the hard drive, type in the path to the directory that contains the VIDEO_TS directory. Click Load, and acidrip scans the DVD and displays each title with its playback time. Use the playback time to identify the main title you want to encode (generally the title with the longest playback time, and often the first title on the DVD) and select it.

If you are unsure of which title is the correct title, select the title and then click the Preview tab. Click the Preview button in that tab and acidrip uses mplayer to play that track inside the window. Uncheck the Embed window if you want to watch the video in its own window. If you enable any crop settings, you can also preview those here.

Now click on the General tab on the left side of the window and fill in the Track title if acidrip didn't automatically detect it for you. By default, acidrip uses this field for the final filename. In the Filename field, type in the path where you want acidrip to put the final encoded video. The %T in this field is a variable that gets replaced with the contents of the Track title field. In the dropdown menu next to the Filename, you can choose whether to give the final video an .avi or .mpg extension. Underneath that field you can configure the final file size for the video and whether to split it across multiple files. For instance, if you wanted to fit the video across two CDs, you would set File size to 700 and # Files to 2.

The above settings should be fine for the average case, but acidrip provides plenty of other options so that you can configure mencoder for your special case. The General tab also lets you configure what codec to use for the audio track along with whether to include a subtitle in the final video.

The Video tab gives the experienced mencoder user access to more advanced options. Here you can configure which codec to use for the output file and you can set the bitrate for the final file by hand. You can also crop the final video or scale it to a different width and height. If you want to add any special pre- or post-filters to mencoder you can also configure that here.

I noticed that my version of acidrip had the pp=de pre-filter enabled by default, which caused an error in mencoder. I simply disabled this filter and the acidrip worked fine.

After you have configured your settings the way you want them, click the Queue button at the bottom of the window to add the job to the queue. The Queue tab displays any queued jobs you have set. This tab can be handy if you want to learn more about the mencoder processes acidrip uses, because it displays the full commands it will run in this tab. This can also be good for debugging purposes if acidrip fails to start ripping. Copy and paste the mencoder lines from the queue to the command line and make note of any errors mencoder outputs. You can also queue more than one job, so you can line up a bunch of jobs and leave them running overnight.

The Settings tab lets you configure general acidrip options including what program to use for mencoder, mplayer, and lsdvd (useful if there is more than one instance of these programs in your path) and what directory to use to cache a DVD (if you have that enabled). From this tab you can also tell acidrip to automatically shutdown the computer after it is finished ripping.

Once you finish configuring your job and queue it, click the Start button to start the encoding process. acidrip shrinks down to a smaller window and displays its progress, including time left in the current process, encoding speed, and estimated file size. Click the Full View Button to go back to the full-sized window. When acidrip finishes, it goes back to full view, and you will be able to check out your new video files in the directory you specified.

As I said earlier, the nice thing about using acidrip over mencoder from the command line is that you can tweak acidrip with your favorite mencoder settings a single time and then just concentrate on adding encoding jobs. This will help eliminate the problem of trying to remember which options to use each time, plus it makes it easier to queue up multiple jobs one after another.

Linux Multimedia Hacks
Linux Multimedia Hacks
ISBN: 596100760
Year: 2005
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net