Limelight Forums

Full Version: [New] Video Recording & Quality Guide
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: Xjqlg84.png]

I see that many people in this community are interesting in recording footage, however, their quality is either laggy or encoding in a really bad codec. This guide lays out the foundation of how to get some sound videos in any Source game.

[Image: kY0PHmc.png]

The Source engine has a built-in demo system, this allows you to record entire gameplay and when you have finished it saves it as a small file to your hard drive. It's simple to playback and doesn't affect your gameplay while recording. 

To start recording, first open your console by pressing the designated key (Options > Keyboard). Once opened type record demoname with demoname being the name you wish to assign to the demo. When you have finished recording type stop. Your demo will be saved in a .dem format.

To locate your recorded demo visit SteamApps\common\GarrysMod\garrysmod and search for the filename you assigned the demo. When a map change occurs the system will automatically rerecord, however, if you leave the game you will have to start recording again once you re-enter.

[Image: 047DSln.png]

To playback a recorded demo, open console and type playdemo demoname with demoname being the name you gave the demo. To help you the system will autofill names of your demos as you type them, just like other console commands. Press the enter key to watch your demo and once you've done open console and type stopdemo. If you're getting laggy playback then I suggest disabling any running scripts such as autoexec.

If you are getting errors with old demo files then see the bottom of this guide for details on how to fix it.

Here is a video if you want to learn how to smooth your footage, it shows an example of L4D2 but it will work in all Source games.

[Image: sGRVJN2.png]

[Image: HEEfHMc.jpg]

Nonetheless, .dem files are not particularly useful and you cannot upload them to video hosting sites such as YouTube; in this section of the guide you will learn how to record your footage into a video file. We'll need to use the built-in Source recorder for this. There is also an important fact to remember: No matter how bad your computer is, you can maximise your settings and, as along as the game doesn't crash, you can record a 30FPS clip. I also recommend 1920x1080 or 1280x720 resolutions for higher quality videos. If you are unable to do this you can window your game which will force it to fit the resolution.

[Image: RzFJStB.jpg]

There are two methods you can use to go about recording a video file. The first method entails recording footage directly to an AVI in your SteamApps\common\GarrysMod\garrysmod folder. The other method should only be used if the first method fails; it involves the recorder saving every frame as an uncompressed .tga in your SteamApps\common\GarrysMod\garrysmod  folder and you will need to use Virtual Dub to compile them into an AVI.

[Image: p7g5yOz.png]

For you to record directly to an AVI in your SteamApps\common\GarrysMod\garrysmod folder, enter the command host_framerate 30 (substituting 30 for the FPS you want the video output to be). Then enter startmovie filename avi into console once you are ready to record (remember to substitute filename for the name you wish to give to the file). You will then be asked which codec you would like to use, for the best quality I recommend choosing uncompressed, however, if you have limited harddrive space then use the Lagarith Lossless Codec. It will begin to lag and the sound will begin to loop or mess up. Do not worry as this is normal. When you have finished recording enter the command endmovie into console. Now find your file in the SteamApps\common\GarrysMod\garrysmod folder and proceed to the "H.264" section below.

[Image: iDg2F9B.png]

Many people may have issues with direct AVI recording. As method one is the easiest I recommend you try it first. First you will need to download VirtualDub. Once you have it installed, let's get recording:

When you are ready to record, enter the command host_framerate 30 (substituting 30 for the FPS you want the video output to be). Then enter startmovie filename into console once you are ready to record (remember to substitute filename for the name you wish to give to the file). By not specifying the filetype it will automatically record .tga and .wav files. Just like method one, the game will begin to lag and the sound will mess up, this is perfectly normal. Once finished enter endmovie.

For you to obtain an AVI you will need to use VirtualDub to merge all the files into a single video clip. Launch VirtualDub and nagivate to the SteamApps\common\GarrysMod\garrysmod folder. Here you will find many TGA files labelled "filename0000", "filename00001, "filename0002" and so forth. You only need to select the first TGA file (for instance, filename0000) and press open. All other TGA files will be automatically uploaded.

When the upload is completed in VirtualDub click Audio > Audio from other file and add the .wav file that has the same filename. The .wav file is located in the same directory.

Then click Video > Frame Rate  and select "Change framerate to (FPS)" and set it to 30.

Last but not least, click Video > Compression and make sure the video is uncompressed. When done save the file as an AVI or press F7 on your keyboard. The file will begin to render and once complete you will have your very own high quality, uncompressed AVI video file at 30FPS. Now give yourself a pat on the back, but wait, there's more you can do to increase the quality...

[Image: wOvsc92.png]

By now you should have a high quality video clip, as a final touch up you will want to encode it into H.264 to ensure it is the best quality for YouTube, Vimeo or other video hosting websites.

[Image: ABW10rd.jpg]

Most video editors will not have the H.264 codec built-in. If you wish to decode/convert pre-coded videos then try out the Super Video Converter

When you are ready, download this H.264 encoder and input the final uncompressed video file, then set the output. Next, set the encoding setting (the higher up the list, the greater the quality and, therefore, larger the filesize). Then press encode. The process may take some time depending on the settings and the video file size. Now you will have an exotic H.264 encoded video file with the finest of quality, it is all ready to be uploaded to any media site of your choosing. 

[Image: bkoavhj.png]

The host_framerate command is a console command which was added via a community petition. This command tells the engine what FPS to write the demos at. This allows you to set any FPS you want, when you're playing a demo just enter this command: host_framerate value (with value being your chosen FPS) and the demo will slow down depending on how high you've set the value at. If you then choose to record using the startmovie command, it will record in the given frame rate. 

Here is a link to a comparison of 15FPS, 30FPS and 60FPS.

[Image: RepAq5A.png]

If you are given the following error upon opening a demo file:
ERROR: demo network protocol 200_ outdated, engine version is 200_. Failed to read demo header.

Then your demo is out of date. Here are some steps to fix this.

First, start up Garry's Mod and attempt to play your demo by typing playdemo demoname (with demoname being the name of the demo) into your console. If you receive an error like the one above then follow the next step.

Now the game and go to your Garry's Mod folder: SteamApps\common\GarrysMod\garrysmod. Look for a file named steam.ini and open it with notepad. The steam.ini file is a Setup Information type file. Inside the format should look something resembling this:

PatchVersion=2.0.0.7
ProductName=left4dead2
appID=550

You will need to change the red number with the version number of the demo you're trying to play (from your console).

[Image: 0h096ID.jpg]

Save your changes, launch Garry's Mod, play your demo by entering playdemo demoname (with demoname being the name of the demo) and the issue should be fixed. 

[Image: OuyULZb.jpg]

[Image: JEayqDw.png]

I hope this guide was helpful with regards to video recording and optimising videos to top quality.

If you have any questions or need help, here are a few ways of contacting me (in order of most preferred):

Reply to This thread
Steam