Go Back   Steam Users' Forums > Steam Game Discussions > H - L > Left 4 Dead 2

Reply
 
Thread Tools Display Modes
Old 03-17-2010, 01:13 PM   #1
Xezium
 
 
 
Join Date: Dec 2008
Reputation: 1026
Posts: 4,536
Video Recording/Quality Guide

Video Recording/Quality Guide
Introduction:

Hi all. I am aware that many people around the community are interested in making videos and such, and the quality is getting frustrating. People recording directly from Fraps and getting laggy footage, or encoding footage in a really bad codec that makes it look horrible. So I decided I'd throw together a little guide on how to get uberquality videos in L4D, L4D2, and any Source game, really.

Quality Examples:

Here are some videos I made to show you quality.

This features footage from a couple of games, including Call of Duty: Modern Warfare 2 (however my quality sucks on that game due to lack of Source engine). I'm also an idiot because I decided to use Fraps and record the footage at 25% and then speed the clips up 4x to get a really smooth video. Then during editing I decided that I wanted it to be slow, so it's somewhat choppy. >: (I'm a hypocrite loollolo)

Unfortunately I'm an idiot and decided to run some basic CC and Contrast editing on this clip, but you can still get the idea.

Video Tutorial:

I have taken some time to make a video tutorial for both methods. It is interactive using YouTube Annotations, so be ready to click on what method you want to see!
(Note that using the annotations removes the HD tag if you choose HD.)

SD | HD

Note:
Console commands are red.
Optional commands during playback are green.
Links are underlined.

Tools:Demo Recording:

There is a feature built into the Source engine called the Demo system. What it does, is allows for you to record an entire game while you play it. It then saves a small file to your hard drive which can be played back. This makes for easy recording, as you don't lag at all when recording, and can play it back smoothly.

Basic Recording:

To record a demo, you want to first have console enabled under Options>Multiplayer.

Then, once you're in a game, open console using your ~ key, and type
record demoname with "demoname" being whatever file name you want. When you're finished recording, type stop . There will now be a .dem file in your /left4dead/ folder with that file name. You don't have to record new demos upon map change, it'll automatically re-record, adding _2,_3, etc to the end. However, if you do leave the game (due to spec bug or a disconnection, etc), you need to record again once you re-enter.

Note: To record your own voice, use the command voice_loopback as you record. Your voice will loop and be somewhat annoying, but it'll then pick up on the demo.

Demo Playback:

To playback a previously recorded demo, simply open console while at the main menu and type
playdemo demoname . The file names of all your demos will auto fill as you type them, similar to the way it auto fills console commands. Once you have the command put in, hitting enter will start the demo. When you're done playing it back, use the command stopdemo .

Note that many things can cause a laggy/choppy playback, one of the best methods is to disable any scripts you have running, like your autoexec or a glowscript.

See the first edit for info on fixing old demos.

See this video to learn how to smooth/drive your footage if you want.
Source Recorder:
Playback Commands
These commands are to be run through console during demo playback to get the desired effect. (Optional)
  • hidehud 4
    • Hides several things on the HUD
  • cl_drawhud 0
    • Hides several more things on the HUD
  • r_drawviewmodel 0
    • Removes your viewmodel, being your hands as infected or you gun as survivor
  • r_flashlightbrightness 0
    • Removes the flashlight (in the case that you're smoothing/driving footage)
  • cl_glow_brightness 0
    • Removes glows
  • voice_enable 0
    • Disables voice chat from playing during demo playback (or in-game, so be sure to set it back to default)
Now you're ready to record your footage into a video file. To do this, we're going to use the also built-in Source Recorder.

Before you begin this, I'd like to point out the fact that NO MATTER HOW BAD YOUR COMPUTER IS, you can jack your settings up as full as they will go, and as long as the game doesn't crash trying to display them, you can record a 30fps clip with it. My computer cannot run this game on high by any chance, yet I can still record in high for the best looking video possible. So jack your settings up before you begin this part. Also make sure to set your in-game resolution to either 1920x1080 (if possible) or 1280x720, otherwise you won't get HD. If your monitor can't support this, set the game to window mode so that you can force the game into one of the resolutions.
Lastly, make sure you don't have the demo paused via the demoui command, and unpause mid-record. This causes the audio and video to be different lengths because the audio doesn't begin recording until after the demo's been paused, whereas the video has been recording since you put the command in. This makes a good use out of the demo_pause and demo_resume commands (especially when bound to a key; bind key "command")
Anyways, here are the two methods:

Method 1 (Use first):
Record footage directly to an AVI in your /left 4 dead 2/ folder.

Method 2 (Use if Method 1 fails):
Recorder saves every frame as an uncompressed .tga in your /left4dead2/ folder and you need Vdub to compile them into an AVI.

Method 1:

In order to record directly to an AVI in your /left 4 dead 2/ folder, run the command host_framerate 30 (or whatever FPS you want the video output to be), then startmovie filename avi through console when you're in the spot you'd like to record. It'll ask you for a codec. For best quality, choose uncompressed. However, if you have little harddrive space, you might not be able to, depending on the length of the clip. If that's the case, use the Lagarith Lossless Codec. It'll be really slow and laggy and the sound will be soundlooping, or really messed up. This is normal. When you're done recording, run the command endmovie . Then go ahead and navigate to \Program Files\Steam\steamapps\common\left 4 dead 2 and find your avi. Proceed to "H.264"

Method 2:
Recording:
This is personally the method I use, as I tend to get issues with the direct AVI recording. You should try method 1 first as it's easiest, and if it doesn't work, use this method as it's safer. First thing's first, download VirtualDub. Now onto the actual recording:

When you're in the spot of your demo you'd like to record, run the command host_framerate 30 (or whatever FPS you want the video output to be), then startmovie filename . By not specifying the filetype, it'll automatically record to .tga's and a .wav. As in method 1, the game will be really laggy and the sound will be messed up while this happens, but that is perfectly normal. When you want to finish recording, run the command endmovie .
Merging:
In order to get an AVI from these files, you need VirtualDub to merge them all into a video clip. Open Virtualdub. Now, navigate to Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2 where there will be hundreds (depending on the length of your file) of TGA's titled "filename0000", "filename0001", etc. Click and drag on the very first one (filename0000) and drag it onto the main VirtualDub window. It'll automatically add all of the other TGAs.

When that's done, click Audio>Audio from other file and add the .wav that has the same filename. (It's in the same directory).

Now, click Video>Frame Rate and use "Change framerate to (FPS)" and set it to 30.

Lastly, go to Video>Compression and make sure it's uncompressed. When that's done, go to File>Save as AVI or hit F7. Save the video file somewhere you'll remember with a good filename. When it's done rendering, you'll have a perfect quality, uncompressed AVI file at 30fps.

H.264:

Now that you have your clip, the last thing you want to do is encode it into H.264 to guarantee best YouTube or Vimeo quality.

Editing: If you plan on editing the clip or several clips, make sure you save the clips as uncompressed and edit them while they're uncompressed. [url=http://www.youtube.com/watch?v=6BNPBQCFbVY]Here's a video on rendering settings in a common used editor. Most higher-end editors should have these same options, so it should be transferable.

You will have difficulty editing H264 based MP4 files in most editors, as they don't have the codec built-in. (I believe owning Quicktime Pro can help solve this, however I do not know for sure) If they're pre-encoded when you get them, then decode/convert them using Super Video Converter.

When you finish editing the clip (if necessary), take the final uncompressed AVI file, and input it into Easy H264, then set the output. Afterward, choose your preset. (The higher up, the better quality and the larger filesize. Therefore; top on the list is largest and best, lowest is smallest and worst.) Then encode. The encoding process may take a while, depending on your preset and your initial filesize. When it finishes, you'll have a beautiful, H264, MP4 video file with beastly quality, ready for upload to your favourite media website.

Out of Date Demos:

If you see 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. See this post for the fix.

Host_Framerate:

Host_Framerate is a moviemaking command that I started a petition for back in 2009. After 100 signatures and a truckload of emails, and even an IM with a dev, the command was added. What this command does, is tells the engine what FPS to write demos at. This means you can tell it to be any FPS you want. When you're playing a demo, simply put in the command host_framerate value, and your footage will slow down significantly, depending on how high the value is. If you then record using the startmovie command, it'll record in the given framerate. This means you can record as high as 10,000 FPS if you wanted to.

Here's a nice link showing you visual comparisons between 15, 30 and 60fps.

Note: North America runs on NTSC, which has a framerate of 30, or Double NTSC, which is 60. In Europe, they use PAL, which is 25 (I think?) or Double PAL, being 50. (Doesn't really apply to YouTube, but if you really wanted to, you could use your region's specific value)


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

Reply to thread

PM
Email
Steam


Last edited by Xezium: 10-08-2012 at 08:16 AM. Reason: Updated contact info, as it has mostly changed.
Xezium is offline  
Reply With Quote
Old 03-17-2010, 01:18 PM   #2
williamblake
 
Banned
Join Date: Oct 2009
Reputation: 387
Posts: 2,457
5 stars + rep. I bookmarked this since its got a few things I didn't know about. Thanks man.
williamblake is offline   Reply With Quote
Old 03-17-2010, 01:29 PM   #3
Xman
 
Join Date: Aug 2008
Reputation: 143
Posts: 2,681
Wow, thanks. I've been wanting to record some stuff lately. +rep
Xman is offline   Reply With Quote
Old 03-17-2010, 01:46 PM   #4
The_Garden
 
Banned
Join Date: Oct 2009
Reputation: 155
Posts: 2,762
can you please make the Presets red writing a different colour? it's painful to read

+rep though, this is exactly what I wanted
The_Garden is offline   Reply With Quote
Old 03-17-2010, 01:47 PM   #5
Xezium
 
 
 
Join Date: Dec 2008
Reputation: 1026
Posts: 4,536
Quote:
Originally Posted by The_Garden View Post
can you please make the Presets red writing a different colour? it's painful to read

+rep though, this is exactly what I wanted
Sure, will when I get back from a sudden haircut appointment :|
Xezium is offline   Reply With Quote
Old 03-17-2010, 01:48 PM   #6
CB1993
 
 
 
Join Date: Apr 2009
Reputation: 237
Posts: 2,244
+rep, very useful information.

Here is something you may want to add, getting outdated demos to work. If your working on a film with your buds or something, and the the next day a new update comes out, your recorded demo won't work!

This is a copy and paste from here.

--------------

1) Start up l4d2, and try to play your demo into your console and type "Playdemo Name"


It should freeze for a second, press the console button again and click around until your menu returns.
Your console should now say something along the lines of:

ERROR: demo network protocol 2004 outdated, engine version is 2007. Failed to read demo header.

2) Now, close the game, and go to your Left4Dead 2 folder:
X:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2
and find a file named steam.ini and open it with notepad:

PatchVersion=2.0.0.7
ProductName=left4dead2
appID=550

You need to change that green number with the version number of the demo you're trying to play (from your console):

ERROR: demo network protocol 2004 outdated, engine version is 2007. Failed to read demo header.

PatchVersion=2.0.0.4

Save your changes, start up Left4Dead2 and again, play your demo with "Playdemo Name" and it should now work fine.

REMEMBER: Change the steam.ini file back to it's original or you might experience problems.
CB1993 is offline   Reply With Quote
Old 03-17-2010, 01:52 PM   #7
xyz
 
Guest
Posts: n/a
Thanks, really helpful stuff. (though the dark red text hurts my eyes)

rep5stars
  Reply With Quote
Old 03-17-2010, 01:54 PM   #8
The_Garden
 
Banned
Join Date: Oct 2009
Reputation: 155
Posts: 2,762
Quote:
Originally Posted by Xezium View Post
Sure, will when I get back from a sudden haircut appointment :|
shave your head, it's better. lol anyway you also forgot something here, at DEMO PLAYBACK:

"When you're done playing it back, use the........." what?
The_Garden is offline   Reply With Quote
Old 03-17-2010, 02:06 PM   #9
Tyrarl
 
Banned
Join Date: Jan 2009
Reputation: 471
Posts: 3,179
Thanks. I've been using a method already, but a refresher is always good. I'll give you some rep when my 24 hour timer is done >.>

Also, does it record your own in-game voice chat? My videos capture my team mates voices, but not mine.
Tyrarl is offline   Reply With Quote
Old 03-17-2010, 04:32 PM   #10
Xezium
 
 
 
Join Date: Dec 2008
Reputation: 1026
Posts: 4,536
Quote:
Originally Posted by CB1993 View Post
+rep, very useful information.

Here is something you may want to add, getting outdated demos to work. If your working on a film with your buds or something, and the the next day a new update comes out, your recorded demo won't work!

This is a copy and paste from here.

--------------

1) Start up l4d2, and try to play your demo into your console and type "Playdemo Name"


It should freeze for a second, press the console button again and click around until your menu returns.
Your console should now say something along the lines of:

ERROR: demo network protocol 2004 outdated, engine version is 2007. Failed to read demo header.

2) Now, close the game, and go to your Left4Dead 2 folder:
X:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2
and find a file named steam.ini and open it with notepad:

PatchVersion=2.0.0.7
ProductName=left4dead2
appID=550

You need to change that green number with the version number of the demo you're trying to play (from your console):

ERROR: demo network protocol 2004 outdated, engine version is 2007. Failed to read demo header.

PatchVersion=2.0.0.4

Save your changes, start up Left4Dead2 and again, play your demo with "Playdemo Name" and it should now work fine.

REMEMBER: Change the steam.ini file back to it's original or you might experience problems.
Added, thanks.
Quote:
Originally Posted by xyz View Post
Thanks, really helpful stuff. (though the dark red text hurts my eyes)

rep5stars
Thanks for the input. I have problems with colours. Try the ones that look good, don't hurt your eyes, yet aren't already used. asdasdkf. Let me know if any others are bad/out of place.
Quote:
Originally Posted by Tyrarl View Post
Thanks. I've been using a method already, but a refresher is always good. I'll give you some rep when my 24 hour timer is done >.>

Also, does it record your own in-game voice chat? My videos capture my team mates voices, but not mine.
it does if you run the command voice_loopback during the initial demo record. Added a little paragraph about this aswell.
Quote:
Originally Posted by The_Garden View Post
shave your head, it's better. lol anyway you also forgot something here, at DEMO PLAYBACK:

"When you're done playing it back, use the........." what?
Right. I forgot the command and forgot to go into L4D to confirm it. Added Also, my hair looks pretty sexy. For the record.
Xezium is offline   Reply With Quote
Old 03-17-2010, 04:33 PM   #11
Tyrarl
 
Banned
Join Date: Jan 2009
Reputation: 471
Posts: 3,179
Quote:
it does if you run the command voice_loopback during the initial demo record. Added a little paragraph about this aswell.
Thanks a bunch! Now my friend won't sound like he's talking to himself anymore >:3
Tyrarl is offline   Reply With Quote
Old 03-17-2010, 05:03 PM   #12
Boklau
 
Join Date: Oct 2009
Reputation: 24
Posts: 733
Sorry if this sounds noobish but how do you sticky? or bookmark?
Boklau is offline   Reply With Quote
Old 03-17-2010, 06:06 PM   #13
Xezium
 
 
 
Join Date: Dec 2008
Reputation: 1026
Posts: 4,536
Quote:
Originally Posted by Boklau View Post
Sorry if this sounds noobish but how do you sticky? or bookmark?
Bookmark as in, bookmark it to your internet favourites (depends on browser), you can also subscribe to threads under Thread Tools.
Xezium is offline   Reply With Quote
Old 03-17-2010, 06:08 PM   #14
FurryPride
 
Banned
Join Date: Mar 2010
Reputation: 6
Posts: 131
This should be a sticky.
FurryPride is offline   Reply With Quote
Old 03-17-2010, 06:39 PM   #15
Boklau
 
Join Date: Oct 2009
Reputation: 24
Posts: 733
Quote:
Originally Posted by Xezium View Post
Bookmark as in, bookmark it to your internet favourites (depends on browser), you can also subscribe to threads under Thread Tools.
Thanks!

+rep
Boklau is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Game Discussions > H - L > Left 4 Dead 2


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -7. The time now is 09:16 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2014, All Rights Reserved.