Half-Life

Half-Life

Not enough ratings
Demo Recording
By executλble
Demo recording is a game feature which allows the player to record in-game footage into lightweight .dem files.
This feature is widely used by many players as it does not stress the game at all and the created files don't take a lot of HDD space, so they're very easy to share afterwards.
 
Rate  
Favorite
Favorited
Unfavorite
Recording
For capturing the demo into a video file, use this guide instead.

To record a demo file:
  • Load up any level (or join the server, and open up the console
  • Write a command record <demoname>. The demo will begin recording.
  • Go back In-Game, and do anything you want to get recorded.
  • After that, open up console again and write stop. The demo recording will stop. You'll be able to see the length of your demo in seconds.
  • That's it! You can find your demo in your game's directory, for example
    \common\Half-Life\valve.
Playback
There are several ways to playback your recorded demo. If you want to turn your demo into a movie file, you'll have to use this feature. Here's how you do it:

  • Open up console
  • Write a command playdemo <nameofyourdemo>
  • The demo will start playing back.
  • Alternatively you can use viewdemo for more playback options like slow-motion, rewinding, pausing etc. However, viewdemo will NOT work with demos recorded on older (or different) versions of the game.
Recording with HLTV
HLTV is a tool designed to record better Half-Life demos. It works like an additional client and it can record every players' POV in the server.

You can download HLTV from Steam's Tool library by getting Half-Life Dedicated Server.
Once that is done downloading, head to it's directory and launch hltv.exe

You'll now have to connect HLTV to a server (like you'd connect to a server yourself using a console). There you can start recording the HLTV demo. Use stoprecording to stop the recording.
< >
21 Comments
[FJC] Fusionhead Mar 23 @ 8:22am 
Thanks for responding execut4ble! I've looked at the file in a hex editor. If I can figure out which hex string that is used for talk key pressed and then released, I can snag what's between. Then try to reassemble it. More digging :)
executλble  [author] Mar 23 @ 2:50am 
Yeah, startmovie would be a way to record the audio of the demo on the client. I've no idea if it's possible to record into a distinct audio file serverside though, sorry.
[FJC] Fusionhead Mar 22 @ 11:03am 
@execut4ble. startmovie looks like a client command only.

What I'm doing on the server side is enabling SourceTV in the server.cfg file and setting the record game option. This creates a .dem file like this for each map played and puts it in the hl2mp root folder of the server.

example automatically generated map recording with embedded audio track: auto-20190322-1013-dm_resistance.dem

Once these files are moved into the client folder to play them you type "SHIFT-F2" to bring up the DVR. I know the audio track is embedded into the dem file because I can email it by itself to others and they can play it on their client dvr.

The .dem file has an embedded audio track in it. Perhaps there is a way to instruct SourceTV to create an associated audio file like startmovie does on the client.
[FJC] Fusionhead Mar 22 @ 10:29am 
@execut4ble. Thank you. Is that a client command, server or both? I'm looking into to it. I'm running a headless linux server to host the game. If it works by commands or rcon, I can script it.
executλble  [author] Mar 22 @ 5:04am 
@Fusionhead, try the startmovie command, I believe it lets you record into a WAV file.
Should look something like "startmovie movie wav", then play back the demo and after it's done, use "endmovie"
[FJC] Fusionhead Mar 21 @ 8:13pm 
In hl2dm, is there a way to save off the embedded audio files such as player voice chat? I record every game via SourceTV and sometimes players are abusive when an admin is not on. Yes, we still have a hl2dm server running for over 15 years now. My idea is that if I can export the audio track, either for each player in the dem file or the complete audio track for the dem file, I could do audio processing to convert them to text so I can then automatically scan for key word triggers that I can review. I think it would be fun to program this, probably in Python.
BEN STRAHN Apr 17, 2017 @ 6:17am 
Thanks dude now i can have a bhop fragmovie
Yetoo Jan 26, 2014 @ 12:35pm 
Thanks.
executλble  [author] Jan 26, 2014 @ 12:25pm 
Depends on the game you're playing. If you want quick conversion you can Fraps the demo file or use more advanced methods

http://steamcommunity.com/sharedfiles/filedetails/?id=191306623
Yetoo Jan 26, 2014 @ 11:49am 
Can you explain on how to change the .dem file to Avi or something that youtube accepts? Thanks anyways on how to record.