Workflow for converting mini DV tapes in Linux

I had a ton of home videos on miniDV tapes that I wanted to have available on my media PC, so I set up a few scripts to make this happen.

With the magic of inotify, it made the process fairly straightforward.

The first step is to start the inotify watch:

set -u
set -e
set -o noclobber

while true
	FILENAME=`inotifywait -r . -e close_write --format %f 2> /dev/null`

	if [[ "$FILENAME" = *.dv ]]
		nice -20 ffmpeg -i $FILENAME -target ntsc-dvd completed/$FILENAME.vob

Then, start the file transfer:

dvgrab -f raw -autosplit -size 0 -showstatus -t -rewind

With short clips, the files are occasionally missed because ffmpeg is still running, so a final pass takes care of the missed files:

for i in *.dv; do ffmpeg -i $i -target ntsc-dvd completed/$i.vob && rm $i; done

Leave a Reply

Your email address will not be published. Required fields are marked *