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

jit.broadcast

Broadcast video using RTSP

Description

The jit.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.

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

start Starts the broadcast server and reports the success or failure of the start operation from the right outlet of the jit.broadcast object. In the event of success, the message will be in the format start 1 URL . The URL argument is the RTSP URL which client computers will use to access the stream.
Note that, if your computer is behind a router, the IP address reported may not permit access to the stream by client machines outside of your local network. In that instance, you will need to substitute your network's WAN address (the IP address of the router, as seen by the outside world) for the IP address portion of the URL , before non-local clients can receive your broadcast. The vport will also need to be unblocked, if a firewall is active, and the port mapped to your computer behind the router.
stop Stops the broadcast server.

Attributes

Name Type g/s Description
codec symbol The video codec for streaming (default = mpeg4)
The available codec types are jpeg, mjpega, mjpegb, h263 and mpeg4.
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.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)
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.broadcast object. See Tutorial 51: Broadcasting for more information.
port_v int Video broadcast port number (default = 8554)
The network port to be used by the video portion of the broadcast stream.
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.broadcast object is streaming. Otherwise, the matrix is simply passed through the object. Only functional in mode 0.
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 = "jitStream")
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.broadcast object will broadcast in unicast mode. In this mode, the ip refers 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.
vip symbol Video IP address (default = variable)
Synonym for ip, above.
vport int Video broadcast port number (default = 8554)
Synonym for port_v, above.

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.qt.broadcast Broadcast video using RTSP (Macintosh only)
Tutorial 53: Jitter Networking (part 2) Tutorial 53: Jitter Networking (part 2)