Capture HDV in GNU/Linux

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Capture HDV in GNU/Linux

Post by ^rooker »

Capturing HDV video off a DV tape is nothing new.
However, this thread is going to document how to capture HDV using only Free Software - and making sure that the capture process is getting all the bits without any interference anywhere (no silent transcoding or similar things).

1) The capture tool: "dvgrab"
"dvgrab" is a tool for capturing DV/HDV streams - in most cases over Firewire (IEEE1394).
"dvgrab" is the engine behind the video recording/editing tool "Kino", and although there haven't been any changes to it since September 2009, it is considered stable, widely used and documented - and available out-of-the-box on most GNU/Linux distributions.

We will use dvgrab for the actual transfer process of the video bitstream from tape to disk.
Here's the most straightforward, basic mode of operations for HDV:

Code: Select all

$ dvgrab -f hdv --size 0 <basename>
(The "--size 0" argument causes dvgrab to capture one single, big file)

Due to dvgrab being a commandline-only tool, it does not have visual monitoring built-in.

Thanks to pipes and the popular Unix philosophy, this ain't a problem:
"Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new features."
...so we can even choose which tool to use for monitoring.

2) Monitoring the captured video:
I'll show 2 ways for you to do it:
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Advanced options

Post by ^rooker »

If you have a DV/HDV playback device which can be controlled using dvgrab, capturing with the following parameters might be interesting for you:

Code: Select all

$ dvgrab -f hdv -rewind -showstatus -buffers 500 <basename>
The additional commandline arguments explained:
  • -rewind:
    Rewind the tape before performing the capture. This makes sense for mass-digitization.
  • -showstatus:
    Display status during capture.
  • -buffers 500:
    Numbers of frames to buffer to compensate for I/O bottlenecks. By default, this is set to 100 frames. If your hardware allows, it's usually a good idea to have this larger.
Use the above mentioned pipe combination to use ffplay/VLC for monitoring.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Waiting for HDV...

Post by ^rooker »

[PROBLEM]
On a SONY DV/HDV replayer (model HVR-M25E), I just ran into something strange:
Found AV/C device with GUID 0x0800460104ce4747
Waiting for HDV...
avplay version 0.8.9-4:0.8.9-0ubuntu0.12.04.1, Copyright (c) 2003-2013 the Libav developers
built on Nov 9 2013 19:08:00 with gcc 4.6.3
0.00 MiB 0 frames
Capture Stopped
Error: no HDV. Try again before giving up.
The stream on the tape was HDV however...

[SOLUTION]
Some replayer devices offer downscaling of HDV to DV. You can check in your device settings if this is enabled - and if it is: Disable it.
On that HVR-M25E replayer, there are small LEDs below the tape deck, indicating source signal (HDV/DVCAM) and the output signal sent over the iLink/Firewire interface: HDV/DVCAM/DV.

Before you capture, it is always suggested to check if source and output format match.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
peter_b
Chatterbox
Posts: 383
Joined: Tue Nov 12, 2013 2:05 am

Deck control per commandline

Post by peter_b »

In a certain mass-capture scenario, I've been using dvgrab with the "-rewind" option, which made it more comfortable to capture tapes that were or were not rewind as they come in.
We also wanted to rewind the tape after capture.

For this, I'm currently using the tool "dvcont" (DV Control), included in the "libavc1394-dev" or "libavc1394-tools" package (on some distros, e.g. Ubuntu 12.04, there's only the "-dev" package, no "-tools").
This can also be used to eject the tape when finished.
Post Reply