jit.grab Reference

Digitize video from an external source

jit.grab

Description

Use the jit.grab object to digitize video from any video digitizer and decompress the signal into a Jitter matrix or GL texture.

Examples

Matrix Operator

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

More about Matrix Operators

The Jitter MOP

MOP Arguments

MOP Attributes

MOP Messages

Attributes

adapt [int]7.0.0

Adapt output matrix dimensions to native device dimensions. Enabled by default if no dim specified.

automatic [int]7.0.0

Enable automatic matrix output when bound to jit.world.

colormode [symbol]

The output matrix's color encoding (default = argb)

Possible values:

'monochrome'
'argb' ( ARGB (alpha, red, green, blue) colormode )
'uyvy' ( UYVY (YUV 4:2:2 packed) colormode )

drawto [symbol]7.0.0

A render context name, used when output_texture is enabled.

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). For a list of supported formats, send the message getformatlist.

framerate [float]

The video digitizer frame rate (default = digitizer-specific).
The digitizer has to be closed and re-opened before changes to framerate take effect.

framereport [int]

Frame reporting flag (default = 0)
When enabled, the message framecalc will be sent from the rightmost outlet of the jit.grab object as each frame is processed, followed by the number of milliseconds spent doing so.

input [int]

The current video digitizer input (default = digitizer-specific)

interp [int]

Image interpolation flag (default = 0)

output_texture [int]7.0.0

Enable OpenGL texture output (default = 0). When enabled an OpenGL texture is output instead of a Jitter matrix. The object's drawto attribute must be set to a valid gl context. An RGBA texture is output using the movie's native dimensions. When enabled, the following attributes have no effect:
adapt
colormode
dim
dstrect
srcrect
usedstrect
usesrcrect

srcrect [4 ints]

The portion of the capture matrix to copy to the internal matrix. (default = 0 0 1 1)
The proportions of the rectangle are expressed in the form left top right bottom . All values are in pixels and relative to the top left corner of the incoming matrix.

texture_name [symbol]7.0.0

Output texture name, when output_texture is enabled.

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.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)

Common Box Attributes

Messages

int

Opens and closes the digitizer. See the open and close messages for more info.

close

Closes an open sequence grab component. The component is automatically closed when the object is freed.

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.

getformatlist

Reports the list of available digitizer formats from the object's right outlet, preceded by the word formatlist.

getframeratelist

Reports the list of available digitizer framerates from the object's right outlet, preceded by the word frameratelist.

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.

getvdevlist

Reports the list of available video digitizers from the object's right outlet, preceded by the word vdevlist.

open

Opens a sequence grab component. A component must be explicitly opened before the jit.grab object will began digitizing.

See Also

Name Description
Working with Video in Jitter Working with Video in Jitter
jit.movie
jit.record
Tutorial 21: Working With Live Video Input Tutorial 21: Working With Live Video Input