Welcome, Guest! Login | Register

Half-Life Movies [Print this Article]
Posted by: Forceflow
Date posted: Aug 04 2004
User Rating: N/A
Number of views: 6810
Number of comments: 4
Description: Impressive movies made easy.
This guide covers all the aspects of creating a good HL-movie. A movie with gameplay in progress tells a lot more about your map than some screenshots, and it isn't that hard either.

I realise a lot of tutorials like these are around, but I'd like to make this clear for once and for all.

All actions in this tutorial are the same for Steam and older HL versions. The only thing that will be different is the look and feel of the console, but the commands and the method stay the same.

Step 1: Creating/Viewing a demo

Unless you're using a program like Fraps (see note at the end) it's impossible to directly produce a movie from a game you're playing. Most hardware would be unable to handle it, and your framerate would look bad. Besides, how can you concentrate on your game when you have to watch all those movie controls too ...

So HL developers came up with something handy: a demo. A demo is in fact nothing more than a file where all your movements and all movements from things/characters you actually see are stored, as commands. Anyone with the HL-engine can read these series of logged actions and reconstruct (and see) exactly what you saw when you were playing the game.

The advantage of a demo is that it just stores actions as, in fact, text lines ... which demands a minimum of CPU power (almost nothing), so it doesn't effect gameplay/fluency at all. The disadvantages are:

- If you want to play the demo, you'll need HL (& the mod you were using.)
- When creating a movie from a demo, sound will not be transferred. (because the output consists of just a bunch of Image files we have to slap together for ourselves ... see more below.)

Now how do you create a demo?
  • Open up the console (this can be in a single player game, in a multiplayer game in progress, when you're spectating someone else ... doesn't matter which mod or situation.) and use this command: "record (demoname)". For example "record myfirstdemo".
  • Play your game as long as you want.
  • To stop recording the demo: "stop". If you want to record again, but just append it to an existing demofile, just use the record command again with the same demoname.
So, you've got your demo ... now how do you watch it?
  • Bring up the console again. (when a multiplayer game is in progress, note that you will be disconnected. It's best to load a demo when you're not playing anything, but it's not dangerous, too.)
  • Use the command "playdemo (demoname)". For example: "playdemo myfirstdemo". After the map has loaded, the demo starts playing. When it's finished, you get the console again. You can stop it anytime by using "stopdemo".

    Note: some mods & all steam-powered games support the command "viewdemo (demoname)". This has the advantage of giving you a small VGUI to control the demo (playback rate, rewind, forward ....). Use it whenever possible.
NOTE: If you want to record what every player on your server sees, you'll need a special kind of demo, a HLTV demo. More information about creating HLTV demo's (this is kinda advanced) on the The Specialists Mod Boards.

Step 2: Produce your movie frames

Now you've got the demo, it's time to start building your movie. Again, HL doesn't support direct output of movie files, but it will just export every frame you see to a BMP file ... we'll merge these images together later on.
  • The first thing you've got to do is to switch to a nice resolution. (1024*760-scaled movies would be overkill). Switch to 640*480 or something like that, and make sure your gamma and brightness settings are reasonable.
  • Start your demo (see above)
  • Whenever you want to start producing the frames, use the command "startmovie (filename) (fps)". For example: "startmovie test 30". This would produces 30 BMP's for every second you're recording, and they would be named like this: "test001", "test002", "test003", ...

    Remember, demo recording starts when you ban the console. If you use the command and just stare at the console, nothing will happen, so make sure you get rid of it when recording. When you load it up again, demo recording will stop. Just load up and ban the console when you want to record.
  • You can stop recording at all with the "stopmovie" command.
A series of BMP's have been made now. Look for them. (they usually are in your mod folder, or in the valve folder if it's regular HL.)

Step 3: Merging the BMP's

Most people refer to a program like Videomach for this, but that isn't freeware. Virtualdub is, and it's a lot easier with this handy program. Everyone should have it installed, you'll need it sooner or later.

Now, load up Virtualdub and choose file->open video file. Browse to the right folder and select the first BMP (the one that ends with "001". Hit "open", and Virtualdub automatically loads the whole BMP goodness as one movie!

Let's save this now. Saving your movie as a raw AVI file is a big no-no. Your movie would be very big and not download-friendly. Would take ages to load, too.

Once again, Virtualdub comes with a solution. Select video->compression (or hit CTRL+P) and a new window will appear.

user posted image

Now look at that! All the video codecs you installed on your PC can be a choice for compressing your movie... select one of them, and hit OK. (some movies have size restrictions, but since we used a valid resolution to record our movie, most of them are OK. We also suggest you try the latest version of DivX using 'multipass' for best results). Xvid or Intel Indeo Video are good choices too. Just test them out, you can always save your movie again with another compression, as long as you don't close virtualdub.

The final step is to actually build your movie. Choose file->save as AVI. Give your movie a name, and the process will start. When you used a compression, this could take a while, but it's worth it.

After you built your movie, you can delete the BMP's.

Whew. You built your first HL movie, and it is now ready for editing with any video editor. (again, Virtualdub is a good tool! Take a look at the site for some tutorials, or go and experiment for yourself)

NOTE: If you want movies with ingame-sound, you'll have to use a program like Fraps. (working demo version available). This tool records a video file while you're playing the game or playing a demo, including the original sound. Make sure your PC has the muscles for it, because the CPU will get a heavy load.

Rate This Article
This article has not yet been rated.

You have to register to rate this article.
Related Files
Zip FileFilename: tut94_1.jpg
File Size: 36 KB

User Comments Showing comments 1-4

Posted By: Bulk on Jul 15 2004 at 04:32:28
Good stuff! Not seen a real sound tutorial in a long long time...

Posted By: omega on Jul 15 2004 at 21:21:08
ugh.

WRONG.

22khz 16bit mono is the maximum.

HL's "hi quality sound" or whatever it's called cvar, in the sound options menu, makes use of 22khz 16bit mono quality. if you use that. and if it's off, they're automatically downsampled to 11khz (the bitrate stays though afaik).

Just like quake.

Posted By: $niper Chance on Jul 17 2004 at 03:28:23
Don't forget standard MP3 files, which are fully supported by Steam for background music.

How long ago was this actually written?Edited by $niper Chance on Jul 17 2004, 03:28:56

Posted By: XWider on Jul 23 2004 at 20:58:33
Engine capabilities:
Non-Steam Half-Life up to 1.1.0.9 - max. 22050 8bit mono.
Half-Life 1.1.1.0 and Steam versions - 22050 16bit mono.

I prefer to use 1st variant for compatibility (I use SoundForge, it has nice "Convert to 8bit" tool).


You must register to post a comment. If you have already registered, you must login.

Latest Articles
3rd person View in Multiplayer
Half-Life 2 | Coding | Client Side Tutorials
How to enable it in HL2DM

By: cct | Nov 13 2006

Making a Camera
Half-Life 2 | Level Design
This camera is good for when you join a map, it gives you a view of the map before you join a team

By: slackiller | Mar 05 2006

Making a camera , Part 2
Half-Life 2 | Level Design
these cameras are working monitors that turn on when a button is pushed.

By: slackiller | Mar 04 2006

Storing weapons on ladder
Half-Life 2 | Coding | Snippets
like Raven Sheild or BF2

By: British_Bomber | Dec 24 2005

Implementation of a string lookup table
Half-Life 2 | Coding | Snippets
A string lookup table is a set of functions that is used to convert strings to pre-defined values

By: deathz0rz | Nov 13 2005


Latest Comments
knock knock
General | News
By: omega | Dec 22 2016
 
knock knock
General | News
By: MIFUNE | Oct 10 2015
 
New HL HUD Message System
Half-Life | Coding | Shared Tutorials
By: chbrules | Dec 31 2011
 
knock knock
General | News
By: Whistler | Nov 05 2011
 
Particle Engine tutorial part 4
Half-Life | Coding | Client Side Tutorials
By: darkPhoenix | Feb 18 2010
 
Particle Engine tutorial part 2
Half-Life | Coding | Client Side Tutorials
By: darkPhoenix | Feb 11 2010
 
Particle Engine tutorial part 3
Half-Life | Coding | Client Side Tutorials
By: darkPhoenix | Feb 11 2010
 
Game Movement Series #2: Analog Jumping and Floating
Half-Life 2 | Coding | Shared Tutorials
By: mars3554 | Oct 26 2009
 
Particle Engine tutorial part 5
Half-Life | Coding | Client Side Tutorials
By: Deadpool | Aug 02 2009
 
Particle Engine tutorial part 5
Half-Life | Coding | Client Side Tutorials
By: Persuter | Aug 02 2009
 

Site Info
297 Approved Articless
8 Pending Articles
3940 Registered Members
0 People Online (3 guests)
About - Credits - Contact Us

Wavelength version: 3.0.0.9
Valid XHTML 1.0! Valid CSS!