CameraInput
class NatML.Recorders.Inputs.CameraInput
The CameraInput
simplifies the process of recording video from one or multiple game cameras.
The CameraInput
does not support recording Unity UI canvases that render using the Screen Space - Overlay
mode. This is a limitation of Unity Engine.
Creating the Camera Input
The camera input can be created with either a destination recorder or texture input:
With a Media Recorder
The camera input can be created with a recorder
which receives video frames from the game cameras
. There is a similar constructor which does not accept a clock
, for recorders which do not use timestamps:
With a Texture Input
The camera input can be created with a backing texture input
that receives video frames from the game cameras
. There is a similar constructor which does not accept a clock
, for recorders which do not use timestamps:
Inspecting Recording Cameras
The CameraInput
exposes the list of cameras that it was created to record video frames from.
Skipping Frames
The CameraInput
typically commits frames from the game camera(s) 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