Starting with Hollywood 4.0 it is possible to save Hollywood scripts as AVI video files. This is useful for example if you want to create DVDs of your Hollywood scripts or just run them on a platform that is currently not supported by Hollywood. Saving Hollywood scripts as video files also allows you to import them into video editing software for further processing or format conversion.
Hollywood's video recorder was designed with the idea in mind to reproduce the exact behaviour of the Hollywood script in a video file. Thus, you will most likely not notice any difference between the video file and the actual Hollywood script. Hollywood's video recorder tries to time the script exactly as it would appear in real time mode. Hence, it is no problem for the video recorder to deal with scripts that require exact timing - for example for synchronization with music. The video recorder pays special attention to this and tries to time everything correctly.
To enable the video recorder mode you simply have to specify the -videoout argument together with a filename for the video to be created. Hollywood will then start in recording mode and graphics and sounds will now be redirected into the video stream. Thus, when in recording mode, no sounds will be played because sound data is immediately rendered into the video stream. Also, please note that certain options are disregarded when Hollywood is in video recording mode. For example, in video recording mode Hollywood will always open in windowed mode, never in full screen even if you specify so. Also the window will not be sizeable etc.
The video file written by the video recorder will be an AVI 2.0 stream adhering to the OpenDML standard so streams greater than 2 GB are possible. Hollywood currently uses the Motion JPEG codec to compress the video frames. Audio data is written to the video file without any compression. You can control the quality of the Motion JPEG by using the -videoquality argument.
To achieve the best result you may need to adjust some parameters in the video recorder with which we will deal now:
SetInterval(1, p_MainLoop, 1000\25) |
Then your video file should also run at 25 fps. So you would have to specify
-videofps 25 |
on the command line to tell the video recorder that you want your video to have 25 frames per second.
VWait() Wait() WaitEvent() WaitTimer() etc. |
Thus, it is necessary that you use one of the commands above in your script! Your script needs to employ a timing mechanism, otherwise it cannot be converted properly into a video file. Suggested timing mechanisms are either using an interval function which is called a certain number of times per second or using WaitTimer() or VWait(). See script timing mechanisms for more information on the importance of using a correct timing mechanism.
Flushing the frame buffer whenever a wait command occurs is called the "wait
strategy" which is also the default video strategy. Normally, the wait strategy
should be suitable for all purposes. With correctly timed scripts, the wait
strategy delivers the best results. In some very rare cases - or for debugging
purposes - you might want to use the raw
strategy instead. When -videostrategy
is set to raw
, the video recorder will render every frame to the stream no
matter if waits are used or not. In most cases, of course, this results in wrongly
timed videos so you will most likely never want to use the raw strategy.