Video


Live Video This node provides video input from SDI/DVI input cards, webcams, TV tuners, DV device, etc. as a texture.
Movie Clip This node loads movies of many file formats and provides their content as a texture.
Quicktime Movie This node loads Quicktime movies and provides their content as a texture.
Quicktime Animation This node loads Quicktime movies and provides their content as a texture. Every frame can be accessed by its index.
Image Sequence This node loads a sequence of images and provides them as a texture.

Live Video

The Live Video Node enables the display of live video content in Ventuz scenes. This live video can be mapped on any geometry as any other kind of textures. Sources for live video can be e.g. Web Cameras, Digital Video Cameras, DVI and SDI Capture Cards and any other kind of input that can be connected to video input boards like the Blackmagic DeckLink video card.

The property Ordinal specifies the device which provides the video frames. The list of these devices can be edited in the Video In section of the Machine Configuration dialog. The methods Pause and Continue pause and resume the video input stream. The Live Video Node provides the live video frames in the Texture output property. This one has to be bound to a Texture node.

Movie Clip

Supported Movie Formats

Ventuz supports playback of movie clips in various formats. Movies are available in Ventuz as Texture sources and can therefore be used in a scene like any other texture source.
Ventuz supports playback of of WMV, MPEG, ASF and AVI files with all DirectShow compatible codecs, such as H.264, DivX and Xvid. Generally speaking, Ventuz can play those movie files for which all necessary DirectShow Decoder and other DirectShow components, like Splitter etc., are installed on the system.

If running Ventuz 3 x64, the necessary DirectShow components in 64 bit version have to be installed for movie playback! Windows 7 prefers Windows Media Foundation (WPF) codecs for movie playback. But Ventuz does not support WPF yet. This makes it necessary to use special tools like Code Twaek Tool to force Windows 7 to use DirectShow codecs for certain formats instead of WPF.


Node Description

Movie Clips can be added to a scene by adding a Texture. Left-click on the Texture node in the Toolbox and place the Texture node in the Hierarchy, select Movie Clip as the Texture source from the Texture Drag&Drop Wizard. Ventuz will automatically create a new Texture node with all Hierarchy and Content nodes required. Or, you can manually add a Movie Clip node in the Content Editor and connect it to any Texture node.

The Movie Clip node provides several properties for managing and controlling playback.
File specifies the movie file to play. The Loop property can be set to loop playback of a movie. The Alpha property activates the Alpha channel for a movie. The field dominance for interlaced clips can be set with Interlace property. AutoActivate will trigger playback of the movie automatically when the scene is loaded or the File URL changes.
The playback offset and length of a movie clip can be trimmed by adjusting the StartTime and EndTime properties. The StartTime property defines the time offset in the movie clip when playback will begin. The EndTime property defines the time offset in the movie clip when playback will stop before its actual end. Values have to be positive and the unit is seconds.

The properties in the category Audio can be used to adjust the audio playback of the movie clip and to select a playback device for the audio channel.

The Movie Clip node can be used to play back several movies one after another. The list of movies to be played can be read from various sources, including Excel sheets, XML files and databases. In most cases, the URL node is required to create a valid file reference. In order to cue a movie, the file reference to a movie has to be passed to the Cue property. The CueMode specifies the circumstances for the movie cue process:

None Cuing is disabled.
Manual The new movie is manually cued by triggering the Swap method.
Automatic The new movie is automatically cued when the playback of the main movie has completed.

The StartTime and EndTime properties can also be set for a cued movie to trim playback.

Please note that any movie clip URL's in the File or Cue property will not be saved with the scene when CueMode is set to Manual or Automatic.


The methods in the category Movie Control provide the possibility to start, pause and resume the movie playback. The Prepare methods forces the Movie node to display the first movie frame and pause subsequently.

The Movie Clip node provides some information via the output properties and events. MovieDuration is the duration of the movie clip in seconds. MovieFPS provides the frame-rate of the movie MovieWidth and MovieHeight inform about the pixel resolution of a movie frame. The Complete event is fired when the end of a movie is reached. The event Swapping is fired if a movie is cued and it is swapped for playback. The Swapped event is fired if this swapping process has finished.

Please note that some codecs do not support all movie clip features of Ventuz such as Prepare. Some codecs also do not report their correct duration to Ventuz, resulting in irregular behavior when cueing and adjusting StartTime and EndTime properties. It is highly recommended to test codecs properly before using them in a project.


Performance

The performance of video playback in Ventuz depends on the movie clip resolution, the bit-rate, the frame-rate and the installed decoder (not to mention the underlying hardware). Resolution, bit- and frame-rate affect the amount of data which has to be processed every Ventuz frame. E.g. if Ventuz renders with 60 fps and the movie has 30 fps, the decoding process has 33 milliseconds per frame.

If playing movies in Ventuz scenes, a Multi-CPU or Multi-Core system is highly recommended to source out the movie decoding on a separate CPU or Core to relieve the CPU which is already busy with the Ventuz core process.


It is important to know that there can be wide performance differences between decoder implementations for the same video codec. For example the default H.264 decoder implementation on Windows 7 is much slower than the corresponding ffdshow implementation. There is no general rule of thumb which video codec gives best results in Ventuz. It can be a time-consuming process to find the combination of codec, decoder implementation, encoding settings and hardware which gives the best playback results in Ventuz. However, compared to a conventional video player application, Ventuz will inevitably perform worse. This is because in Ventuz every video frame has to be copied to a texture surface to be displayed in 3D. Conventional video players simply use 2D overlay planes.

Quicktime Movie

The Quicktime Movie node enables Ventuz to play back movie in the .MOV and .MP4 file formats.

Quicktime nodes work only on 32 bit Operation Systems that have Apples Quicktime Player installed!


This node provides functionalities similar to the Movie Clip node. The main difference is that the movie frame decoding is not processed via DirectShow but directly in the installed Quicktime library. An additional important difference is how and when the decoded frames are processed in Ventuz. The Movie Clip node is informed if a new movie frame is available and displays it. As long as no new frame is available, the previous frame is displayed. With Quicktime Movie the node knows if a new frame has to be displayed and if needed waits for it, if the decodings is not finished yet. This guarantees synchronism of Ventuz rendering and movie frames.

Quicktime Movie provides several properties for managing and controlling playback.
File specifies the movie file to play. The Loop property can be set to loop playback of a movie. The Control property can be bound to a Keyframe Animation node to control the playback in the Animation Editor. There are two ways of decoder timing which can be switched with the UseAudioClock property. If this property is enabled the timing for the frame decoding comes from Quicktime and is bound to the clock of the soundcard. If this property is disabled, Ventuz tells Quicktime when frames have to be decoded. In this case the timing comes from the so called Ventuz Cluster Clock. This makes it possible to synchronize Quicktime movie playback over separate machines if they run in a Cluster.

The properties in the category Audio can be used to adjust the audio playback of the movie clip and to select a playback device for the audio channel.

The methods in the category Movie Control provide the possibility to start, pause and resume the movie playback. The Prepare methods forces the Movie node to display the first movie frame and pause subsequently. The ShowPoster methods brings Quicktime to show the so called Poster Frame. Any of the frames in a Quicktime movie can be declared as Poster Frame.
Via the Speed it is possible to manipulate the playback speed.

Via the properties in the Visual category it is possible to perform a basic image post-processing. This post-processing is done in real-time on the GPU for every movie frame.

The output properties provide some information about the playing movie. MovieWidth and MovieHeight provide the dimensions of the movie frames. In Quicktime the start time of a movie is not necessarily at 0. It is possible to skip frames and start e.g. in the third second. The properties StartTime and EndTime provide these time boundaries. CurrentTime provides the time stamp of the visible movie frame. As Quicktime does not provide a kind of Complete event, this property can be used to detect the end of playback.
The property Texture provides the current video frame and has to be bound to the Texture node.

Quicktime Animation

Similar to the Quicktime Movie node, the Quicktime Animation node is able to play back .MOV and .MP4 files. This node is primary intended to play back short video sequences (with alpha), such as logo animations.
The main difference to the Movie counterpart is that the Animation node does not play back audio and every video frame has to be manually accessed by the Frame index.
The input property File and the properties in the category Visual correspond to those of the Quicktime Movie node.

The output properties MovieWidth and MovieHeight provide the dimension of the movie frames. FrameCounter provides the overall number of video frames in the movie file. The property Texture provides the video frame corresponding to the Frame property. This output has to be bound to the Texture node.

Using the Animation Codec, it is possible to play back clips with an alpha channel.


Image Sequence

Ventuz can playback image sequences in all common image formats, such as PNG, BMP, JPEG, TIF and TGA. Image Sequences can be with or without alpha channel and be of any length and size. Image sequences are loaded by selecting one of the images from the sequence using the File Open dialog. The Image Sequence node will automatically read the entire sequence, load it into memory and output Width, Height and the number of frames (FrameCount) for this sequence.
The sequence can be played back by animating the Index property.

For optimal playback control, it is recommended to bind the Image Sequence node to a Counter node and use its Autorun feature. The FrameCount property of the Image Sequence defines the RangeEnd value of the Counter node and the Value output controls the Index of the image sequence. Adjusting the Interval property of the Counter node you can control the number of frames rendered by Ventuz before the Counter increases its output value, i.e. displays the next image of the image sequence.

Be aware that the complete image sequence is loaded into memory. Long sequences of images with high resolution will dramatically increase the memory usage of the Ventuz process! A better choice would be to use the Quicktime Animation node with the Animation codec instead.