Lightwing has powerful capabilities to combine video with 3D graphics, images and text. The Video command defines the parameters required to open and play a video file. The video can then be displayed as the background of a page or for any object on the current or global page. The Video command can also be used on the global page, in which case the video will play continuously until interrupted by another Video command which uses the same stream number. Lightwing can decode and play up to two video files simultaneously and these are known as stream 0 and stream 1. The default stream is 0.
The only mandatory parameter for the video command is a video name. This name must include an extension which defines the codec type of the video. Lightwing supports several codec types but requires that video files have no audio or container. Several open-source tools are available to convert mov, mp4 and other container formats for Lightwing, including WinFF, ffmpeg and MP4Box. Refer to the section on Converting Videos for more information.
The video name (without the extension) is also used to associate the video to objects, boxes and/or page backgrounds that will display it. The following example shows how a video is used for a page background. Notice that the codec type extension is only defined once, on the video command and not on the video option.
Example of a Page with a Video Background page: FirstPage time: 1, 10 video: DiskCirclesBlueLoop video: DiskCirclesBlueLoop.lv2 stream: 0 loop: on rate: 60
Video Codec Type File Name Extensions
Codecs Extensions MPEG4 lv0 H.263 lv1 H.264 lv2 VC1 lv3 MPEG2 lv4
Since video is not implemented in the Windows version of Lightwing, it is recommended to also make a representative image from each video. The Windows version of Lightwing will automatically display an image in place of the video if an image is provided with the same name as the video. This helps visualize the appearance of new sign content while developing on Windows and the video will play on the Linux Lightwing player without any modification to the script file. The substitute images must have the same names, except that the extensions must be PVR and the files must be located in the images folder. Refer to the section on Converting Videos.
Defines the start and duration times for the video to play in seconds. If not specified, the default start and duration times will be the same as for the page that this video is on. These can be specified as either floating-point values in seconds or integer (sexagesimal) clock time durations. Refer to the page command for examples. These times control the video decoder and are independent of when the video is actually visible on the display.
If the video is displayed on a page background, the timing for that page will define when the video is visible. If the video is displayed on an object, the timing for that object will define when the video is visible. There is typically a delay of up to one second when a video starts to play before the quality is good, so that delay should be accommodated. The start time can be negative to start the video within the page transition time, so that a transition can hide this issue.
Start times can be prefixed with a plus symbol (+) which means the new start time is the sum of the specified start time and the start time from the previous Video command on the same page. This allows video commands to be duplicated in the script file without the need to manually add time values.
Defines the stream number to play the video. Lightwing supports two video streams, each of which can decode and play a video simultaneously. The default stream is 0. To play a second video simultaneously, specify stream 1.
Defines if the video should be repeated in a continuous play loop. This parameter should be either on or off. The default is off.
Defines the frame rate at which the video will be played in frames per second. This must be an integer between 1 and 60 inclusive. The default rate is 60 frames per second.