extractFrame

expect suspend fun extractFrame(atMicros: Long, stream: StreamInfo? = null): Frame

Decode and return the frame at (or first after) atMicros. Use this to extract a thumbnail. It seeks to the preceding keyframe and decodes forward to the exact target. Pair with Frame.encodeImage for jpg/png bytes.

Return

an owned frame: hold it as long as you like, then close it

Parameters

atMicros

where to read, relative to the start of the content (see startTimeMicros)

stream

which stream to read; default = primary video

Throws

when the seek or decode fails

actual suspend fun extractFrame(atMicros: Long, stream: StreamInfo?): Frame

Decode and return the frame at (or first after) atMicros. Use this to extract a thumbnail. It seeks to the preceding keyframe and decodes forward to the exact target. Pair with Frame.encodeImage for jpg/png bytes.

Return

an owned frame: hold it as long as you like, then close it

Parameters

atMicros

where to read, relative to the start of the content (see startTimeMicros)

stream

which stream to read; default = primary video

Throws

when the seek or decode fails

actual suspend fun extractFrame(atMicros: Long, stream: StreamInfo?): Frame

Decode and return the frame at (or first after) atMicros. Use this to extract a thumbnail. It seeks to the preceding keyframe and decodes forward to the exact target. Pair with Frame.encodeImage for jpg/png bytes.

Return

an owned frame: hold it as long as you like, then close it

Parameters

atMicros

where to read, relative to the start of the content (see startTimeMicros)

stream

which stream to read; default = primary video

Throws

when the seek or decode fails

actual suspend fun extractFrame(atMicros: Long, stream: StreamInfo?): Frame

Decode and return the frame at (or first after) atMicros. Use this to extract a thumbnail. It seeks to the preceding keyframe and decodes forward to the exact target. Pair with Frame.encodeImage for jpg/png bytes.

Return

an owned frame: hold it as long as you like, then close it

Parameters

atMicros

where to read, relative to the start of the content (see startTimeMicros)

stream

which stream to read; default = primary video

Throws

when the seek or decode fails

actual suspend fun extractFrame(atMicros: Long, stream: StreamInfo?): Frame

Decode and return the frame at (or first after) atMicros. Use this to extract a thumbnail. It seeks to the preceding keyframe and decodes forward to the exact target. Pair with Frame.encodeImage for jpg/png bytes.

Return

an owned frame: hold it as long as you like, then close it

Parameters

atMicros

where to read, relative to the start of the content (see startTimeMicros)

stream

which stream to read; default = primary video

Throws

when the seek or decode fails