ScreenInput
class NatML.Recorders.Inputs.ScreenInput
The ScreenInput
class simplifies the process of recording video from the screen. Unlike the CameraInput
, the screen input grabs whatever is on screen without the ability to selectively include or exclude objects from being recorded.
The ScreenInput
typically provides better recording performance than the CameraInput
because it does not need to re-render the scene.
Creating the Screen Input
The camera input can be created with either a destination recorder or texture input:
With a Media Recorder
The screen input can be created with a recorder
which receives video frames captured from the screen.
With a Texture Input
The screen input can be created with a texture input
which receives video frames captured from the screen.
Skipping Frames
The ScreenInput
typically commits frames from the screen on every Unity update. You can reduce this frequency by increasing the frameSkip
property. This is especially useful for creating animated GIF images which typically have a low frame rate look. It can also provide performance increases in GPU-bound applications.
Disposing the Input
When you choose to stop recording, simply dispose the recorder input. You will typically do this before calling FinishWriting
on the recorder.
Last updated