Here is a small collection of Bash shell scripts to capture DV video, for example from MiniDV tapes, over FireWire and convert them to H.264 MP4 files for archiving.
Any *nix environment with Bash and the prerequisite external programs should be able to run these, although I have only tested them within Ubuntu 20.04 LTS at this time.
- Clone this repository on your system
- Ensure that bash is installed and accessible from /bin/bash
- Ensure that the following external programs are installed and available in
your path.
- dvgrab
- ffmpeg
- exiftool
This can be somewhat tricky in a modern system, since FireWire is required. You will need a system with a FireWire interface, an appropriate FireWire cable with the correct connectors, and a DV camera or tape deck with a FireWire output.
Technically dvgrab, the program that is actually used to capture the DV video
(and audio) can support capture over USB using the UVC protocol, but the
appropriate parameters aren't being passed by default and I haven't tested
this method. You would have to edit captureDv.sh and add the appropriate
--input file parameter.
./captureDv.sh
Simply running ./captureDv.sh will invoke dvgrab with parameters to capture
each recording to a separate file, in the "raw" DV format, as well as
generating srt subtitle files containing the recording date and time.
./captureDv.sh "mymovie-"
The optional base parameter is used as the beginning of the filenames, and
defaults to "dvgrab-" if it is not provided. The filename will also contain
the date and time of the first frame of the recording.
I have forked @githof's convertDvToMp4.sh
shell script, itself a fork of @jhubble's version.
This script handles converting and de-interlacing the DV video to H.264 MP4.
My contributions to this script are to embed the subtitle file generated by
dvgrab into the MP4 file.
./convertDvToMp4.sh
Simply running ./convertDvToMp4.sh will convert all *.dv files in the
current directory to .mp4.
./convertDvToMp4.sh VIDEOS/K27-mar-2010/ VIDEOS/K30-oct-2010/clip-2010-12-25\ 10\;00\;09.dv
Since this is based on @githof's fork, you can also provide a list of files and/or directories as arguments.
Special thanks to @jhubble and @githof for providing the convertDvToMp4.sh
script. I would also like to offer a special thanks to the contributors and
maintainers of the dvgrab, ffmpeg, and exiftool projects. Without all of you
none of this would be possible.
THANK YOU!