UPDATE 2022:
This is suuuuuuuuuuuuuper outdated. These days the RetroArch emulator will save a .mkv video file for you if you hit the appropriate keyboard key to start/stop recording (I think it's the "Y" key).
How to Make Game Movies
UPDATE: Get the new recording emulator, gens re-recording (Gens11a.zip). The screenshots in this tutorial show an older version (Gens Movie 9.5b), but they are similar.
This tutorial teaches you how to record a game played online and turn it into an AVI movie file. You can then upload the AVI file to YouTube if you want. How to add voice commentary may some day be covered.
I've broken it down into a few sections:
Download and Install Necessary Programs
Record a Game to a KREC File
Convert the KREC File to a GMV File
Convert the GMV file to an AVI Movie
Fix the Audio Sync Problem
Edit the Movie
Add Instant Replays
Record Commentary to WAV File
Add Commentary to the Video
Compress AVI Down to Nice Size (~100MB)
Upload to YouTube
Download and Install Necessary Programs
In this section, you download and install a version of Gens that can record to AVI, a couple video codecs, and a simple free video editor.
Get Gens Re-recording from http://code.google.com/p/gens-rerecording/downloads/list (Gens11a.zip)
[*]Unzip to a location of your choice.
[*]You need to copy the kaillera DLL into the movie emulator's directory. Download it here:
kailleraclient.zip
[*]Get and install the Lagarith video codec.
[*]Get and install the x264 codec.
[*]Get VirtualDub
[*]LAME MP3 Encoder
Record a Game to a KREC File
This section tells you how to record a game to a KREC file so that it can later be played back and converted into a movie.
This assumes you're using Gens or Gens-netplay and are familiar with how to use the p2p Kaillera. To familiarize yourself with the p2p Kaillera see this thread: http://nhl94.com/forum/index.php?showtopic=4442
Onwards!
You can get an older version of this, called "Gens Movie", attached at the end of this post, but you might as well get the above version.
http://i263.photobucket.com/albums/ii144/smozoma/gensmovie95directory.png
(it'll be called gens_11b.exe now)
http://lags.leetcode.net/codec.html
http://sourceforge.net/project/showfiles.php?group_id=213809
Above the table, it'll say, "Looking for the latest version? Download x264vfw_(blahblahblah)". Click that! (If your operating system is 64-bit, you could click "x264vfw64", and download the 64-bit version instead. It'll run faster)
Install
http://virtualdub.sourceforge.net/
Download the Release Build (you'll be redirected, then the file should start downloading)
Unzip to a location of your choice.
Follow the instructions here: http://users.tpg.com.au/mtam/install_lame.htm
Don't worry about the last step about verifying the codec. It probably installed fine.
You need the p2p Kaillera installed, though you can still record games playing on a server. Get it from the "Download and Install Necessary Programs" section of this guide, above. Put it in with the emulator .exe file:
[*]Find someone to play against!
[*]Load up Gens and start Netplay.
[*]Start up a game, and remember to put a checkmark next to "Record Game"
[*]Play your game, then shut down Gens as usual when the game is done.
The game is recorded into a .krec file. The file might be in one of two places (it is inconsistent -- one game might be in the first place, the next might be in the other!).
They will be in a directory called "records" that is either in the directory the ROM is in or the emulator's directory.
http://i263.photobucket.com/albums/ii144/smozoma/wherethegameissavedto.png
My ROMs are in "G:\Games\Emulators\Sega\Games\nhl94" and my emulator is in "G:\Games\Emulators\Sega\gens214", so the saves will be in a folder called "records" in either of those directories. Usually it's under the ROMs directory, but sometimes it's under the emulator directory.
The file will be named something like 47916BE3_gdlseason3.krec. That hexadecimal number (47916BE3) at the start of the filename represents the number of seconds passed since midnight January 1st, 1970, so the most recently-recorded game will appear at the end of the list of files.
You can rename the files and they will still work, as long as you keep the .krec extension.
The KREC file is not a video file. It is basically just a recording of the controller button presses that were sent to Gens by you and your opponent while you were playing. You can't play it in a media player.
Convert the KREC File to a GMV File
We have to do a non-intuitive step here.
Gens Re-Recording can't convert the KREC file (created by Kaillera) directly into an AVI, so we need to first convert the KREC file into a GMV file. To do this, we replay the game from the KREC file, and get Gens ReRecording to record the game to a GMV file. Later, we'll turn the GMV into an AVI movie file.
[*]Select one of the videos, and click "Play." The recording will start playing.
[*]Click on the screen, and press the Escape key in order to pause the playback.
[*]Go to Tools->Movie->"Record New Movie"
http://i263.photobucket.com/albums/ii144/smozoma/recordgamehostp2p.png
http://i263.photobucket.com/albums/ii144/smozoma/recordgameclient-server.png
Run gens_11b.exe
Load the ROM you are going to use (so it knows where to look for the ROM and recorded files later).
Start Netplay from the File menu (if Netplay isn't there, you need to put the Kaillera.dll file in the same directory as gens_11b.exe)
Change the mode to "3. Playback" (instead of "1. P2P" or "2. Client").
http://i263.photobucket.com/albums/ii144/smozoma/netplayplayback.png
http://i263.photobucket.com/albums/ii144/smozoma/recordnewmovie.png
Name the Movie File as you see fit (important if you're going to keep more than one GMV file).
[*]IMPORTANT: Put a checkmark next to "Record from now and make a savestate"
[*]Click OK.
[*]You will be asked to save a GST (state) file. Set the name appropriately (important if you are going to keep more than one GMV file) and click Save (or "OK" or whatever it says).
[*]Unpause the game by pressing escape.
The game will start playing back from the KREC file!
In the Gens ReRecording folder, you should have your .gmv and .gst files.
Convert the GMV file to an AVI Movie
In this section, we use Gens ReRecording to convert the GMV game file to a lossless "perfect copy" AVI file. The AVI file will be really big (about 50 MB per minute or 500-600 MB for a 11-minute game), but later on, we'll edit out the boring bits and compress it down to a reasonable size.
Once the game is done, hit ESC again to pause.
Go to Tools->Movie->"Stop Movie"
Go to File->Close ROM
Close the Kaillera/Netplay windows.
Load the ROM in Gens ReRecording.
IMPORTANT: Go to Sound->Rate->44100. If you are not at 44100, your audio and video will not be in synch.
Go to Tools->Movie->"Play Movie/Resume record from savestate"
Use the "..." buttons to select the .gmv and .gst files you created previously. Ignore the "inconsistent" warning.
Click "Play Movie" to start playing the movie.
If nothing is happening, then maybe the emulator is paused... Hit the ESC key to unpause it!
Ensure Tools->AVI Options->"Add Sound to AVI" so it has a checkmark.
Go to Tools->AVI Options->"Start AVI Dump"
http://i263.photobucket.com/albums/ii144/smozoma/startAVIdump.png
You'll be asked to enter an AVI file name.
You'll be shown a "Video Compression" window that allows you to select a video codec.
[*]You can make it record as fast as it can by going to Graphics-> Frame Skip->0. On my computer (P4 2.8GHz from 2006), it takes about 5 minutes to record a 10-minute video.
[*]When the game is over, go to Tools->AVI Options->"Stop AVI Dump"
As just said, don't worry if the video is slow or fast or if the audio is choppy. The video will turn out to be the expected 60 frames per second with clean sound.
Fix the Audio Sync Problem
If your audio is out of sync (this happens if you record to AVI when your Sound->Rate is set to 22050 instead of 44100), there are are 2 ways to fix this: 1) change the video frame rate 2) stretch the audio.
I'll just explain how to fix the video frame rate, since it's easier.
Use VirtualDub to change the framerate:
If you want to insert highlight clips, then also change their framerates to the same value you used for this video. Because your highlight clips are going to be short, it doesn't matter if their own audio/video sync is perfect – you need the clips to all have the same frame rate.
(I haven't tried it this way yet, but I think it should work…)
Edit the Movie
[not done]
Convert to 30 frames-per-second, 640x480
Open your video with VirtualDub.exe.
If you have multiple parts, you can use File->Append AVI Segment to add other files to the end of the video. It'll try to load multiple files if they're numbered consecutively.
[*]Next, we want to crop a bit of the video so it looks better. Click on the "resize" filter you just added to the list, and then click the "Cropping..." button. X1 offset: 16. X2 offset: 16. Leave the others at 0. Click OK.
[*]Set the compression to Lagarith: Video->Compression..., find Lagarith lossless codec in the list and click OK.
[*]Save as a new file: File->Save as AVI.... I usually call it something like "game1.30fps.avi". Since we increased the resolution, the file will be about 1.7GB!
Cut out boring sections
Now, if there are boring parts you want to delete (long pause when your cat knocked your drink over?), here's how:
Save to a new file.
IMPORTANT: You should only do this kind of editing with Lagarith-compressed video. If you try later to edit x264-compressed video, you'll have problems because you can only cut starting on "key frames."
Add Instant Replays
[not done]
When replaying the games from GMV, you can use the F5, F6, and F7 keys (Quick Save, Next Save Slot, Previous Save Slot) to save up to 10 instant replays. You can later load those saves, and then record yourself controlling the instant replays directly to AVI. Then, you can insert those AVI clips into your video (Note: you can only join video clips using the same compressor (i.e. Lagarith).
Record Commentary to WAV File
[not done]
This is where you get a microphone and record youself doing the commentary for the game. Later on, the commentary can be mixed in with the audio of the video, so you get the sirens, etc.
Add Commentary to the Video
[not done]
Export audio from the movie using VirtualDub (to WAV file).
Use an audio tool to combine the WAV files.
Compress AVI Down to Nice Size (~100MB)
[not done]
Uploading a 500+MB file to YouTube could be problematic, so here we use the x264 codec to shrink the movie down. (Plus, I doubt YouTube supports Lagarith).
x264 looks way, way better than DivX or XviD when compressing NHL94.
Go to Video->Frame rate...
Look at the value at the end of the 3rd option, "Change so video and audio durations match (59.9xx)"
Write that number value into the 2nd option, "Change to _____ frames per second." You might ask: Why not just use the 3rd option? The answer is: because if you use the third option and then you try to insert highlight clips, you'll have a hard time getting the frame rates to match because the 3rd option uses more decimal places than it shows.
Enable Video->Direct stream copy
save
Gens ReRecording records in 60 frames-per-second, so to bring it down to 30fps by eliminating every other frame, go Video->Frame Rate->"Process every other frame (decimate by 2)"
We want to resize the video to 640x480.
Video->Filters->Add...->resize.
Aspect ratio: Disabled
New size: Absolute, 640 x 480
Filter mode: Lanczos3.
Open the file you just saved (or do this before saving it)
Search to the end of the segment you want to delete. Then, press the right arrow key to go one frame extra.
Press the "End" key to mark this as the "after the last frame to delete" frame. This frame will still be in the video, but not the rest that you mark to delete.
Search to the start of the segment you want to delete.
Press the "Home" key to mark this as the first frame to delete.
Press "Delete"
If you are editing a file you already saved to 640x480:
Select Video->Direct stream copy to avoid doing the compression over again.
Go into Video->Frame Rate and make sure it's set to "Process all frames" so you don't end up with 15fps!
Open the video in VirtualDub.
Video->Compression...
Click on x264vfw - H.264/MPEG-4 AVC codec, then click the Configure button
There are a couple options you need to use for VirtualDub:
[*]Select Single pass - bitrate-based (ABR) in the dropdown and set Average bitrate (kbit/s) to 1280 if you want the video to be about 100MB for 10 minutes, or 2560 if you want it to be about 200MB.
[*]Compress the audio to MP3:
[*]Save as a new file.
Upload to YouTube
[not done]
Gens_9.5b.zip
kailleraclient.zip
Audio->Full Processing Mode
Audio->Compression...
In the left list, find and click on Lame MP3.
In the right list, find and click on 44100 Hz, 128 kbps CBR, Stereo.
OK.
Zero Latency: checked (in the Basic area)
VirtualDub Hack: checked (in the output area)
Find "Lagarith lossless codec" in the Compressor list.
Click OK to start recording the video! Don't be alarmed if the video is slow or the audio is choppy, the AVI file will turn out fine!
I don't bother, but maybe you could save it in the format "GDL3 - DAL 4 @ QUE 3 OT (2008-01-15).gmv"
http://i263.photobucket.com/albums/ii144/smozoma/kaillerainemulatordirectory.png