Introduction

dvgrab is a program that captures DV or HDV (MPEG2-TS) video and audio data from digital camcorders via FireWire (IEEE 1394). The data is stored in one or several files and can later be processed by video editing software. dvgrab can remote control the camcorder but it does not show the video's content on screen.

dvgrab also supports UVC (USB Video Class) compliant DV devices using Linux kernel module uvcvideo, which is a V4L2 driver. In this mode, there is no AV/C VTR control and therefore interactive mode is almost useless.

The basic command is:

dvgrab [options] [base] [-]

The base argument is used to construct the filename to store video data: base-num.ext. num is a running number starting from 001, and ext is the file name extension specifying the file format used, e.g. avi. A different naming scheme is used whenever the -timestamp, -timecode, or -timesys is given (see below). If base is a full filename including extension, then dvgrab attempts to determine the output file format from the extension, but it still inserts num. The default value for base is "dvgrab-".

Stdin and stdout [-]

If you specify a trailing '-' then the format is forced to raw DV or HDV and sent to stdout. By this way you can create pipelines to, for example, Gstreamer.

dvgrab - | some dv sink

You can use dvgrab's powerful file writing capabilities with other programs that produce raw DV or HDV. Using the -stdin option and if dvgrab detects that it is on the receiving end of a pipe and it is not in interactive mode, then it will try to read raw DV or HDV on stdin.

some dv source | dvgrab -stdin

Options

Options longer than a single character can be specified with either one or two leading hyphens. Also, you can use a space character or equal sign to separate the option name and its argument value.

Basic

description

option

comments

default

Split automatically by defined timespan or a discontinuity in the timecode when num left out (recorded on another time)

-a[num], -autosplit[=num]

off

Frames to use for buffering device I/O delays

-buffers num

100

Which firewire bus to use

-card num

First detected or with -noavc no default

Isochronous channel to receive data from

-channel num

63

Minimal cut size

-cmincutsize num

off

Split files when a certain num (MiB) is reached

-csize num

off

Total duration time

-d, -duration time

HH:MM:SS.ms (HH, MM and ms can be excluded)

Write only every n'th frame

-every n

all frames

Split at number of frames

-F, -frames num

default=0 => unlimeted

Specify GUID in hexadecimal format

-guid hex

found in /sysbus/firewire

1 => dvgrab itself setup

Help

-h, -help

Input a file instead of firewire

-input

Interactive

-i, -interactive

control AV/C with keyboard

This option tells dvgrab to store at most num megabytes (actually, mebibytes) per file, where num = 0 means unlimited file size for large files. default=1024MB

-s, -size

Show status for each frame

-showstatus

Show version

-v, -version

Format

-f, -format dv1 | dv2 | avi | raw | dif | qt | mov | jpeg | jpg | mpeg2 | hdv

Supported Formats dv1 only stores a single, integrated DV track since the DV format natively interleaves audio with video. dv2 stores a separate audio track in addition to the DV video track, which is more compatible with other applications. dv1 produces a smaller input but dv2 is more compatible raw stores the dv data unmodified and has the .dv extension dif stores the data as raw but with the .dif extension qt/mov store the data as quicktime DV with the .mov extension jpg/jpeg store the data as a sequence of JPEG image files (only with DV input). mpeg2/hdv store HDV data as compressed MPEG2 video with mpg extension Default is raw

JPEG output

description

option

comments

Deinterlacing by doubling the lines of the upper field

 -jpeg-deinterlace 

results in 50% loss in resolution

Scale the output of the width to num (1-2048)

-jpeg-width num

Scale the output of the height to num (1 - 2048)

-jpeg-height num

Write to the same image file, each frame

-jpeg-overwrite name

Quality level (0-100)

-jpeg-quality num

Use a temporary file to create the jpeg, rename the file to the target file name when done.

-jpeg-tem name 10

AV/C VTR controls

description

option

comments

Disabling use of AV/C VTR control

-noavc

Disabling sending the AV/C VTR stop command when exiting dvgrab

-nostop

Rewind the tape before capture (AV/C required)

-rewind

Interactive

-i, -interactive

Timecode

description

option

comments

Put timecode of the first frame of each file into the file name

-timecode

Put information on date and time of recording into file name

-t, -timstamp

Put system date and time into file name instead of the recording date

-timesys

Video4Linux 2

description

option

comments

Capture from USB Video Class device that supports DV

-V, -v4l2

Uses the uvcvideo kernel module via V4L2, defaut=/dev/video0

Choose another input instead of video0

-input /dev/videoX

X is identification num

Quicktime DV Output

description

option

comments

Set frame rate as 24p

-24p

only when shot in 24p

Set frame rate as 24p and reverse the 2:3:3:2 pulldown process by removing interlaced "C" frame

-24pa

only when shot in 24p advanced

Other controls

description

option

comments

Remove repeat_first_field flag and set frames per second to 25 to corect a stream recorded in JVC's HDV P24 mode

-jvc-p25

Align capture to a multiple of -frames based on timecode. This is useful for redundancy, when more than one machine is capturing from the same FireWire device, and you want to ensure each file contains the same footage. To ensure the files from each machine have the same name use the -timecode option and the same base name.

-lockstep

If num frames are dropped consecutively, then close the file and resume capture on the next lockstop interval. If num is -1, then permit an unlimited number of consecutively dropped frames; this is the default.

-lockstep_totaldrops num

If num frames are dropped in the current file, then close the file and resume capture on the next lockstep interval. If num is -1, then permit an unlimited number of total dropped frames; this is the default.

-lockstep_totaldrops num

If using -format dv2, create an OpenDML-compliant type 2 DV AVI. This is required to support dv2 files >1GB. dv1 always supports files >1GB.

-opendml

Capture footage when camera is recording

-r, -recordonly

requires AV/C controls

Generate subtitle files containing the recording date and time in SRT format. For each video file that is created two additional files with the extension .srt0 and .srt1 are created. They contain the recording date and time as subtitles in the SRT format. The .srt0 file contains the subtitles with timing based on the running time from the start of the current file. Use this file if you transcode to a format like AVI. The .srt1 file contains the subtitles with timing based on the time code as delivered by the camera. The mplayer program understands this type of subtitles.

-srt

FireWire/dvgrab (last edited 2012-09-24 13:58:04 by 196-215-9-64)