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

jit.qt.broadcast

Broadcast video using RTSP (Macintosh only)

Description

The jit.qt.broadcast object is an RTSP server. It takes a 4 char matrix as input, compresses the data and streams it over a network (local or internet) using the RTSP streaming standard.

WINDOWS USERS: This object is currently unsupported.

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

pause Pauses a running broadcast server. No effect if the server is idle.
start Starts the broadcast server.
stop Stops the broadcast server.
write filename []
Writes an SDP (session description protocol) file to disk. This file describes the streaming parameters in a form suitable for distribution to clients. Every time a broadcast parameter is modified (vcodec, for instance), a new SDP file must be written, or clients will have trouble connecting to the broadcast stream.
In the absence of a filename argument, a Save dialog will be presented.

Attributes

Name Type g/s Description
acodec symbol The audio codec for streaming (default = qdesign2)
The available codec types are none, raw, big16, little16, float32, float64, 24bit, 32bit, little32, mace3, mace6, cdxa4, cdxa2, ima, ulaw, alaw, adpcm, dviima, dvaudio, qdesign, qdesign2, qualcomm, mp3, vdva, mpeg4.
aenable int Audio enable flag (default = 0)
This flag is only active in mode 2 (Sequence Grabber source mode) and determines whether sound will be streamed, as well as image.
aip symbol Audio IP address (default = variable)
In multicast mode (the default. See unicast, below), this IP address is automatically assigned, and read-only, and refers to the special multicast address client computers access to reach your broadcast.
In unicast mode, this IP address should be set to the IP address of the single client computer.
aport int Audio broadcast port number (default = 8556)
The network port to be used by the audio portion of the broadcast stream.
bitrate int Audio bitrate (default = 16)
16 = 16-bit audio
8 = 8-bit audio
channels int Audio channel selection (default = 2)
1 = mono audio
2 = stereo audio
codec symbol The video codec for streaming (default = h263)
The following list of codecs is deprecated (retained for reference). See codeclist, below, for the preferred method to list valid system codecs.
The available codec types are raw, cinepak, graphics, animation, video, componentvideo, jpeg, mjpega, mjpegb, sgi, planarrgb, macpaint, gif, photocd, qdgx, avrjpeg, opendmljpeg, bmp, winraw, vector, qd, h261, h263, dvntsc, dvpal, dvprontsc, dvpropal, flc, targa, png, tiff, componentvideosigned, componentvideounsigned, cmyk, microsoft, sorenson, indeo4, argb64, rgb48, alphagrey32, grey16, mpegyuv420, yuv420, sorensonyuv9 and mpeg4.
codeclist symbol (get) The valid video codecs available on the system
Sending the message getcodeclist will cause a list of all valid codecs (that is, those with a functioning compressor component) to be reported from the dumpout. This list is guaranteed to contain only working codecs, and should be used in preference to the old, static codec list.
datarate int Sets the data rate in frames/second.
dstrect int The rectangular portion of the streaming image to be drawn to, when an incoming matrix is received. (default = 0 0 (image width) (image 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 streamed image.
interp int Interpolation flag (default = 0)
ip symbol Video IP address (default = variable)
In multicast mode (the default. See unicast, below), this IP address is automatically assigned, and read-only, and refers to the special multicast address client computers access to reach your broadcast.
In unicast mode, this IP address should be set to the IP address of the single client computer.
kframe int Keyframe rate (default = 50)
If set, the jit.qt.broadcast object will attempt to configure the video compressor to use the specified keyframe rate. Keyframes (temporal compression) are not available to all codecs.
mode int Streaming source mode (default = 0)
0 = matrix input
1 = Hinted Movie input (uses the movie attribute to choose a pre-hinted source movie)
2 = Sequence Grabber input (uses an attached camera as the streaming source)
Modes 1 and 2 permit audio streaming, as well.
movie symbol Source movie for mode 1 (default = "")
If no movie is specified when setting this attribute, a File dialog will be presented. Movies must be hinted, to be used with the jit.qt.broadcast object. See Tutorial 51: Broadcasting for more information.
preview int Matrix preview flag (default = 0)
If set, an incoming matrix will be copied to the object's output matrix (with srcrect, interp or dstrect transformations) when the jit.qt.broadcast object is streaming. Otherwise, the matrix is simply passed through the object. Only functional in mode 0.
samplerate float Audio sample rate (default = 8000)
48000 = 48kHz
44100 = 44.1kHz
32000 = 32kHz
22050 = 22.050kHz
22254 = 22kHz
16000 = 16kHz
11127 = 11kHz
11025 = 11.025kHz
8000 = 8000 Hz
size int The dimensions of the broadcast (default = 160 120)
spatialquality symbol Codec spatial compression quality (default = 2 (normal))
0 or min = minimum
1 or low = low
2 or normal = normal
3 or high = high
4 or max = maximum
5 or lossless = lossless

Note that minimum quality is, in many cases, the codec's default quality. Use "low" quality for consistent results.
srcrect int The rectangular section of the incoming matrix to compress and stream (default = 0 0 (movie width) (movie height))
streamname symbol Name of the broadcast stream, as displayed in the stream's URL (default = "Jitter")
temporalquality symbol Codec temporal compression quality (default = 2 (normal))
0 or min = minimum
1 or low = low
2 or normal = normal
3 or high = high
4 or max = maximum
5 or lossless = lossless

Note that minimum quality is, in many cases, the codec's default quality. Use "low" quality for consistent results.
ttl int Packet time to live (default = 255)
unicast int Unicast broadcast flag (default = 0)
If set, the jit.qt.broadcast object will broadcast in unicast mode. In this mode, the vip (and aip, if used) refer to a single client computer, which will be able to receive your broadcast. In multicast mode (the default), as many clients as your system's bandwidth can support will be able to access the stream.
usedstrect int Destination rect flag (default = 0)
When the flag is set, the dstrect attributes are used when compressing an input matrix for streaming.
usesrcrect int Source rect flag (default = 0)
When the flag is set, the srcrect attributes are used when compressing an input matrix for streaming. 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 incoming matrix.
vcodec symbol The video codec for streaming (default = h263)
Synonym for codec, above.
venable int Video enable flag (default = 1)
This flag is currently ignored.
vip symbol Video IP address (default = variable)
Synonym for ip, above.
vport int Video broadcast port number (default = 8554)
The network port to be used by the video portion of the broadcast stream.

Information for box attributes common to all objects

Examples

See Also

Name Description
jit.net.recv Receive matrices from a jit.net.send object via TCP/IP
jit.net.send Send matrices to a jit.net.recv object via TCP/IP
jit.broadcast Broadcast video using RTSP
Tutorial 53: Jitter Networking (part 2) Tutorial 53: Jitter Networking (part 2)