Vizard 7 » Command Index » Vizard modules » viz » <viz>.addVideo
7.7

<viz>.addVideo

Adds a video file.

<viz>.addVideo(  
filename  
type = viz.TEX_2D  
device = viz.AUTO_COMPUTE  
)  
filename
Video filename
type = viz.TEX_2D
viz.TEX_1D
viz.TEX_2D
viz.TEX_3D
viz.TEX_CUBE
viz.TEX_RECT
device = viz.AUTO_COMPUTE
The device to output audio to.

One of the following device values:

Device Value

Description

viz.AUTO_COMPUTE

Use the device ID specified by the viz.audio.device option or the <viz>.setDefaultAudioDevice command, which defaults to 0.

0

Use the default system audio device (configurable through the Windows Control Panel).

AudioDevice object

An audio device object that was retrieved through the <viz>.getAudioDeviceList command.

Remarks

If type is viz.AUTO_COMPUTE, then Vizard will use viz.TEX_RECT if the video dimensions are not a power of two, otherwise it will use viz.TEX_2D.

Vizard can read any video format that has a DirectShow filter installed on the users computer.

Return Value

A video object that inherits from both <multimedia:av> and <texture>

Example

object = viz.addVideo('somevideo.avi')

See also

<viz>.addAudio
<viz>.getAudioDeviceList
<viz>.addBlankTexture
<viz>.addRenderTexture
<viz>.addTexture
<viz>.addTextureFromBuffer