Function sampleVideo

Sample a video for native video input: { type: 'video', data: await sampleVideo(file) }. The model gets the frames in its own video layout, for example Qwen3-VL merges each 2 frames.

The model must support video input, see supportInputModality('video'). The result holds raw RGB frames, so its size is width * height * 3 bytes per frame.

This function has the same limits as sampleVideoFrames().

  • Parameters

    Returns Promise<ArrayBuffer>

    Data for a content part of type "video"