[mdlug] Why I like Linux - bulk DV encoding

Ingles, Raymond Raymond.Ingles at compuware.com
Tue Jan 5 10:27:53 EST 2010


 We have a bunch of Digital8 tapes from our old camcorder - basically DV
video on Hi8 tapes. Over the holidays I finally got the gumption to
extract and convert them to something more modern. Fortunately, Linux is
ideal for this sort of thing.

 Using 'dvgrab', I can just hook the camcorder up via Firewire. I don't
even need to manually rewind the tapes before capturing; dvgrab has a
"-rewind" command that takes care of that. The command I've settled on
is:

 dvgrab -rewind -autosplit=28800 -timestamp dv-

 The 'autosplit' generates a new file if there's a gap of 8 hours or
longer between clips, and the 'timestamp' flag incorporates the time and
date into the filename. I just swap tapes every so often and it grabs
the video and saves it for me.

 Then, I used the 'h264enc' script to experiment with the best way to
convert the video to H264. I decided to deinterlace the video, and used
the 'ps3hq' (Playstation 3 High Quality) preset otherwise, so I could
play the files easily on our big TV via the PS3. Happily, the h264enc
has an option to write out its mencoder commands to a file, so I could
incorporate them into my own script with only slight editing of the
input and output filenames.

 Once I had a script that would encode a single file properly, I wrote a
second, wrapper script that would call the encoding script repeatedly
for all DV files in a given directory. (BTW, DV is not a well-compressed
codec - the H264 files are about 1/13th the size of the DV versions, and
nearly indistinguishable in quality.) Encoding the video takes a while -
even on an Athlon 64 X2 Windsor 5600+ (dual-core, 2.8GHz), it processes
at around 10fps - but is also 'fire and forget'.

 I plan on giving the old tapes to my parents to store at their house
for an offsite back-up. I'll keep the H264 files on my hard drive here,
and also back them up to DVD. Burned DVDs are hardly a reliable backup
mechanism, of course, but there's the 'par2' utility, which generates
redundant parity information for files. I plan on burning the DVDs with
~15% redundancy, so that they'll need to be fairly damaged/aged before
recovery is impossible.

 Sincerely,

 Ray Ingles                                                (313)
227-2317

 "Deism has always struck me as rather pointless. A kind of religion
lite
  for people who want to try and be rational but are unable to let go of
       superstition entirely. It is a nicotine patch for the soul."
                            - Matt Penfold

The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.




More information about the mdlug mailing list