at
suspend fun at(item: MediaItem, positions: List<Duration>, maxWidth: Int = 320, format: SnapshotFormat = SnapshotFormat.Jpeg): List<Thumbnail>
One image per position, scaled to at most maxWidth wide with the aspect kept, encoded in format. Opens the item once and closes it before returning. Positions are keyframe-snapped the way frame extraction works: the frame at or first after the position, fast rather than exact. A hardware-decoded frame is downloaded first; the scale runs once per call on a graph built from the first frame's geometry. The work runs off the caller's thread, and a cancel takes effect between two positions.
Throws
for an item with no video stream, or a maxWidth below one
io.github.yuroyami.kiteffmpeg.FFmpegException
when the open, a seek or a decode fails