commit 1367258d871ed7e18f0efcbfacd285090509f00b Author: Julian Mutter Date: Sun May 29 15:22:48 2022 +0000 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..01a515c --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Dvd Rip +Scripts to simplify ripping of dvds + +## Dependencies +- perl +- lsdvd +- dvdbackup +- ffmpeg diff --git a/rip_dvd.pl b/rip_dvd.pl new file mode 100755 index 0000000..3d443da --- /dev/null +++ b/rip_dvd.pl @@ -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`; + diff --git a/video_diff.sh b/video_diff.sh new file mode 100755 index 0000000..449e77b --- /dev/null +++ b/video_diff.sh @@ -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