[id] = OpenVideo(id, filename$[, table])
filename$and assigns the specified
idto it. If you pass Nil in
OpenVideo()will automatically choose a vacant identifier and return it. The video file specified in
filename$will be opened and prepared for playback. Video playback is always done directly from disk which means that
OpenVideo()will not prebuffer any data at all. It will just initialize all parameters necessary for video playback.
Video formats that are supported on all platforms are CDXL and formats you have a plugin for. Depending on the platform Hollywood is running on, more video formats might be supported. On Windows Hollywood is able to open all video formats for which you have a DirectShow codec installed. On macOS Hollywood can open all video formats that are supported by AV Foundation (or QuickTime on older Macs).
Starting with Hollywood 6.0 this command accepts an optional table argument which recognizes the following options:
default. This means that Hollywood will first ask all plugins whether they would like to handle the video file, then it will check its inbuilt loaders (currently only CDXL), and finally it will ask the video interface of the host OS to play this video. If you want to customize this order, use this tag. See Loaders and adapters for details. (V6.0)
default. See Loaders and adapters for details. (V6.0)
This command is also available from the preprocessor: Use @VIDEO to preload video files!
OpenVideo(1, "intro.avi") PlayVideo(1)The code above loads & plays "intro.avi".