reckfellENGINE

MovieWriter

An interface for recording rendered project frames and audio.

On this page
class MovieWriterReckfellSharpInherits ReckfellObject

MovieWriter serves Movie Maker: fixed simulation timing and recording project images and audio. It does not capture the desktop and is not an ordinary gameplay recorder. Select recording before running the project through editor settings or --write-movie.

The tested editor build writes OGV (Theora/Vorbis), AVI (MJPEG/PCM), and a PNG sequence with a separate PCM WAV. Duration follows frame count and FPS. A working graphics renderer is required; --headless with the dummy renderer cannot supply these frames. Quit normally so the container and indices are finalized. Format availability depends on the modules in a particular build.

Working example.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

MovieWriterConstructor
# MovieWriter
C#
public MovieWriter();

Methods7

AddWritervoid
# AddWriter
C#
public static void AddWriter(MovieWriter writer);

Adds a writer to be usable by the engine. The supported file extensions can be set by overriding MovieWriter._HandlesFile. Note: MovieWriter.AddWriter must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine.

Parameters
NameTypeDefault
writerMovieWriter—
_GetAudioMixRateuint
# _GetAudioMixRate
C#
public virtual uint _GetAudioMixRate();

Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if MovieWriter._GetAudioMixRate is not overridden.

Returns uint
_GetAudioSpeakerModeAudioServer.SpeakerMode
# _GetAudioSpeakerMode
C#
public virtual AudioServer.SpeakerMode _GetAudioSpeakerMode();

Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to AudioServer.SpeakerMode.ModeStereo if MovieWriter._GetAudioSpeakerMode is not overridden.

Returns AudioServer.SpeakerMode
_GetSupportedExtensionsstring[]
# _GetSupportedExtensions
C#
public virtual string[] _GetSupportedExtensions();

Returns the list of supported filename extensions for movies written with this MovieWriter.

Returns string[]
_HandlesFilebool
# _HandlesFile
C#
public virtual bool _HandlesFile(string path);

Called when the engine determines whether this MovieWriter is able to handle the file at path. Must return true if this MovieWriter is able to handle the given file path, false otherwise. Typically, MovieWriter._HandlesFile is overridden as follows to allow the user to record a file at any path with a given file extension:

Parameters
NameTypeDefault
pathstring—
Returns bool
_WriteBeginError
# _WriteBegin
C#
public virtual Error _WriteBegin(Vector2I movieSize, uint fps, string basePath);

Called once before recording. movieSize is the output frame size in pixels, fps is the frame rate, and basePath is the selected path. Return Error.Ok after successfully opening resources. Validate dimensions, directory access and your format's limits.

Parameters
NameTypeDefault
movieSizeVector2I—
fpsuint—
basePathstring—
Returns Error
_WriteEndvoid
# _WriteEnd
C#
public virtual void _WriteEnd();

Called when recording ends normally. Implementations must close files and finalize container data, indices and sizes. Forcefully terminating the process does not guarantee this callback; use normal closure or EntityTree.Quit().

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.