NAME

mpdvr - multiple perspective digital video recorder

SYNOPSIS

mpdvr [-ncam #] [-seq0 string] [-seq0 string] [-fmt {RGB24,RGB15}] [-xscale {1,2,4}] [-yscale {1,2,4}] [-n #] [-wait #] files ...

DESCRIPTION

mpdvr is an MSDOS command shell program that operates the two Matrox Meteor cards in the UCSD Visual Computing Laboratory's video acquisition computer known as hammer (the name hammer is derived from Mickey Spilane's fiction detective, Mike Hammer), to acquire multiple streams of video and record them on a hard disk.

To be able to use mpdvr effectively, it is important to understand the basic operation of the program and the Meteor cards. Each Meteor card has four video channels that feed into a multiplexer and from there into a single color video digitizer. Therefore, each Meteor can digitize from only one stream of video at a time. mpdvr can acquire from multiple cameras per card by using the multiplexer. This works, but it reduces the frame rate of acquisition. The program executes a loop to acquire a requested number of frames. In each iteration of the loop, the program acquires an image from each of the channels requested for both cards. These images are written immediately to the disk. It is recommended that the video files reside on the high-speed AV disk array on hammer to get the fastest possible acquisition rates. mpdvr produces raw pixels files in which pixels are saved in the format produced by the Meteors, and stored sequentially in row-major order. Although this file format is awkward for subsequent use of the data, it facilitates the low-level file IO calls used by mpdvr to get the fast throughput to the disk that is possible. The raw file can be converted to the Visual Computing Laboratory's own MPIV0 format using mpiconvert. mpdvr starts by creating files on disk to hold the video sequences, then waits for a carriage return to be entered at the keyboard before it acquires the images. Once the acquisition is complete mpdvr reports the frame rate and disk throughput achieved. The command line switches are summarized as follows:

-ncam #
defines the number of cameras to acquire from on both cards. A value of 1 means one video channel per card, 2 means two channels per card, and so on. Default value is 1.
-seq0 string
-seq1 string
These switches define the sequence of video multiplexer channels to use for acquisition. The channels are number from 0 to 3. For example, to acquire four channels of video, two on each card, using channel 0 and 1 on Meteor 0 and 1 and 3 on Meteor 1, use
-ncam 2 -seq0 01 -seq1 13
To acquire an odd number of channels, use * for the channel number to indicate skipping a channel. For example,
-ncam 2 -seq0 01 -seq1 0*
acquires three channels of video, 0 and 1 on Meteor 0 and channel 0 on Meteor 1. Default -seq0 0 -seq1 *.
-fmt string
This switch defines the pixel format. string can have one of two values, RGB24 or RGB15. RGB24 requires 4 bytes per pixel in the raw file. One byte per pixel is wasted to avoid repacking the 32-bit data transferred on the PCI bus of hammer. RGB15 requires 2 bytes per pixel in the raw file. Each color gets 5 bits and one bit is wasted. Default is RGB15.
-xscale #
-yscale #
These switches set the image size. The full image size is determined by the Meteor hardware and is 640 pixels across by 480 pixels down. Allowed images sizes are full, half and quarter size on either axis, for switch values of 1, 2, and 4 respectively. Other values are not allowed. Default is 2 for both axes.
-n #
This defines the number of frames to acquire. Value must be greater than zero. Default is 100.
-wait #
This is the number of frames to wait for each acquisition. Full speed is 1, i.e., grab every frame. This switch is useful for grabbing from multiple cameras on a single Meteor using the multiplexer. It takes about 10 frames for the video image to settle after switching the multiplexer. This corresponds to -wait 10.
The command line requires one file name for each camera used in the acquisition. mpdvr expects the files to be listed for Meteor 0 first, and then Meteor 1, using the order specified by the -seq0 and -seq1 switches. Here are some example command lines. To grab from one camera, 200 frames at default size and pixel format:
mpdvr -n 200 e:\tmp\vid0.raw
To grab from two cameras using both cards:
mpdvr -seq0 0 -seq1 0 e:\tmp\vid0.raw e:\tmp\vid1.raw
To grab from four cameras, full resolution, RGB15 format use:
mpdvr -ncam 2 -seq0 01 -seq1 01 -fmt RGB15 -xscale 1 -yscale 1 -wait 10 e:\tmp\vid0.raw e:\tmp\vid1.raw e:\tmp\vid2.raw e:\tmp\vid3.raw

SEE ALSO

mpiconvert, mpivmpeg, mpivsgi, video acquisition page, and how-to examples.

BUGS

mpdvr is not guaranteed to get every frame.

Web page design by Jeffrey E. Boyd