Skip to content

cf_video_encoder_add_frame

Category: video
GitHub: cute_video.h


Compresses one frame.

CF_Result cf_video_encoder_add_frame(CF_VideoEncoder* encoder, CF_Image frame);
Parameters Description
encoder The encoder.
frame The picture, sized exactly as the encoder was created with.

Return Value

Returns any error that stopped the frame being added.

Remarks

Frames go in the order they should play. The alpha channel is discarded -- H.264 has nowhere to put it. This is the expensive call in this API: it runs a motion search over the whole picture, so it is not something to do inside a frame budget. To record what the game itself draws, cf_video_encoder_update is the short way.

CF_VideoEncoder
cf_video_encoder_update
cf_video_encoder_save
cf_video_encoder_set_quality