How to Make a Videogame Trailer on the Cheap


You don't have either Final Cut Pro, Adobe Premier, or whatever other software that real movie people use, or video capture hardware.

@p You also don't have the skills or experience of a real movie person.

@p But you want to make a trailer for your game. Well, sounds like this guide is for you.

@p This is a long detailed post, because I'm like that. But the jist of it is:

  • Plan it out in cuts, to a certain tune, and try to keep the overall length in mind.
  • Dump the frames for those cuts from your game somehow (e.g., framedump a sequence of high quality .jpgs or use FRAPS, if you can.)
  • Edit each cut individually, removing any trash, and bring them together using VirtualDub into cut001.avi and so forth, compressing them.
  • Assemble the cuts using VirtualDub and "Direct Stream Copy" to avoid recompressing things
  • Do a test render and compare against the song length, see how it looks all together.
  • Tweak the original cuts (above) as necessary and re-compress them, then reassemble them as above.
  • Dump the audio from the final assembly, and mix the music in
  • Again, use VirtualDub and bring the final, mixed audio in
  • Save another "Direct Stream Copy" version as your final final master
  • Save a "Full Processing Mode" (compressed version), possibly resized, for uploading.

Expect this process to take 2-3 days. You need lots but not epic amounts of hard disc space. Why not use another machine for this, if you have one? Then you aren't so tied up while video renders and you aren't thrashing your main development box's harddisc which also contains your precious actual code.

@p Please don't render video on the same laptop you do game dev on, lessen you have to.

@p Please! Youl kill it.

@p Now without further ado, the actual post...

1. Choose Music and Story

First things first. Pick a catchy tune from your game.

@p Next, think about what you want to show. Action? Exploration? A mix? Whatever you decide, try and keep the list fairly short.

@p One thing to think about at this point, is do you want to tell a story, or should it be a mish-mash of gameplay?

@p If you're telling a story, don't be afraid to "bend" the story of your actual game to better fit the trailer. For instance, in your game there may be a complex, specific order of events that leads to a climactic battle. But for your trailer, it might be better to just show a quick "You'll never get away with this!" from one section of the game, and "I'm here for my revenge!" from a completely different section.

@p In a way, you're telling a different story than the one your game tells, although one that's closely related. This frees you up to make the cuts you are going to need.

2. Plan your Cuts

Write down an order of cuts. Make some longer than others, for instance:

  • Intro text, "I was born to an alien mother, and an abusive father." (text)
  • Show hero taking sword from above fireplace in family room (gameplay)
  • "On my world, this wasn't unusual." (text)
  • Show hero walking into parents room, holding sword.
  • "But one day, I woke up and realized this was crazy. I had simply had enough." (text)
  • Hero enters battle with father, music starts.
  • ... and so on...

Based on how long your music is, try to limit your cuts appropriately. For instance, 10 cuts for a 1 minute song means you've got about 5 or 6 seconds per cut. You will have some wiggle room later (including throwing out entire cuts) but keep that in mind.

2. Video Dump

This is the techincal part. You need to build something in your game, or else use a tool such as fraps, that will let you dump video and audio from it. I use a replay system that records game input, and then playback and hit F11 to enable "dump" mode. This lets me "act" by playing the segment I need to play, recording it to a replay file, and then play it back, frame dumping.

@p Also: if you can't get audio, it is not the end of the world. I suppose I just think a trailer is stronger when it includes sound effects from the game, but it might be more work than it's worth to you. Either way, you do need to turn off the music in your game if you are dumping audio.

3. Edit Your Gameplay Cuts

I am going to assume you are working with an order of screenshots for each cut. So for instance, your first gameplay cut is in a folder "cut001/" and consists of files like "screen00001.jpg", "screen00002.jpg", etc. It has a matching file, "audio.wav" which contains the audio for that sequence.

  • Download and install VirtualDub.
  • Download and install x264vfw from SourceForge.

Now for loading and editing your cut.

  • Start up VirtualDub.
  • Click File -> Open Video File... and then browse to your "screen00001.jpg". Lovely, VirtualDub will load all the other screenshots in sequence. Screenshot of the load frames dialog.
  • Click Video -> Frame Rate and enter 30, or whatever framerate is appropriate. Just make sure to keep it consistent with your game (or else the video will look too fast.)
  • Click Video -> Full Processing Mode
  • Click Video -> Compression and choose the x264vfw codec
  • In that same screen, click Configure to change codec settings Screenshot of the choose codec dialog.
  • Tell it to use "Single pass - quantizer based CQP" and set quantizer to 1. This is essentially "max quality", I think.
  • Somebody please correct me if the above is wrong. Screenshot of the codec settings dialog for x264vfw
  • Click Audio -> Direct Stream Processing
  • Click Audio -> Audio From Another File and select your "audio.wav" from the appropriate cut

Now we want to edit the cut.

@p Along the bottom in VirtualDub is a slider that lets you move around in your video.

@p To delete a bit of video, move to the first frame and press the "HOME" key. This sets the selection start.

@p Move to the end of what you want to delete and hit the "END" key. Now press "DELETE" and the section will disappear.

@p VirtualDub will do all things sensible with respect to audio-- don't worry!

Screenshot of VirtualDub showing where to select and remove frames

What you want to do is try and delete anything from each cut that isn't "meat". This of course is an art and depends on what you want to show. If the purpose of the cut is to show battle, then cut out the walking parts. I'll leave that up to you, except I will say this: try not to leave in too many boring or inconsequential parts.

@p You might also realize at this point that some complete cuts are pointless; for instance you had a section where the player opened a chest, which sounded interesting, but when you look at it you realize it is boring. This is the moment to toss them.

@p Now save it:

  • Click Save as AVI...
  • Filename e.g., "cut001.avi"
  • Go make tea. That's it!

4. Still Text

Once you've got your gameplay cuts set up, it's time to make some still text. Open up GIMP or whatever you use and make your necessary screens, in whatever font you like. Save them as .PNG files. Make sure they are the same resolution as the rest of your gameplay video.

@p You should also make a "silence.wav" file that is the same format of audio as dumped in the above gameplay segments (e.g., 16 bit stereo signed audio) and save it for later. Make it long, say 30 seconds.

@p Now, time to make little video segments of each bit of text you wanted to show. Note that this is for text that DOESN'T appear overtop of your game itself, that is outside the scope of making a trailer on the cheap:

  • Start up VirtualDub again; or even better use the same instance you were using before, since it's already set up properly.
  • Double check the video settings are the same as above (full processing, x264, framerate, etc.)
  • Choose "audio from another file" and select "silence.wav"
  • Load the title image PNG you want. For instance "text_borntoanalienmother.png"
  • Ctrl+C to copy the frame
  • Ctrl+V to paste it. Paste it a bunch of times.
  • Keeping in mind your framerate, and a rough idea of how long you want each text to show, paste that many times.
  • For instance, if you want the text to show 2 seconds (probably a reasonable amount of time) then paste it 60 times.
  • Click "Save as AVI..."
  • Filename e.g., "text_borntoanalienmother.avi"
  • Voila!

You might also do well to make some "blank screen" video, for instance 30 frames (== 1 second) of blank to space things out.

5. Putting it all Together!

By now, you have all these happy little video files sitting on your computer, with compressed video (very high quality) and uncompressed audio. All you need to do is chain them together.

  • VirtualDub!
  • Open the first file in your sequence, for instance "text_borntoanalienmother.avi".
  • Select Video -> Direct Stream Copy
  • Select Audio -> Source -> Stream 1
  • Click File -> Append AVI and select the next segment, for instance "blank_1sec.avi"
  • ... and so on!
  • NOTE, however: VirtualDub has an option to load segments if they are named with numbers. So if you have 4 gameplay cuts in order, "cut001.avi" to "cut004.avi", then you can just check the box on the "append" dialog box and it will load all four. Handy!

I would recommend you not do your entire trailer at once, but maybe group things first into larger segments such as "intro" "middle" "battle" "rummaging" or whatnot. Don't try and put too many cuts together at once because it's easy to select the wrong file.

@p So at this point, let's say we put together the 5 scenes showing the player battling his father. What we now want to do is save it all together as a segment, for instance "segment001.avi". Because you have selected direct stream copy, you are not getting any lossy artifacts -- VirtualDub is basically just appending things together.

I would also recommend fine tuning the timings on each segment that you do, by watching the output video in Windows Media Player. If the quality is too high for your computer to play back reliably, you might want to do another encode (this time, full processing mode and choose some other compression algorithm, anything will do, really) at lower quality and resolution. Filters -> Downsample is good for this. Just don't forget to turn it back to direct stream copy and remove your filters, before doing more work, otherwise you are going to be recompressing (and making smaller!)

Once your timings are all together, you can splice the whole movie into one! Exciting!

6. Finally... Music!

At this point, hopefully, your trailer will be close to the length of the music you want to use for it (of course you could also use a looping tune, and fade it out to the length of your trailer.)

@p Let's assume the first. Figure out how much video data you have, vs. the music:

  • Assuming you just put your trailer together and saved it, you'll be sitting at VirtualDub right with all frames loaded.
  • Move the cursor to the last frame, and note what it is (e.g., 3912)
  • Now, convert that to seconds, given your framerate (3912 frames at 30 frames per second = 3912/30 = 130.6 seconds) (note: incorrect, I was doing this with the calculator in HEX mode; I paid the price later on, you do not have to...)
  • Compare that to the length of your music, let's say it's 110.0 seconds
  • Maybe that works! Maybe you have a few seconds at the end that can be in silence.
  • Otherwise, try and find a place to cut some seconds from.
  • CRUCIAL: YOU CANNOT CUT THIS FROM YOUR FINAL TRAILER COMPOSITE.
  • You need to figure out what you want to remove, and then either remove entire cuts (easiest, and may be necessary if you have way too much video) or remove frames from individual cuts as in step 3, and re-encode, and then recomposite as in step 5.
  • You can't just remove frames from the middle of your AVI, unfortunately, without re-encoding.
  • You must avoid re-encoding multiple times because your video will start to look like crap!

Once you've got it timed about right, you're ready to put it all together.

  • From VirtualDub, with the whole shebang loaded, go File -> Export -> Raw Audio and save it to a file.
  • Load that file up in Audacity or another sound editor. In audacity you load raw audio data using Project -> Import Raw Data. Your audio will most likely be signed 16 bit stereo.
  • Now is the time to set the volume level where you want it, etc. If you know how to use a compressor and understand normalization, take advantage of your skills and DO IT!
  • Load your music file (as a .wav, of course) up and mix it overtop, again setting volumes appropriately.
  • If your music starts partway into the trailer, time it appropriately.
  • Save that whole thing as a .wav file Screenshot of audacity showing two audio files being mixed into one.
  • Now, use that as your source audio from within VirtualDub ("audio from another file...", "Direct Stream Copy".)

You should now save your final "master" of verything, using direct stream copy.

@p If you've done everything correctly, your final master will have pristine, uncompressed audio and very high quality video that has only been compressed twice-- once when dumping from your game (e.g. as very high quality jpegs) and once again when building your cuts in step 3. For reference my 2 minute trailer at 1024x768 is about 500mb at this point.

@p Once that is done, you get to figure out what kind of actual compression you want to use, where you're going to upload it, etc. etc. But it all boils down to doing one final run of compression (possibly using the Filters menu to resize) to create your file that will be uploaded. You might even get away with uploading your final master to a website (e.g. Vimeo) and have them convert it appropriately (but I'm not sure you will get away with uploading a file that large...)

@p Now go crazy! Use your trailer to let everybody know about your fantastic game!

Workflow Diagram (your only real alternative: Microsoft Movie Maker, and I don't mean that disparagingly.)

Complicated diagram showing an abbreviated workflow to that about to be described.

Fig. 1. Workflow. It's undoubtedly easier if you just pirate Final Cut Pro or something, but your trailer won't be any better if you do. That will depend mostly on planning and judicious editing. Also honestly, pirating is for the weak. I remember back in the day so many suckers pirating 3DSMax after Final Fantasy 7 came out, when I went procedural. Where are they now? NOT MAKING GAMES ANYMORE-- I'll tell you that much. If you are small, well then you need to take the attitude that you are not going to be much helped by expensive software used by the big studios. It will just bog you down. Of course this isn't an absolute truth, and maybe video editing is one exception, but that's my viewpoint anyhow. END RANT (for now.)

7. Other Considerations.

For step 5, you could use Microsoft Movie Maker. Actually, I like it for a lot of things.

@p VirtualDub is (badly) missing a "project file". That is, you can load your clips and audio settings but there is no way to save that, per say; you always have to save actual video. That makes it fairly awkward to work with in comparison to Movie Maker. But, VirtualDub can still be a very useful tool for converting your frames to video, which you can then sequence and sync with the music and so forth in Movie Maker.

@p Ideally, you'd also be able to just have VirtualDub NOT recompress at step 3, but just store individual .jpg frames inside the avi. This would save you one layer of compression. Unfortunately, I wasn't able to get it to do this-- perhaps that is a feature I should request (If you are thinking about just using uncompressed video, instead of compressing at step 3, remember that 1024x768x30fps raw uncompressed video is a harddisc-murdering 90mb PER SECOND.)

@p Personally, I just *trust* VirtualDub a little bit more. I know certain versions of Movie Maker do absolutely tremendously bad things to audio, which you don't want.

@p Ultimately you aren't going to get out of this project without some planning, if you want a good trailer, and you want to avoid re-encoding anyhow. So viewed in that light, VirtualDub isn't at such a deficit.

@p Either way, hopefully this guide can help you out in some way! It's a technical process but just one of those things you gotta do...

2011-08-24


◀ Back