The OpenD Programming Language

PixmapRecorder

Video file encoder

Feed in video data frame by frame to encode video files in one of the various formats supported by FFmpeg.

This is a convenience wrapper for piping pixmaps into FFmpeg. FFmpeg will render an actual video file from the frame data. This uses the CLI version of FFmpeg, no linking is required.

Constructors

this
this(double frameRate, File output, string outputFormat, File log, string ffmpegExecutablePath)

Prepares a recorder for encoding a video file into the provided pipe.

this
this(double frameRate, string outputPath, File log, string outputFormat, string ffmpegExecutablePath)

Prepares a recorder for encoding a video file saved to the specified path.

Members

Aliases

isRecording
alias isRecording = isOpen

Determines whether the recorder is active (which implies that an output file is open).

record
alias record = put

Supplies the next frame to the video encoder.

startRecording
alias startRecording = close

Starts the video encoding process. Launches FFmpeg.

stopRecording
alias stopRecording = close

Ends the recording process.

Functions

advancedFFmpegAdditionalOutputArgs
void advancedFFmpegAdditionalOutputArgs(string[] args)

Advanced users only: Additional command-line arguments to be passed to FFmpeg.

close
int close()

Ends the recording process.

isOpen
bool isOpen()

Determines whether the recorder is active (which implies that an output file is open).

open
void open(Size resolution)

Starts the video encoding process. Launches FFmpeg.

put
void put(Pixmap frame)

Supplies the next frame to the video encoder.

Meta