Painlessly extract dv video and convert to mp4 with two commands, unattended

I've got a crappy old dv camcorder that we've been using to film our wakeboarding. The video quality is crap by modern standards, but good enough as a training tool.

There are a ton of video capture and processing tools packaged for Debian and easily installed with apt-get. After trying a few, I've found dvgrab and ffmpeg to work well with minimal effort on my part.

My workflow:

  • Go wakeboarding and have lots of fun (don't forget to film)
  • Go home
  • With the lens cap on, hit record for a few seconds (this will produce a short black clip, which can be used to easily identify where today's riding ended and any clips following this one can be discarded)
  • Hit "rewind" on the camcorder, attach to computer with a firewire cable
  • Run dvgrab to extract the video. The following command will automatically split the video along pauses (super handy as it saves me from manually extracting each rider's section):
    dvgrab -f raw -autosplit -size 0 -showstatus
    
  • Run ffmpeg to convert raw dv into mp4
    for f in *dv; do
     ffmpeg -i $f -threads 0 -acodec libfaac -ab 96k -vcodec libx264 $f.mp4
    done
    
  • rsync to web server (or dropbox or some such) for sharing

That's it, extraction and conversion achieved with just two commands, running unattended so I'm free to do other things.

Leave a comment

NOTE: Enclose quotes in <blockquote></blockquote>. Enclose code in <pre lang="LANG"></pre> (where LANG is one of these).