AS AgentScopeAPI 手册 / API Reference

VideoBlock

@JsonInclude(JsonInclude.Include.NON_NULL) public final class VideoBlock extends ContentBlock
源码Source io/agentscope/core/message/VideoBlock.java:35–239

表示视频内容 in 消息。位于 io.agentscope.core.message 包,继承自 ContentBlock。核心成员包括 getSource、getFps、getMaxFrames、getMinPixels、getMaxPixels、getTotalPixels。

Represents video content in a message.

This content block supports video from two sources:

  • URL source - video files accessible via HTTP/HTTPS URLs or local file URLs

  • Base64 source - video encoded as Base64 strings with MIME type

Video blocks enable advanced multimodal AI interactions where agents need to process or analyze video content such as presentations, tutorials, surveillance footage, or other visual media that includes motion and temporal elements.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Builder类class
构建器,用于构建并配置目标实例。
Builder for constructing VideoBlock instances.

构造器摘要Constructor Summary

构造器Constructor说明Description
public VideoBlock(Source source)
创建新的视频块使用来源。
Creates a new video block with source.

方法摘要Method Summary

方法Method说明Description
public Source getSource()
获取来源的此视频内容。
Gets the source of this video content.
public Float getFps()
获取 `getFps`。
Gets the frames per second (FPS) of the video.
public Integer getMaxFrames()
获取 `getMaxFrames`。
Gets the maximum number of frames to capture from the video.
public Integer getMinPixels()
获取 `getMinPixels`。
Gets the minimum pixel threshold for input video frames.
public Integer getMaxPixels()
获取 `getMaxPixels`。
Gets the maximum pixel threshold for input video frames.
public Integer getTotalPixels()
获取 `getTotalPixels`。
Gets the total pixels of all frames extracted from the video (single image pixels × total frames).
public static Builder builder()
static
返回构建器实例。
Creates a new builder for constructing VideoBlock instances.

构造器详情Constructor Detail

VideoBlock

public VideoBlock(Source source)

创建新的视频块使用来源。

Creates a new video block with source.

参数Parameters
名称Name类型Type说明Description
sourceSource视频来源(URL 或 Base64)。The video source (URL or Base64)
源码Source io/agentscope/core/message/VideoBlock.java:55–57

方法详情Method Detail

getSource

public Source getSource()

获取来源的此视频内容。

Gets the source of this video content.

返回Returns Source
返回来源。The video source containing URL or Base64 data
源码Source io/agentscope/core/message/VideoBlock.java:90–92

getFps

public Float getFps()

获取 getFps。

Gets the frames per second (FPS) of the video.

返回Returns Float
返回数值结果。The frames per second value
源码Source io/agentscope/core/message/VideoBlock.java:99–101

getMaxFrames

public Integer getMaxFrames()

获取 getMaxFrames。

Gets the maximum number of frames to capture from the video.

返回Returns Integer
返回数值结果。The maximum number of frames
源码Source io/agentscope/core/message/VideoBlock.java:108–110

getMinPixels

public Integer getMinPixels()

获取 getMinPixels。

Gets the minimum pixel threshold for input video frames.

返回Returns Integer
返回数值结果。The minimum pixel threshold
源码Source io/agentscope/core/message/VideoBlock.java:117–119

getMaxPixels

public Integer getMaxPixels()

获取 getMaxPixels。

Gets the maximum pixel threshold for input video frames.

返回Returns Integer
返回数值结果。The maximum pixel threshold
源码Source io/agentscope/core/message/VideoBlock.java:126–128

getTotalPixels

public Integer getTotalPixels()

获取 getTotalPixels。

Gets the total pixels of all frames extracted from the video (single image pixels × total frames).

返回Returns Integer
返回数值结果。The total pixels
源码Source io/agentscope/core/message/VideoBlock.java:134–136

builder

public static Builder builder()
static

返回构建器实例。

Creates a new builder for constructing VideoBlock instances.

返回Returns Builder
一种新的构建器实例。A new builder instance
源码Source io/agentscope/core/message/VideoBlock.java:143–145

嵌套类详情Nested Class Detail

Builder

public static class Builder

构建器,用于构建并配置目标实例。位于 io.agentscope.core.message 包。核心成员包括 source、fps、maxFrames、minPixels、maxPixels、totalPixels。

Builder for constructing VideoBlock instances.

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.