Forcing a framerate

Is there a way to get unity to force a specified framerate? An in-game menu would be preferable, but just one in the editor would be fine. I’d like to give the end-user the ability to make videos of their recorded demo’s, but at a constant framerate. I’d also like to use it for recording longer videos for a machinima, to build a little hype for the game’s release.

Someone brought this script to my attention: http://wiki.unity3d.com/index.php?title=ScreenShotMovie

However, that seems to only put out png image files, which would fill up my hard drive before I’m done recording any single part of the machinima. So, I’d like to output directly to video, if possible.

The link you posted already contains the answer. The most important parameter here is Time.captureFramerate.

Unless you find some mechanism and/or codec to actually encode a video on-the-fly, I guess you’re out of luck and need to rely on dumping the rendered frames to disk first. Even if you don’t, you would need to store some amount of rendered frames, before you can encode them bit by bit into a video stream.

And unless you have an extremely old and/or small hard disk, there is no danger of running out of disk space. PNGs are compressed quite effectively, especially for computer generated images. Even when outputting to 720p HD, they will usually have sizes around 300kB-1.5MB, which means about 10-60 Minutes of footage per GB. If your disk is already full - well, clean up or buy a new one :wink: