ripdvd.pl - rip DVD to an MP4
Download this program
ripdvd.pl -fastfactor 32 -ripandconvert Lone_Ranger # Creates Lone_Ranger.m4v
ripdvd.pl -ripimage Lone_Ranger
ripdvd.pl -ripimage Tonto
ripdvd,pl -scan Lone_Ranger Tonto
ripdvd.pl -convert Lone_Ranger # Creates Lone_Ranger.m4v
ripdvd.pl -convert a/Tonto b/Lone_Ranger # Creates Tonto.m4v + Lone_Ranger.m4v
ripdvd.pl -convert -name myrip Tonto Lone_Ranger # Creates myrip.m4v myrip_2.m4v
Use this program to rip the contents of a DVD to disk and then
convert each chapter of interest to MP4 format.
This script requires you have vobcopy and handbrake installed.
Debian users can install vobcopy like this:
sudo apt-get install libdvdread4 vobcopy
Read more at https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs
Debian users can install handbrake like this:
sudo apt-get install handbrake-gtk handbrake-cli
Read more at http://handbrake.fr/
Here are some other details regarding MP4 manipulation you may find useful:
Split MP4 into parts
Copy a DVD image to disk could be done with these incomplete commands:
ffmpeg -i IN.mp4 -ss 00:00:00 -t 01:04:06 -vcodec copy IN1.mp4
ffmpeg -i IN.mp4 -ss 01:04:06 -vcodec copy IN2.mp4
vobcopy -f -F 64 -m -o dvddir
You can copy multiple MP4 files together with MP4Box (gpac package) or
simply concatenate the VOBs of interest into one file.
You can capture a screen shot from a video like this
mplayer -vf screenshot yourmovie.m4v
enter 's' to capture image and create shot0000N.png
You may want to resize image to 170x250
Specifies you wish to convert the VOBs in the directories provided to M4V format.
The list of directories to be converted is provided as parameters.
The VOBs for each video to be created are merged into one temporary file
(create in the current working directory).
Handbrake is used to convert the temporary VOB file into an M4V file
in the current working directory.
The name of the M4V file will be taken from the input directory name
(leading directory names are removed).
If multiple M4V files are created from one input directory,
an index number is appended to each M4V created.
- -fastfactor N
Specifies the fasftfactor option used by vobcopy for a faster copy
of a DVD image to a directory.
This defaults to 64 (maximum supported).
- -minvideosize N
You normally do not want all video on a DVD to be converted to MP4 format.
This script will attempt to guess which VOBs are of interested
based on the size of the VOB data.
This defaults to 1000000000;
- -preset name
Specifies the HandBrake preset name to be used.
This defaults to Normal.
You can see all the HandBrake presets with the command HandBrakeCLI --preset-list.
- -name stringprefix
Specifies that prefix of the MP4 file to be created by -convert.
The stringprefix should not contain the .mp4 or .m4v extension.
A number is added to this string when multiple directories are
converted in one run.
Generates this output.
When creating a DVD image (-ripimage) the output directory
will be created for you.
Specifying this option will remove it entirely and then re-created it.
This option can also be used to for replacing M4V files that already exist.
- -ripandconvert dvddir
Specifies you wish to make an image of the DVD in the directory dvddir
and then convert the VOBs in the directories provided to M4V format.
- -ripimage dvddir
Specifies you wish to make an image of the DVD in the directory dvddir.
The DVD should already be mounted.
If it is not, this script will attempt to mount it (requires sudo).
This directory dvddir should not exist, but will be created.
Will scan a set of -ripimage directories and report what was found
and a candidate to be -convert-ed.
- -verbose N
Controls the amount of additional information generated.
A value of '1' for N is generally sufficient.
- -watchdog MIN
Controls how long vobcopy will run when attempting -ripimage.
The number specified is in minutes.
This can be used by vobcopy to avoid cases where the DVD is
faulty and reading it runs forever.
The default is 12 minutes.
- dvddir1 dvddir2 ...
Specifies a list of directories of DVD images (created by -ripimage)
which should be -scan-ed or -convert-ed.
If no fatal errors are detected, the program exits with a
return code of 0. Any error will set a non-zero return code.
Written by Terry Gliedt <firstname.lastname@example.org> in 2013 and is
copyrighted (C) by Terry Gliedt.
This code is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; See http://www.gnu.org/copyleft/gpl.html