Continuing my current obsession with ripping DVDs is my perlification of jmos1277’s Automated DVD ripping script using DVDFab
I’m using DVDFab to rip since it doesn’t seem to get tripped up as often with weird copy protection crap.
Luckily, Win32::DriveInfo will give me the volume name of the DVD. If I get time, I’ll rewrite so it checks for duplicates and appends the date&time to get a unique filename for output. It’s a little annoying when 3 discs are all named “DVD_VIDEO”.
I’m not setting it as an autorun action for the DVD drive because I’m going to call it from the ripinator script.
ripdisc.pl
[perl]
use strict;
use Win32::DriveInfo;
my $dvdfab = "C:\Program Files\DVDFab 8\DVDFab.exe";
my $dvd_drive = "D";
my $dest_dir = "C:\ISO";
my $mode = "mainmovie";
my $titlemode = "auto";
my $audio = "English";
my $audiotype = "AC-3/5.1&AC-3/2";
my $removedts = "yes";
my $removemenu = "yes";
my $removepgc = "yes";
my $subtitle = "English";
my $displayforcedsub = "yes";
my $outdisc = "dvd5";
(my $volumeName,
my $VolumeSerialNumber,
my $MaximumComponentLength,
my $FileSystemName, my @attr) = Win32::DriveInfo::VolumeInfo($dvd_drive);
my $dest_file = $dest_dir . "\" . $volumeName . ".iso";
my $dupNumber = 1;
while (-e $dest_file) {
$dupNumber++;
$dest_file = $dest_dir . "\" . $fileout . " (" . $dupNumber . ").iso";
}
my @ripcmd = ($dvdfab,
"/mode "" . $mode . """,
"/src "" . $dvd_drive . ":\"",
"/dest "" . $dest_file . """,
"/title "" . $titlemode . """,
"/audio "" . $audio . """,
"/audiotype "" . $audiotype . """,
"/removedts "" . $removedts . """,
"/removemenu "" . $removemenu . """,
"/removepgc "" . $removepgc . """,
"/subtitle "" . $subtitle . """,
"/displayforcedsub "" . $displayforcedsub . """,
"/outdisc "" . $outdisc . """,
"/close");
system(@ripcmd);
[/perl]