A newer version of Max is available. Click here to access the latest version of this document.

jit.dx.grab

Digitize video from an external source using DirectX (Windows only)

Description

The jit.dx.grab object permits one to digitize video from any DirectX-compatible video digitizer, and decompress the signal into a Jitter matrix. It also offers a grab-to-disk mode. Although numerous parameters for control are offered, not all features are supported by all digitizers.

MACINTOSH USERS: The jit.dx.grab object uses DirectX, and is Windows-only. Please refer to the jit.qt.grab object.

Matrix Operator

matrix inputs:1, matrix outputs:1
Name IOProc Planelink Typelink Dimlink Plane Dim Type
out n/a 1 1 1 4 1 char

Information for Jitter Matrix Operator (MOP) messages and attributes to this object

Messages

settings Opens the standard video digitizer settings dialog box.
snd_settings Opens the standard sound digitizer settings dialog box.
stop Stops grabbing to disk.
defaults Restores digitizer image control defaults.
exportimage filename [symbol]
file-type [symbol]
use-dialog [int]
Export the current frame as an image file with the name specified by the first argument. The second argument sets the file type (default = png). Available file types are png, bmp, jpeg, macpaint, photoshop, pict, qtimage, sgi, tga and tiff. An optional use-dialog argument of 1 will open a File dialog to allow you to enter the image file settings.
You can use the Max Preferences to specify a default image resolution.
open Opens a sequence grab component. A component must be explicitly opened before the jit.dx.grab object will began digitizing.
close Closes an open sequence grab component. The component is automatically closed when the object is freed.
write filename [symbol]
FPS [float]

Starts grabbing to disk. If no filename argument is supplied, a file dialog box will open.

The default FPS is 30. frames/sec.

getvdevlist Reports the list of available video digitizers from the object's right outlet, preceded by the word vdevlist.
getinputlist Reports the list of available inputs to the video digitizer from the object's right outlet, preceded by the word inputlist. Note that the digitizer must be open in order for this method to function.
getsnddevlist Reports the list of available sound digitizers from the object's right outlet, preceded by the word snddevlist.
getsndinputlist Reports the list of available inputs for the current sound digitizer from the object's right outlet, preceded by the word sndinputlist. Note that the digitizer must be open in order for this method to function.
getformatlist Reports the list of available digitizer formats from the object's right outlet, preceded by the word formatlist. Note that the digitizer must be open in order for this method to function.

Attributes

Name Type g/s Description
backlight float The video digitizer backlight compensation setting (default = digitizer-specific)
0 = off
1 = on
bitrate int The sound digitizer bit depth (default = digitizer-specific)
8 = digitize sound at 8-bit resolution
16 = digitize sound at 16-bit resolution
brightness float The video digitizer brightness level (default = digitizer-specific)
channels int The sound digitizer channel selection (default = digitizer-specific)
1 = digitize sound in mono
2 = digitize sound in stereo
colorenable float The video digitizer colorenable setting (default = digitizer-specific)
0 = off
1 = on
colormode symbol The output matrix's color encoding (default = argb)
argb = ARGB (alpha, red, green, blue) colormode
uyvy = UYVY (YUV 4:2:2 packed) colormode
contrast float The video digitizer contrast level (default = digitizer-specific)
dropreport int Dropped frames reporting flag (default = 0 (disabled))
When this flag is set, the message dropped will be sent from the rightmost outlet of the jit.dx.grab object, followed by the number of dropped frames, whenever frame-dropping is detected.
dstrect int The portion of the output matrix used for decompressing media to the internal matrix. (default = 0 0 (matrix width) (matrix height))
The proportions of the rectangle are expressed in the form left top right bottom . All values are relative to the top left corner of the viewing area of the output matrix.
format int The video digitizer format selection (default = digitizer-specific)
gain float The video digitizer gain (default = digitizer-specific)
Note that the jit.qt.grab object has an attribute called gain which controls audio , rather than video gain.
gamma float The video digitizer gamma (default = digitizer-specific)
hue float The video digitizer hue adjustment (default = digitizer-specific)
input int The current video digitizer input (default = digitizer-specific)
interp int Image interpolation flag (default = 0)
resolution int Preferred capture resolution for the digitizer (default = digitizer-specific)
If a resolution is specified, an attempt is made to configure the digitizer to capture at that resolution.
samplerate int Sound digitizer sample rate (default = digitizer-specific)
44100 = 44.1 kHz
48000 = 48.0 kHz
(other rates may be available, but are digitizer-specific)
saturation float Video digitizer saturation level (default = digitizer-specific)
sharpness float Video digitizer sharpness level (default = digitizer-specific)
snddevice int The current sound digitizer (default = 0)
srcrect int Source rect from digitizer frame (default = 0 0 (matrix width) (matrix height))
unique int Unique frame filter flag (default = 0 (disabled))
When the flag is set, only new frames from the digitizer are output when the object receives a bang. If no new frame has been received from the digitizer, the jit.dx.grab object will not respond to the bang.
usedstrect int Destination rect flag (default = 0) When the flag is set, the dstrect attributes are used when copying an input matrix to the internal matrix.
usesrcrect int Source rect flag (default = 0) When the flag is set, the srcrect attributes are used when copying an input matrix to the internal matrix.
vdevice int The current video digitizer (default = 0)
whitebalance float The video digitizer white balance (color temperature) (default = digitizer-specific)
write_audio int Audio track write flag (default = 0) When the flag is set, an audio track is written when grabbing images to disk.
write_video int Video track write flag (default = 1) When the flag is set, a video track is written when grabbing images to disk.

Information for box attributes common to all objects

Examples

See Also

Name Description
jit.qt.effect QuickTime Effects for Jitter matrices
jit.qt.grab Digitize video from an external source
jit.qt.movie Play or edit a QuickTime movie
jit.qt.record Record a QuickTime movie
jit.qt.videoout Output video to QuickTime video output component
Tutorial 21: Working With Live Video and Audio Input Tutorial 21: Working With Live Video and Audio Input