first commit

This commit is contained in:
Julian Mutter 2022-05-29 15:22:48 +00:00
commit 1367258d87
3 changed files with 49 additions and 0 deletions

8
README.md Normal file
View File

@ -0,0 +1,8 @@
# Dvd Rip
Scripts to simplify ripping of dvds
## Dependencies
- perl
- lsdvd
- dvdbackup
- ffmpeg

38
rip_dvd.pl Executable file
View File

@ -0,0 +1,38 @@
# !/usr/bin/perl
# Copy dvd with dvdbackup
sub trim {
my $s = shift;
$s =~ s/^\s+|\s+$//g;
return $s
}
sub printHelp {
print "Usage: $0 [source]
source: dvd device to rip from. Default: /dev/cdrom"
}
my $source = "/dev/cdrom";
if($ARGV[0] eq "help" || $ARGV[0] eq "--help"){
printHelp;
exit 0;
} elsif($ARGV[0]) {
$source = $ARGV[0];
}
my $dest = "/home/julian/Videos/dvds/";
my $title = trim `lsdvd /dev/cdrom | grep "Disc Title" | sed 's/Disc Title: //'`;
print "Ripping dvd $title ($source) to $dest";
my $exitcode = system("dvdbackup -i $source -o $dest -M -n $title");
# $exitcode >>= 8;
if($exitcode == 0) {
print "Success!";
}
`notify-send "DVD $title ripped successfully!!!"`;
# `eject $source`;

3
video_diff.sh Executable file
View File

@ -0,0 +1,3 @@
# !/bin/sh
ffmpeg -y -i "$1" -i "$2" -filter_complex '[1:v]format=yuva444p,lut=c3=128,negate[video2withAlpha],[0:v][video2withAlpha]overlay[out]' -map [out] video_diff.mov