Vinifera
Vinifera copied to clipboard
Implements DirectShow video support for full-screen MP4, WMV, MPG and AVI videos.
Closes #4
This pull request implements support for MP4, WMV, MPG and AVI video formats using the Windows DirectShow interface. The tested limitations within the Tiberian Sun engine are 4K and 60FPS, but it is recommended to use 1080p and 30FPS, the engine will handle the scaling to the user-defined resolution size.
Included in the pull request artefacts will be a new video file for testing (MOVIES/VINIFERA.WMV
). Please extract all the contents of the pull request artefact into the Tiberian Sun directory. Launching the game will play this new signature video without any further changes to enable the system.
The system is enabled by default, and the game will now auto-detect a video file placed in those locations that match the requested video filename, prioritising it over any existing VQA file. The new system will scan for the supported formats in the following order; MP4, WMV, MPG then AVI, and when it fails to find any supported format, rolling back to VQA.
The system also respects the StretchMovies=
setting in SUN.INI
, regardless of the video resolution. This means that with StretchMovies=no
, all new videos will be played at 640x400, to ensure they match the expected user playback of the original videos.
Please Note:
The system is currently limited to full-screen videos only and does not support the new formats within MIX files (due to a limitation with the Windows API). Videos can be placed in either the game root directory or the MOVIES
sub-directory.
Codecs: WMV, MPG and AVI should play without any additional required codecs on the end-users system, but MP4 overly likely will be required a codec or DirectShow filter to be installed. Once such DirectShow filter is the GDCL "Free DirectShow Mpeg-4 Filters" http://www.gdcl.co.uk/mpeg4/.
Because of this, it is recommended that you use WMV or MPG for your new video files to ensure they play correctly on most end-user systems.
Testing As this is a whole new video system, thorough testing would need to be done on various setups to make sure this meets the expected requirements. Users who can test on Windows, MacOS and Linux are welcome. The following setups should give us a good indication it works correctly;
The source video VINIFERA.MP4
is set at 1920x1080 at 60FPS.
-
StretchMovies=yes
, and a screen resolution smaller than 1920x1080. -
StretchMovies=yes
, and a screen resolution larger than 1920x1080. -
StretchMovies=no
, and a screen resolution smaller than 1920x1080. -
StretchMovies=no
, and a screen resolution larger than 1920x1080.
Various "ddraw.dll" setups would also be welcome for testing if available.
Debug Keys When running Vinifera in developer mode, the follow keys are enabled during playback;
- SPACE - Pause/Resume the video playback.
- R - Restart playback.
- "-" (Minus) - Decrease playback rate.
- "+" (Plus) - Increase playback rate.
- Numpad "-" (Minus) - Decrease volume.
- Numpad "+" (Plus) - Increase volume.
- F1 - Step forward one frame.
- "," (Comma/<) - Seek backwards .5 seconds.
- "." (Peroid/>) - Seek forward .5 seconds.
If you run into any issues, please identify your settings, operating system, and hardware profile.