|
-
Video
Video is the primary media in the MCL. Video is a sequence of the still image frames. It may link with an audio sequence. When these frames display on the screen as a continuous stream, it generates the animation. The frame sequence is numbered from 0 to n.
A video may be compressed in certain format such as MPEG. The procedure of video playback starts to read from a source, split video and audio, decode data, and render to window. A media source may be a file in a CD-ROM or on the Internet. Video and audio are split into different decoders and they are synchronized by a clock. The output frame is rendered onto a window.
MCL commands can control the video playback. It can also complete video transform together with an image or a 3D mesh input. A transform can generate special visual effects. For example, fade transform can show a video fade smoothly from a frame to another image. These transforms make video playback more like a film. In the Star War movie, the wipe and fade transforms are widely used to generate the sepcial visual effects. MCL provides simple methods to do this.
-
Open Video
Command
|
_video argument
|
Argument
|
name=video_file_name
|
Descriptiotn
|
open a video file specified by name. The default file name is default.mpg if there is no argument. The curly braces {} will group the string as one argument. The "" will also group the string and allow the name to be a variable.
|
Examples
|
_video {name=default.mpg}
# other commands
video_
|
-
Close Video
Command
|
video_
|
Argument
|
none
|
Descriptiotn
|
close a video file which is opened by _video.
|
Examples
|
_video {name=default.mpg}
# other commands
video_
|
-
Get Video Information
Command
|
?video argument
|
Argument
|
capability get the list of video capability;
type get the video type;
current get the video current frame;
start get the video start frame;
end get the video end frame;
length get the video frame number;
|
Descriptiotn
|
?video command get the information about the video. Its argument
specifies the item of the attribute. capability item maybe a list
with one or more elements of AsynchronousStream, HasClock, and
SupportSeek. AsynchronousStream indicates that the video is an
asynchronous stream; HasClock indicates that there is a clock for
the video; SupportSeek indicates that the video supports random
seek. format item returns video format such as MPEG, DVD, and so
on. type item get the info if the video is STREAMTYPE_READ for
readable, STREAMTYPE_WRITE for writeable, or STREAMTYPE_TRANSFORM
for transformable. The current, start, and end returns the
current, start, and end frame of the video. Video position is
numbered as frame. length gets the total video frame number.
|
Examples
|
_video {name=default.mpg}
set caps [?video capability]
video_
|
-
Snap
Snap is an abstraction of a snapshot of a picture or a video frame. It maybe an image, a texture, a 3D mesh, or a frame of a video. It is an input for a transform.
-
Snap Command
Command
|
_snap argument
|
Argument
|
image=image_file_name; default value default.png
mesh=mesh_file_name; default value default.msh
|
Descriptiotn
|
argument is the list of attributes. If argument is empty, the sanp
is get current frame of the video. image=filename specifies
the image file to be used. mesh=filename specifies the mesh file
to be used.
|
Examples
|
_snap {image=default.png}
|
<< Modules
Playback >>
|
|