IVideoWriter/AddFrame

From Garry's Mod
Jump to: navigation, search
 IVideoWriter:AddFrame( )

Contents

Description

Adds the current framebuffer to the video stream.

Arguments

number frameTime

Usually set to what FrameTime is, or simply 1/fps.

Arguments

boolean downsample

If true it will downsample the whole screenspace to the videos width and height, otherwise it will just record from the top left corner to the given width and height and therefor not the whole screen.

Examples

Example

If ActiveVideo was a IVideoWriter, it would record the screen every frame.

--Taken from /lua/menu/video.lua

hook.Add( "DrawOverlay", "CaptureFrames", function()

	if ( !ActiveVideo ) then return end
	
	ActiveVideo:AddFrame( FrameTime(), true );

end )


Personal tools
Navigation