GZDoom V4.8.0 added the cutscene code from Raze (I think). So you can have a epic cutscene in your mod or game!
This thread goes over how to make cutscenes in GZDoom with a .IVF file. However, that is not the only video format GZDoom supports. You can find all of the supported formats here.
.IVF videos are handy since you can easily convert a MP4 (or any format) to them with FFMPEG, so that's exactly what we're doing!
Step Negative One: Don't follow this guide and just use the .bat files.
So yeah, this guide is...rough. Terrible grammar, poor wording for the steps, etc. Don't use this guide. Instead, use these .bat files I made a while back and sleep easy tonight, knowing you can tell your epic story with less headaches!
Download the .bat files here!
Note, you will still need FFMPEG in the same folder as the bats. Get it here.
The .bat file will hold your hand for most of it. Simply just type in the name of the original video, then type the output name, and boom! A .ivf cutscene ready for Slade! It supports any video format FFMPEG supports (Yes, even Bink videos). It will even remove the audio from your video to cut down its size.
There's also the convert_ogg.bat file, which will grab the audio from your video and save it as a .OGG file.
These will do exactly the same thing the OG guide teaches you but it will do it for you. So, if you don't want to play with .bat files or follow a at the time 15 Y/O's guide on cutscenes in GZDoom, just use the .bat files.
Still, if you want your life to be around 10% less fun for a few minutes, continue reading!
Step ZERO: Get FFMPEG and a video ready.
FFMPEG is a program that allows you to convert a video or audio to pretty much any format you wish. So we'll be using it today. You can get it here.
For the video, it can be anything in any format (MP4, MOV, etc).
Step one: Use FFMPEG to convert your video to a .IVF file.
By itself, FFMPEG does not have a GUI, so you'll be using a .bat file with commands.
Here's the command for converting a video to a .IVF file, copy and paste this to a .bat file in your FFMPEG folder. Then drop your video in the same folder and run the bat. Be sure tor replace <input> and <output> to whatever you have/want.
Code: Select all
ffmpeg -i <input> -an -vcodec libvpx -crf 8 -b:v 2M <output>.ivf
GZDoom cannot play audio from a .IVF video, so you need to have a separate audio file along with the video. If you already made your video, you can do two things.
Again with FFMPEG, you can extract the audio from your video with this command:
Code: Select all
ffmpeg -i <input> -vn -codec:a libvorbis -b:a 128k <output.ogg>
Or you can simply Google "mp4 to wav" or something to quickly grab the audio from your video.
The sound format must be supported by GZDoom, you can find all of the supported sound formats here.
Step three: Do some coding!
You're almost there! Now, all there's left to do is to make it work in-game. Don't worry! This coding part is simple!
You don't have to use Slade as you can do this in a simple text editor and Explorer, but since you're on the ZDoom forums, I'll assume you have it loaded up right now.
Make a folder in your mod files and call it "movies" or something cool. This will be where you put your video, duh.
Next, you will need to define the sound you grabbed earlier in a SNDINFO lump, just like any other sound. (Although I heard that if you name the sound the same name as the video, it will work just fine. Haven't tested it though.)
Then, in a MAPINFO lump, find what thing you want the cutscene to play in.
Cutscenes can play in either:
This example will make a cutscene play at the beginning of Episode One.
Code: Select all
episode MAP01 // Beginning of our episode block
{
name = "Stuff"
key = "S"
Intro // Beginning of our cutscene block
{
Video = "movies/sorry.ivf" // The video, put EXACTLY where it is in your mod files.
Sound = "sorry" // The sound name from our SNDINFO
} // End of our cutscene block
} // End of our episode block
Download
And you're done! Have fun with your FMVs!