my tildelog

a blog about tildes

Using dvgrab to archive miniDV tapes and more, with Arch Linux

November 22, 2022 — ~rawktucc

This is a simple guide on how to setup dvgrab on Arch Linux, to allow capturing of MiniDV+ tapes (and others using the DV format) over Firewire. This is considered a “lossless” capture, as the DV stored on the tape is put to PC as-is, as it’s simply a digital format.

This means however, that if the DV tape is degraded, older, or noticeably damaged somehow, the output may be missing data, or have inconsistent playback. You’ll notice this with dvgrab throwing errors; with the video having visual bars on screen; the audio having glitches; and both having inconsistencies and discontinuities in playback (skipping/missing parts).

  1. Setup an Arch Linux bootable USB. Unfortunately I won’t cover this in the guide, it’s different for every system (Legacy vs UEFI boot for example).

    1. I recommend writing to a USB drive that uses USB 3.0. Your write speeds won’t be spectacular, but read speeds will be excellent for booting.
    2. Note this guide is only focused on Arch Linux, and not derivatives like Manjaro.
  2. Boot into the Arch installation live session.

    1. You may wish to choose “Copy to RAM”, as this will free up a USB port, as well as making operation much faster.
      1. It takes slightly longer to boot, depending on the read speed of your USB.
  3. Once booted full, you’ll be dropped to the root terminal prompt.

    1. You may wish to connect over SSH. The SSH daemon should be running by default, use your preferred application or ssh client to connect (putty, ssh, mosh, etc)
    1. OPTIONAL: At the terminal prompt, type “tmux” and hit enter.
    2. tmux is a “terminal multiplexer”, allowing multiple shell sessions in one contained window.
    3. It also allows recovery of “reconnecting” to a terminal window if somehow you lose connection (if you are connecting to the system over SSH for example)
    4. tmux uses a “control” shortcut scheme to activate tmux commands. The standard command is pressing the LEFT CTRL + B button, then pressing another key as a means of entering a command.
      1. The most used would be LEFT CTRL + b, then c (lowercase), to create a new terminal shell.
      2. Next most used would be LEFT CTRL + b, then “ (double quotes, shift+ ‘” button) to split the window into two. You then use the control command and the ARROW KEYS to switch between windows
  4. Ensure you are connected to the internet. If you are using a laptop, please use the following command to connect to a wireless network:

    1. iwctl
    2. Follow on-screen help to connect. Otherwise, please use a wired ethernet connection
  5. Once connected to the internet, run the following command:

    1. pacman -Syy dvgrab libforensic1394 libraw1394 libavc1394 libdc1394
    2. the above command does the following:
      1. pacman is the package manager
      2. -Syy means “Install + update local package repo information + forcefully update local repo information”
      3. The text following that are the packages to install, in this case: dvgrab, the main tool; and libraries for interfacing with Firewire tools/devices. Not all are truly necessary, but better safe than errored out ☺
  6. Once the install completes successfully, connect your device to a firewire connection on your system, if you haven’t already.
  7. Prepare your tape in your MiniDV/DV playback device. Ensure it’s rewound completely to the start, or to where your timecode starts.
  8. Before starting capture, determine where the captured files will be stored. If you have an external USB device you want to store them on, mount the device:

    1. Enter the command “lsblk” (no quotes), hit enter
    2. Before plugging in the USB device, confirm it’s formatted as NTFS or exFAT, and NOT FAT32. FAT32 does not support files larger than 4GB, and dvgrab is best run by capturing to a single file, versus splitting into 4GB chunks.
    3. Plug in the NTFS or exFAT formatted USB drive.
    4. Run “lsblk” again and look for a new device that should have appeared; it should be sdX where X is the letter assigned. Check the size of the drive matches your plugged in USB device
    5. Once properly identified, mount your USB device, replacing X with the appropriate letter:
      1. mount /dev/sdX /mnt
      2. If you get an error, your device is encrypted, or using some special format, you’re on your own here (or email me ☺ )
    1. Alternatively, follow the above steps in using lsblk, except simply look for the approprate internal HDD/SSD you want to mount and store the data on.
  9. Once your storage point is available and ready, your tape rewound to start/desired timecode, the DV playback device connected, and your computer available, RUN DVGRAB! :D
    1. dvgrab -csize 0 -size 0 -showstatus -timestamp -timesys -f raw Filename_.dv
    2. The above command broken down:
      1. -csize 0: Don’t split the file
      2. -size 0: Don’t set any sort of filesize limit
      3. -showstatus: show the current status of the dvgrab process, frame by frame. Good for seeing any errors pop up
      4. -timestamp: adds timestamp from tape timecode to the filename, and to the internal dv header
      5. -timesys: adds system time to the filename
      6. -f raw: grabs the raw stream from the tape, most important flag

Enjoy your digitized tapes!

tags: digitization, dvgrab, dvtapes, minidv, archive-stuff, arch