frame

suspend fun FrameRenderer.frame(source: MediaSource, at: Duration, heightPx: Int? = null): FrameResult(source)

Renders one frame of a single source, with no composition to build by hand.

Shorthand for the composition-taking FrameRenderer.frame, over a single-clip composition built from source. Reach for that form directly for anything bigger than one clip.

Return

The frame, which the caller owns and must close, or why it could not be produced.

Parameters

source

The media to render from.

at

Where in source to render.

heightPx

The height to render at, in pixels. Null renders at the source's own height, and a height of zero or less fails with FilmstripError.InvalidComposition.