jit.dx.grab Digitize video from an external source using DirectX (Windows only)

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: in[1] out[1]
Name IOProc Planelink Typelink Dimlink Plane Dim Type
in n/a n/a n/a n/a n/a n/a n/a
out n/a yes yes yes 4 all char

Attributes:
Name Type Description
bitrate int The sound digitizer bit depth (default = digitizer-specific)
8 = digitize sound at 8-bit resolution
16 = digitize sound at 16-bit resolution
backlight float The video digitizer backlight compensation setting (default = digitizer-specific)
0 = off
1 = on
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
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
colorenable float The video digitizer colorenable setting (default = digitizer-specific)
0 = off
1 = on
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 list[4] 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 list[2] 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 list[4] 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.

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

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.

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.

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.

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.dx.grab object will began digitizing.

settings
Opens the standard video digitizer settings dialog box.

snd_settings
Opens the standard sound digitizer settings dialog box.

stop
Stops grabbing to disk.

write { [filename (symbol)] } [FPS (float)]

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

The default FPSis 30. frames/sec.


Example:

See Also:
jit.qt.effect, jit.qt.grab, jit.qt.movie, jit.qt.record, jit.qt.videoout