Go Back   Steam Users' Forums > Steam Tool Discussions > Source SDK General Discussion

Reply
 
Thread Tools Display Modes
Old 09-17-2011, 04:06 PM   #1
WindPower
 
 
 
Join Date: May 2010
Reputation: 372
Posts: 190
Talking SrcDemoČ - Render smoother Source engine movies, faster.



SrcDemoČ is a successor to SrcDemo that aims to be much faster and a lot easier to use. SrcDemo was a proof of concept, this is a full-fledged tool to do the same job.

Obligatory screenshot:

What does it do?
SrcDemoČ lets you render smoother movies, faster.

Smoother, how?
By using frame blending. Frame-blending is not a new technique. It involves rendering a movie at a very high framerate, then blending those frames together into a lower framerate. This gives the final video a smoother feel.
However, these frame are quite large in file size, and if you want something very smooth, you would thus require a lot of disk space in order to store all those frames. This is where SrcDemoČ comes in.

Faster, how?
SrcDemoČ creates a virtual filesystem that sits within the game's directory. When the game tries to write image files to it, those images get caught before they get written to disk. Instead, they are kept in memory. After a sufficient amount of images has been caught, they are blended together, and one single frame is written to the disk, in another directory of your choice, in the image format of your choice.

This not only allows you to render movies a lot faster (since frames are not written to disk, and the disk is slow), but also smoother, because you can set the framerate as crazy-high as you want and the disk storage needed will not change!

Example movies:Disclaimer: Those were made with SrcDemo, not SrcDemoČ. However, both tools do exactly the same thing, only the latter does it much faster.

Installation:

Linux
There is a PKGBUILD available and an openSUSE build service entry. The openSUSE entry is unsupported as I am not the one taking care of it.

OS X
The OS X version only works on the command-line. It is downloadable here. It requires a working FUSE implementation (Fuse4x, OSXFUSE, or MacFUSE). To use, run the following command:

Code:
/Applications/SrcDemoČ.app/Contents/MacOS/srcdemo2 --srcdemo-cmd
Windows
SrcDemoČ comes with an automated installer, but relies on two external components. Here is everything you need:
How to use:
  • Download and install all of the above.
  • Open SrcDemoČ.
  • Select the folder in which you will tell the game to save frames. It must be empty. It is suggested to create a folder named "srcdemo" inside the game's folder, just for this purpose.
  • Select the folder in which you want the final, .png frames to be saved. This can be anywhere on your computer, including other partitions, but must not be the same folder as the previous one.
  • Select your recording parameters:
    • Final videos FPS: The framerate of the video you want to create in the end. Hint: If you want to upload it to YouTube, leave this as 30 fps.
    • Motion blur blend rate: The number of raw frames from the game that will be blended inside each final frame. This can be as high as you want, but going beyond 50 yields very little improvement.
    • Simulated shutter angle: Simulates the rotary disc shutter of cameras. Usual cameras have a 180-degrees shutter, which means that the film is exposed during 50% of the total frame time, and missing 50% of the action. Hint: Recommended values are from 180 (for a cinematic feel) to 360 (for butter-smooth-ness to a point that may be considered too much by some people). This has no impact on performance.
    • Effective recording FPS: This is not configurable; this is the framerate that you will have to tell the game to render at. It is the product of the final video framerate and the motion blur blend rate.
  • Press "Activate" and wait a few seconds. This will create the virtual filesystem in the folder you have selected at the beginning.
  • Open your game, run your graphics config, etc.
  • Type host_framerate n, where n is the number given as "Effective recording FPS" by the application.
  • Start the movie: startmovie srcdemo/someprefix_. Make sure that this will make the game output frames inside the folder you selected at the beginning, and don't forget to put a prefix, for your convenience.
  • Start the demo file or whatever you want so that frames are produced: playdemo somefile.
  • Grab popcorn.
  • When it is done, end the movie: endmovie. If you don't do this, the .wav file will be corrupt.
  • You should now have all the final frames (as .png files) in the folder you selected in the second step, as well as the .wav file.

Open-source
SrcDemoČ is fully open-source and distributed under the 2-Clause BSD License. The source code is available on Google Code.

Credits
  • Mythee, for the icon/logo artwork

I would love to see videos you can create with this tool! It would also be nice to tag videos you upload on YouTube with the tag "srcdemo2". Thanks!

If you're going to report a bug or ask for help in this thread, please provide a log file as created by SrcDemoČ's debug mode.

Last edited by WindPower: 06-06-2013 at 02:50 PM.
WindPower is offline  
Reply With Quote
Old 09-17-2011, 04:09 PM   #2
i-ghost
 
 
 
Join Date: Nov 2010
Reputation: 1796
Posts: 2,799
Didn't think you could outdo yourself, yet here we are.
i-ghost is offline   Reply With Quote
Old 09-17-2011, 04:48 PM   #3
Mangr0v3
 
 
 
Join Date: Sep 2008
Reputation: 4313
Posts: 13,598
Much better
Mangr0v3 is offline   Reply With Quote
Old 09-17-2011, 05:04 PM   #4
episoder
 
Join Date: Aug 2011
Reputation: 133
Posts: 2,069
ok. now do a program that does keep a number of the blendframes in memory and push that as a base for motion encoding into a good h264 encoder directly and on the fly and mux it into a mp4 container with atleast fast mp3 format encoding.

yes. I am picky. but that's the standard to achieve.
episoder is offline   Reply With Quote
Old 09-17-2011, 05:29 PM   #5
Game Zombie
 
Join Date: Mar 2011
Reputation: 6
Posts: 101
It just keeps giving me an error when I try to start it. Here's what it says in the log
Code:
Traceback (most recent call last):
  File "SrcDemo2.py", line 4, in <module>
  File "win32api.pyo", line 12, in <module>
  File "win32api.pyo", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.
Edit: Ok it starts up just fine when I use the .jar file but not the .exe

Last edited by Game Zombie: 09-17-2011 at 05:34 PM.
Game Zombie is offline   Reply With Quote
Old 09-17-2011, 05:42 PM   #6
WindPower
 
 
 
Join Date: May 2010
Reputation: 372
Posts: 190
Quote:
Originally Posted by Game Zombie View Post
It just keeps giving me an error when I try to start it. Here's what it says in the log
Code:
Traceback (most recent call last):
  File "SrcDemo2.py", line 4, in <module>
  File "win32api.pyo", line 12, in <module>
  File "win32api.pyo", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.
Edit: Ok it starts up just fine when I use the .jar file but not the .exe
Alright, I probably forgot to bundle a required .dll. Tell me if you can or cannot find these on your computer:
Code:
OLEAUT32.dll - C:\Windows\system32\OLEAUT32.dll
USER32.dll - C:\Windows\system32\USER32.dll
SHELL32.dll - C:\Windows\system32\SHELL32.dll
ole32.dll - C:\Windows\system32\ole32.dll
RPCRT4.dll - C:\Windows\system32\RPCRT4.dll
WSOCK32.dll - C:\Windows\system32\WSOCK32.dll
ADVAPI32.dll - C:\Windows\system32\ADVAPI32.dll
msvcrt.dll - C:\Windows\system32\msvcrt.dll
VERSION.dll - C:\Windows\system32\VERSION.dll
KERNEL32.dll - C:\Windows\system32\KERNEL32.dll
SETUPAPI.dll - C:\Windows\system32\SETUPAPI.dll
KERNELBASE.dll - C:\Windows\system32\KERNELBASE.dll
ntdll.dll - C:\Windows\system32\ntdll.dll
WindPower is offline   Reply With Quote
Old 09-17-2011, 05:52 PM   #7
Game Zombie
 
Join Date: Mar 2011
Reputation: 6
Posts: 101
I can find all of those except for kernelbase.dll

Last edited by Game Zombie: 09-17-2011 at 06:20 PM.
Game Zombie is offline   Reply With Quote
Old 09-17-2011, 05:53 PM   #8
Mangr0v3
 
 
 
Join Date: Sep 2008
Reputation: 4313
Posts: 13,598
What version of Windows are you running?
Mangr0v3 is offline   Reply With Quote
Old 09-17-2011, 06:16 PM   #9
Game Zombie
 
Join Date: Mar 2011
Reputation: 6
Posts: 101
Vista Home Premium 64 bit
Game Zombie is offline   Reply With Quote
Old 09-17-2011, 06:20 PM   #10
Mangr0v3
 
 
 
Join Date: Sep 2008
Reputation: 4313
Posts: 13,598
I don't have that on my Vista system either. New in Windows 7?
Mangr0v3 is offline   Reply With Quote
Old 09-17-2011, 06:29 PM   #11
WindPower
 
 
 
Join Date: May 2010
Reputation: 372
Posts: 190
Yes, I remember I encountered the same packaging problem with DamnVid; my executables built on Windows 7 required that DLL that is not available in earlier versions. I'll just repackage it under Windows XP and upload the new build, which shouldn't have the kernelbase.dll dependency.

Edit: Alright, try redownloading it now and it should work.

Last edited by WindPower: 09-17-2011 at 06:56 PM.
WindPower is offline   Reply With Quote
Old 09-18-2011, 01:01 AM   #12
Game Zombie
 
Join Date: Mar 2011
Reputation: 6
Posts: 101
Another example if you want one
http://www.youtube.com/watch?v=hCtq6UPZ93Q
Blendrat: 32
Shutter Angle: 180
Game Zombie is offline   Reply With Quote
Old 09-18-2011, 03:40 PM   #13
WindPower
 
 
 
Join Date: May 2010
Reputation: 372
Posts: 190
Smile

Quote:
Originally Posted by Game Zombie View Post
Another example if you want one
http://www.youtube.com/watch?v=hCtq6UPZ93Q
Blendrat: 32
Shutter Angle: 180
Glad to see it's working
WindPower is offline   Reply With Quote
Old 09-19-2011, 08:49 AM   #14
IBeMad
 
 
 
Join Date: Jan 2011
Reputation: 1
Posts: 116
I seem to be having some issues... as I'm recording (I'm blending 32 frames, a la Source Film Maker) your program uses more and more cpu until it's using a continuous 25% (I have a quad core cpu). After that, the source game I'm trying to record (tried both portal 2 and alien swarm) will freeze for a bit, then it will give an error in the console about not being able to write a certain frame, and will stop the recording. Any help?
IBeMad is offline   Reply With Quote
Old 09-19-2011, 05:31 PM   #15
WindPower
 
 
 
Join Date: May 2010
Reputation: 372
Posts: 190
Quote:
Originally Posted by IBeMad View Post
I seem to be having some issues... as I'm recording (I'm blending 32 frames, a la Source Film Maker) your program uses more and more cpu until it's using a continuous 25% (I have a quad core cpu). After that, the source game I'm trying to record (tried both portal 2 and alien swarm) will freeze for a bit, then it will give an error in the console about not being able to write a certain frame, and will stop the recording. Any help?
I can think of a few possible problems:
  • The disk that hosts the folder you've selected as output folder may be write-protected or very slow or something of the kind, leaving the program dry trying to write there
  • You may have already started a movie, recorded something, then forgot to call endmovie, then recorded something else. The first call to startmovie would then stay open, which means that the first frame of the second recording would not be numbered #0, which would cause SrcDemo to hang up trying to wait for frame #0 to come in (since it expects them to arrive from 0). So make sure you remember to call endmovie.

Other than that, there's little I can guess. Does the problem also happen in TF2? What resolution do you run the game at (how big are the frames)? Also, try running the program through the Windows command line. Open a command prompt, then type:
Code:
cd "C:\Path\To\SrcDemo2\Install\Folder"
"C:\Path\to\Java\jre\bin\java.exe" -jar SrcDemo2.jar
And see if the console says anything while the program runs.
WindPower is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Tool Discussions > Source SDK General Discussion


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 On
HTML code is Off



All times are GMT -7. The time now is 08:45 PM.


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