OpenVideo -- open a video file (V5.0)
[id] = OpenVideo(id, filename$[, table])
This function opens the video file specified by filename$ and assigns the specified id to it. If you pass Nil in id, 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:

This tag allows you to specify one or more format loaders that should be asked to load this video. This must be set to a string containing the name(s) of one or more loader(s). Defaults to 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)

This tag allows you to specify one or more file adapters that should be asked to open the specified file. This must be set to a string containing the name(s) of one or more adapter(s). Defaults to default. See Loaders and adapters for details. (V6.0)

This command is also available from the preprocessor: Use @VIDEO to preload video files!

identifier for the video or Nil for auto id selection
file to load
optional: table that contains further parameters (V6.0)
optional: identifier of the video; will only be returned when you pass Nil as argument 1 (see above)
OpenVideo(1, "intro.avi")
The code above loads & plays "intro.avi".

Show TOC