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 to them with FFMPEG, so that's exactly what we're doing!
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 to edit this command to suit your needs.
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 are almost there! Now, all there's left to do is to make it work in-game.
Boot up Slade and make a folder where you'll put your videos in (call it something like "movies"), then put your videos in there.
Next, you will need to define the sound you grabbed earlier in a SNDINFO, 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:
For this example, this cutscene will play at the start of episode one.
Code: Select all
episode MAP01
{
name = "Stuff"
key = "S"
Intro
{
Video = "movies/sorry.ivf" // The video, put where it is in the PK3!!!
Sound = "sorry" // The sound name from our SNDINFO
}
}
Here's a little example PK3 I made with a pretty cursed video I found. Feel free to edit it as you wish.
Download
And you're done! Have fun with your FMVs!
