Difference between revisions of "Demo Video Creation"
(I added a note about how the AVI exporter is broken for files over 2 GB.) |
(Guys, look at this thread I found! http://www.facepunch.com/threads/1125358) |
||
Line 70: | Line 70: | ||
# Follow steps 1-4 above. | # Follow steps 1-4 above. | ||
− | # Enter <code>startmovie %videoname% | + | # Enter <code>startmovie %videoname% avi</code>. Please note the two appearances of "avi" - the first is just the extension of the file, but the second tells the Source engine to record to AVI. |
# At this time, your game will appear to freeze. If you're in full-screen mode, you'll have to Alt-Tab out of the program, then click back in to see the codec selection pop-up window. If you're in windowed mode, you should easily see the window. Choose your AVI codec here - DivX is good if you want to compress the video (archiving, uploading, etc.), whereas a lossless codec like Huffyuv is good if you're planning to edit the video and create a movie (or something similar). | # At this time, your game will appear to freeze. If you're in full-screen mode, you'll have to Alt-Tab out of the program, then click back in to see the codec selection pop-up window. If you're in windowed mode, you should easily see the window. Choose your AVI codec here - DivX is good if you want to compress the video (archiving, uploading, etc.), whereas a lossless codec like Huffyuv is good if you're planning to edit the video and create a movie (or something similar). | ||
# Once your codec is chosen, you can follow step 6 above to load a demo. | # Once your codec is chosen, you can follow step 6 above to load a demo. | ||
Line 77: | Line 77: | ||
{{note|This tool is currently broken for files over 2 GB.}} | {{note|This tool is currently broken for files over 2 GB.}} | ||
+ | |||
+ | === Export to MOV, new with Replay Update for Team Fortress 2 === | ||
+ | |||
+ | As of the Replay Update for Team Fortress 2, it is now possible to export to .MOV files. This however, requires QuickTime. | ||
+ | # Again, follow steps 1-4 above. | ||
+ | # Enter <code>starmovie %videoname% h264. | ||
+ | # Do ''almost'' the same way that you would with AVI. | ||
+ | |||
+ | === External links === | ||
+ | * [http://www.facepunch.com/threads/1125358 Thread talking about the MOV on Facepunch] | ||
[[Category:Technical]][[Category:Publicity & Publication]] | [[Category:Technical]][[Category:Publicity & Publication]] |
Revision as of 02:12, 18 September 2011
Once you've recorded your demo, it's likely you'll want to turn it into a video to share with others. Here's one way of doing that:
- Load your chosen Source engine game and open the console.
- Set your graphics settings to be what you want the video settings to be. E.g. if you want an 800x600 video, set your resolution to 800x600. Also set whatever graphical niceties you want - you don't need to worry about keeping something that gives you a good in-game framerate, but don't go too high or you might find the recording takes an eternity.
Warning: Be aware of hard disk space requirements for long videos. An 800x600 resolution generates approximately 1.5 megabytes for every frame. It's easy to chew through gigabytes very quickly and if you run out of hard disk space, Source will just crash to desktop.
- Enter
sv_cheats 1
, thenhost_framerate 30
into the console, where 30 is the framerate that you want your video to playback at (you might want something else).Note: Don't forget this step! If you do, your audio will likely not stay in sync with your picture.
- Choose a name for your video (it doesn't need to be the same name as the demo file), let's say you've chosen
%videoname%
. - Enter
startmovie %videoname%_
into the console. (The_
underscore on the end of your name is not essential, but useful for later steps.) - Enter
playdemo %demoname%
into the console, where%demoname%
is the name of the demo you want to record. - Sit back and grab a beer while it records your demo - it won't necessarily run in real-time. Depending on your machine and on the graphical settings you chose, it might take quite a while. When it's done, the game will return you to the console.
- Type
endmovie
into the console. - Quit the game and browse to the root folder of your mod or game (the one with the
gameinfo.txt
in it, e.g.Steam/SteamApps/%steamusername%/Half-Life 2/hl2
orSteam/SteamApps/SourceMods/metastasis
). - Here you will find numerous Targa files named
%videoname%%framenumber%.tga
and a Wave file named%videoname%.wav
. Now you need to take these frames and the audio and turn them into a complete video, using the external video creation application of your choice, be it VirtualDubMod (free, but poor UI) or Adobe Premiere or whatever.Note: It's at this step where the underscore at the end of the videoname becomes useful. If you've recorded two similarly named videos, e.g.
lewd_alyx_gmodscene1
andlewd_alyx_gmodscene2
, it can be difficult to tell when one ends and the other starts when you're just looking at a directory full of hundreds of files namedlewd_alyx_gmodscene%somerandomnumber%
.
Contents
Adobe Premiere
- Start a new project and set the project settings to match those you recorded the video in (frame size, pixel ratio, framerate).
- Import the audio (
File->Import...
and browse for%videoname%.wav
). - Import the set of frames by selecting the first frame of the video (
%videoname%0000.tga
) in the same Import window, and checking the "Numbered Stills" checkbox. - Drag the set of frames and the audio onto your timeline, and line them up at zero.
- Select
File->Export->Movie...
to save out your video. Remember to check and tweak the codec settings to get a balance between quality and filesize that you are happy with.
Adobe After Effects
- Create a new composition (
Composition>New composition...
orCTRL+N
) and set the composition settings to match those you recorded the video (frame size, pixel ratio, framerate). - In the
Project
window, rightclick and chooseImport>File...
. Choose your first frame from your screenshots, and checkTarga sequence
. ClickOK
. - To import your audiofile, rightlick in the
Project
window again, chooseImport>File
, and select your audiofile. ClickOK
. - Now drag your imported footage into the timeline.
- To render it, make sure your timeline is the active window, then go to
Composition>Create Movie...
, choose a filename, and clickSave
. A new window calledRenderqueue
will pop up. Check and tweak the codec settings to get a balance between quality and filesize that you are happy with. Then clickRender
.
Sony Vegas
- Open Sony Vegas, then go to
File>Properties
to set up your project-settings. These should be matching your frames you extracted.Field order
should beNone (progressive scan)
andDeinterlace mode
should beNone
. ClickOK
. - Now go to
File>Import>Media
. Browse to the Source game's working directory, such as "C:/Program Files/Valve/Steam/SteamApps/yourusername/Half-Life 2/hl2". - Select the first frame, such as %videoname%_0000.tga. Vegas will take a moment to scan all the frames it can find. Make sure
Open still image sequence
is checked, and the number of frames is correct in the textbox ofrange
. - Click
Open
. - A new window called
Properties
will show up. You can make some settings on your new clip, but leaving everything on default will doing fine. - Click
OK
to close theProperties
window. - You now have a new clip in your
Project Media
window. Drag'n'drop the new clip into your timeline. Now you can start editing it like a usual movieclip. - To add your soundfile, go to the
Explorer
window, and find your %videoname%_.wav file. Drag'n'drop your soundfile to your timeline, like you did it with your videoclip. - To render your movie, go to
File>Render As...
. To render it as DivX, or XviD, choose the filetype asVideo for Windows (*.avi)
, then clickCustom
. In the new Window make sure you've choosenBest
in theVideo rendering quality
field. In theVideo
tab, go toVideo Format
, and choose your preferred videocodec. Now go to theAudio
tab, and choose your preferred audiocodec. ClickingOK
will close the window. Now you can start the rendering by choosing a filename and clickingSave
.
VirtualDub
- Open VirtualDub, then go to
File>Open
. Browse to the Source game's working directory, such as "C:/Program Files/Valve/Steam/SteamApps/yourusername/Half-Life 2/hl2" - Open the first frame, such as %videoname%_0000.tga. VirtualDub will take a moment to load all the frames it can find.
- Go to
Video>Compression
, and choose a compression codec. If you have them, DivX and Xvid are recommended. Xvid generally results in a smaller quality loss, but DivX is smaller and is more popularly used. - Click
OK
. - Now go to
Audio>Wav File...
and select %videoname%_.wav. - Go again to the
Audio
menu and selectFull Processing Mode
. - Finally, go to
Audio>Compression
, and choose MPEG Layer 3. (more commonly known as MP3) Choose a compression level. (If you don't need audio for your clip, you can instead go toAudio>No Audio
) ClickOK
. - OPTIONAL: You can add a resize filter to your video so the resolution is brought down in the final video. To do this, go to
Video>Filters
, and clickAdd...
From the list of filters, selectresize
and clickOK
. In the two boxes given, enter the dimensions that you would like your final video to be. InFilter Mode
, selectBicubic
, and clickOK
. - Now that you have set up your video processing, go to
File>Save AVI...
and choose a save path. When you clickOK
, VirtualDub will process the TGAs into an AVI file. - OPTIONAL: If you are processing multiple images, check the box marked
Don't run this job now...
at the Save AVI dialog. Then, open your next initial frame and audio file. You do not need to change any settings, as they are kept during a session. Go back toSave AVI
, and check the check box again. You can continue doing this until you have all the AVIs qeued up to be processed. Then, pressF4
to go toJob Control
. Click theStart
button to process the videos one by one.
VirtualDubMod
- Open VirtualDubMod, then go to
File>Open
. Browse to the Source game's working directory, such as "C:/Program Files/Valve/Steam/SteamApps/yourusername/Half-Life 2/hl2" - Open the first frame, such as %videoname%_0000.tga. Make sure
Automatically load linked segments
is checked. VirtualDubMod will take a moment to load all the frames it can find. - Go to
Video>Compression
, and choose a compression codec. If you have them, DivX and Xvid are recommended. Xvid generally results in a smaller quality loss, but DivX is smaller and is more popularly used. - Click
OK
. - Now go to
Streams>Stream list
and clickAdd
. Open your %videoname%_.wav. Now rightclick on your new audiostream inAvailable streams
and chooseFull processing mode
. Rightclick on your audiostream again, and clickCompression
to choose your audiocodec. - Click
OK
to close theAvailable streams
window. - OPTIONAL: You can add a resize filter to your video so the resolution is brought down in the final video. To do this, go to
Video>Filters
, and clickAdd...
From the list of filters, selectresize
and clickOK
. In the two boxes given, enter the dimensions that you would like your final video to be. InFilter Mode
, selectBicubic
, and clickOK
. - Now that you have set up your video processing, go to
File>Save As...
and choose a save path. When you clickOK
, VirtualDub will process the TGAs into an AVI file. - OPTIONAL: If you are processing multiple images, check the box marked
Don't run this job now...
at the Save AVI dialog. Then, open your next initial frame and audio file. You do not need to change any settings, as they are kept during a session. Go back toSave AVI
, and check the check box again. You can continue doing this until you have all the AVIs qeued up to be processed. Then, pressF4
to go toJob Control
. Click theStart
button to process the videos one by one.
Exporting to AVI, currently broken. DON'T USE
The Source Engine can also export movies directly to the AVI format. Follow these steps:
- Follow steps 1-4 above.
- Enter
startmovie %videoname% avi
. Please note the two appearances of "avi" - the first is just the extension of the file, but the second tells the Source engine to record to AVI. - At this time, your game will appear to freeze. If you're in full-screen mode, you'll have to Alt-Tab out of the program, then click back in to see the codec selection pop-up window. If you're in windowed mode, you should easily see the window. Choose your AVI codec here - DivX is good if you want to compress the video (archiving, uploading, etc.), whereas a lossless codec like Huffyuv is good if you're planning to edit the video and create a movie (or something similar).
- Once your codec is chosen, you can follow step 6 above to load a demo.
- Follow steps 7 and 8 above.
- Once recording is done, browse to the directory mentioned in step 9 and you should find your
%videoname%.avi
file. That file contains both the video (compressed with your chosen codec) and the audio (in an uncompressed WAV format). If you'd like to use either the video or audio for other purposes, you can easily load this file into any video editor or utility, like VirtualDub.

Export to MOV, new with Replay Update for Team Fortress 2
As of the Replay Update for Team Fortress 2, it is now possible to export to .MOV files. This however, requires QuickTime.
- Again, follow steps 1-4 above.
- Enter
starmovie %videoname% h264.
- Do almost the same way that you would with AVI.
External links