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

jit.dx.grab Reference

Digitize video using DirectX (Windows)

jit.dx.grab

Description

Digitizes video from any DirectX-compatible video digitizer, and decompresses 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.

Examples

Discussion

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

More about Matrix Operators

The Jitter MOP

MOP Arguments

MOP Attributes

MOP Messages

Attributes

backlight [3 floats]

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 channel selection (default = digitizer-specific)
1 = digitize sound in mono
2 = digitize sound in stereo

colorenable [3 floats]

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

Possible values:

'argb'
'uyvy'

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 [4 ints]

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 [3 floats]

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 [2 ints]

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 [4 ints]

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 [3 floats]

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.

Common Box Attributes

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

Arguments

filename [symbol]
file-type [symbol]
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, tiff, and jpeg.
You can use the Max Preferences to specify a default image resolution for png image types.

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

Arguments

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.

See Also

Name Description
jit.qt.effect
jit.qt.grab
jit.qt.movie
jit.qt.record
jit.qt.videoout
Tutorial 21: Working With Live Video Input Tutorial 21: Working With Live Video Input