still

suspend fun FrameRenderer.still(composition: EditComposition, at: Duration, to: MediaSink, spec: StillSpec = StillSpec()): StillResult(source)

Renders one frame of a composition and writes it as a still image.

FrameRenderer.frame is asked for the frame at StillSpec.heightPx, so the still is decoded at the size it is written at rather than at full resolution and shrunk. The frame is closed before this returns.

Delivery follows the target. Android, Apple and the JVM write a file, and a MediaSink.Temporary comes back as the MediaSink.Path it resolved to. A browser has no filesystem, so a MediaSink.Uri hands back a blob: URL that the caller owns and has to revoke, and a MediaSink.Path or MediaSink.Temporary starts a download under that name.

Return

Where the still ended up, or why it did not get there.

Parameters

composition

The edit to render from.

at

Where in the composition to render.

to

Where to put the still.

spec

What the encoded still should look like.


suspend fun FrameRenderer.still(source: MediaSource, at: Duration, to: MediaSink, spec: StillSpec = StillSpec()): StillResult(source)

Encodes one frame of a single source as a still image, with no composition to build by hand.

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

Return

Where the still ended up, or why it did not get there.

Parameters

source

The media to render from.

at

Where in source to render.

to

Where to put the still.

spec

What the encoded still should look like.