本文へ移動
cccskills
無料GitHub で公開

byted-byteplus-vod-frame-extraction

Upload video/audio media to BytePlus VOD (Video on Demand) storage, returning the Vid and playback references; supports local file upload (ApplyUploadInfo + TOS + CommitUploadInfo) and URL pull upload (UploadMediaByUrl); also submits frame extraction jobs on ingested media (StartExecution / Operation.Task.Snapshot), including specified time, fixed interval, specified frame, scene-change, sprite image, and output index modes. Trigger keywords: VOD frame extraction, frame extraction, extract frames, video snapshot, thumbnail, screenshot from video, StartExecution Snapshot.

インストール方法を見る

含まれるファイル(10)

  • SKILL.md9.0 KB
  • LICENSE9.9 KB
  • references/snapshot.md4.1 KB
  • scripts/env.md319 B
  • scripts/poll_execution.py1.3 KB
  • scripts/pyproject.toml228 B
  • scripts/snapshot.py14.2 KB
  • scripts/tos_upload.py14.0 KB
  • scripts/upload.py12.3 KB
  • scripts/vod_client.py23.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

VOD frame extraction

Uploads video/audio to a BytePlus VOD space (from a local file or a public URL) and returns a vid://... reference. For media already in VOD, submits Snapshot tasks (StartExecution -> Operation.Task.Type: Snapshot) for frame extraction.


Product scope

AspectBehaviour
InputVid or DirectUrl (JSON field video)
Extraction strategyDefault: specified time at 0 ms. Supported: specified time, fixed interval, specified frames, scene-change detection.
Target image sizeDefault resolution: 720p because the API Snapshot Target requires a resolution. Optional scale_long / scale_short.
Sprite imageOptional sprite / sprite_config.
Output index modeOptional output_mode: Files or Index.
Advanced API fieldsUse snapshot for complete passthrough or snapshot_options to deep-merge extra fields into generated Snapshot.

If the user does not specify a strategy, use specified time at 0 ms. If they ask for multiple thumbnails but do not provide times, ask for the timestamps or use fixed interval only when they explicitly request evenly-spaced extraction.


Prerequisites

  • Environment variables (required; optionally place a .env in the working directory — scripts load it automatically):
    • BYTEPLUS_ACCESSKEY — BytePlus Access Key
    • BYTEPLUS_SECRETKEY — BytePlus Secret Key
    • VOD_SPACE_NAME — VOD space name
  • Environment template: see scripts/env.md.
  • Execution: examples use uv run python ... (python scripts/... works if deps are installed).

Workflow overview

Upload pipeline (local file):
  [S1_APPLY]  ApplyUploadInfo -> TOS upload address + SessionKey
  [S2_TOS]    PUT file to TOS (direct or chunked)
  [S3_COMMIT] CommitUploadInfo -> Vid
  Output: { Vid, Source, PlayURL, FileName, SpaceName, SourceUrl }

Upload pipeline (URL):
  [S1_UPLOAD] Submit URL upload job (UploadMediaByUrl) -> JobId
  [S2_POLL]   Poll QueryUploadTaskInfo -> Vid
  Output: { Vid, Source, PlayURL, FileName, SpaceName, SourceUrl, JobId }

Snapshot pipeline:
  [S3_SNAPSHOT] Submit frame extraction task (StartExecution / Task.Type Snapshot) -> RunId
  [S4_POLL]     Poll GetExecution -> output snapshot files / raw Snapshot output
  Output: { Status, SpaceName, ImageUrls[], Snapshot }

Quick self-check

Before running any script:

  • .env or env vars contain BYTEPLUS_ACCESSKEY, BYTEPLUS_SECRETKEY, and VOD_SPACE_NAME.

Pick the pipeline from user intent:

User intentPipelineEntry script
Upload video to VODUploadscripts/upload.py
Extract frames / thumbnailsFrame extractionscripts/snapshot.py

S1_UPLOAD & S2_POLL: upload and obtain Vid

Run from the Skill root directory (byted-byteplus-vod-frame-extraction/):

uv run python scripts/upload.py "/path/to/video.mp4" [space_name]
uv run python scripts/upload.py "https://example.com/video.mp4" [space_name]
  • First argument: local file path or public http:// / https:// URL.
  • Second argument (optional): space name; if omitted, VOD_SPACE_NAME is used.
  • Paths and URLs must include a file extension.

On success, preserve Source (vid://...) for downstream processing.


S3_SNAPSHOT & S4_POLL: frame extraction

Run from the Skill root directory (byted-byteplus-vod-frame-extraction/):

# Default: first frame at 0 ms, 720p
uv run python scripts/snapshot.py '{"type":"Vid","video":"v0310abc"}'

# Three exact timestamps in milliseconds
uv run python scripts/snapshot.py '{"type":"Vid","video":"vid://v0d225gxxx","strategy":"specified_time","times":[0,5000,10000],"resolution":"720p"}' production_space

# Every 3 seconds
uv run python scripts/snapshot.py '{"type":"Vid","video":"v0310abc","strategy":"interval","interval_ms":3000}'

# Scene-change snapshots
uv run python scripts/snapshot.py '{"type":"Vid","video":"v0310abc","strategy":"scene_change","threshold":0.1}'

uv run python scripts/snapshot.py @params.json

# Resume after timeout
uv run python scripts/poll_execution.py '<RunId>' [space_name]

Parameter reference

ParameterTypeRequiredDescription
typestringnoVid or DirectUrl. Default Vid.
videostringyesVid or VOD FileName; vid:// / directurl:// prefixes are stripped automatically.
strategystring/objectnospecified_time, interval, specified_frames, or scene_change. Default specified_time. If object, used directly as API Strategy.
timesinteger/arraynoMillisecond offsets for specified_time. Default [0].
interval_msintegerfor intervalMillisecond interval for fixed interval snapshots.
framesinteger arrayfor specified framesFrame indexes for specified_frames; 0 means first frame and -1 means last frame.
thresholdfloatnoScene-change threshold in [0, 1], default 0.1.
resolutionstringnoDefault 720p. Allowed: 240p, 360p, 480p, 720p, 1080p.
scale_long / scale_shortintegernoLong/short output image edge, [0, 4096].
sprite / sprite_configboolean/objectnoSprite image config. Object is passed directly as SpriteConfig.
output_modestringnoFiles or Index, maps to IndexOption.Mode.
snapshotobjectnoComplete API Snapshot object passthrough.
snapshot_optionsobjectnoAdvanced fields deep-merged into generated Snapshot.

Agent prompting

Ask for timestamps, interval, frame numbers, or scene-change detection only when the user's intent is ambiguous. Use conversational wording: “which frames or timestamps should I extract?” rather than raw API field names. If the user asks for a simple cover/thumbnail, use the default first-frame snapshot.

Output format

On success, one JSON object is printed to stdout:

{
  "Status": "Success",
  "SpaceName": "my_space",
  "ImageUrls": [
    {
      "FileId": "...",
      "Vid": "",
      "DirectUrl": "path/to/snapshot.jpg",
      "Source": "directurl://path/to/snapshot.jpg",
      "Url": "https://example.cdn.com/...",
      "Raw": {}
    }
  ],
  "VideoUrls": [],
  "AudioUrls": [],
  "Texts": [],
  "Snapshot": {}
}
  • ImageUrls[].Url: playable / downloadable when signing succeeds for the space.
  • Snapshot: raw API output from Output.Task.Snapshot.

Timeout handling

{
  "error": "Polling timed out (360 attempts × 5s); the job is still processing",
  "resume_hint": {
    "description": "The job has not finished yet; resume polling with the command below",
    "command": "uv run python scripts/poll_execution.py '<RunId>' [space_name]"
  }
}

Environment variables

NameDescriptionRequired
BYTEPLUS_ACCESSKEYBytePlus Access KeyYes
BYTEPLUS_SECRETKEYBytePlus Secret KeyYes
VOD_SPACE_NAMEVOD space nameYes (or via CLI argument)
VOD_POLL_INTERVALPolling interval (seconds, default 5)No
VOD_POLL_MAXMaximum polling attempts (default 360)No
VOD_URL_EXPIRE_MINUTESSigned URL expiry (minutes, default 60)No
VOD_PLAY_DOMAINForce a specific playback domain (optional, highest priority)No
VOD_HOSTOverride VOD OpenAPI hostname (optional)No
TOS_UPLOAD_CONNECT_TIMEOUTTOS upload connect timeout in seconds (default 5)No
TOS_UPLOAD_READ_TIMEOUTTOS upload read timeout in seconds (default 600)No

References

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Deploy, update, validate, and troubleshoot the AgentKit hybrid-cloud customer-service demo in this directory. Use when a user asks an AI coding agent to follow the README, deploy or update the demo, configure OpenAPI/Runtime/Knowledge/Memory/Sandbox/MCP/Skills/A2A, run customer-view validation, or record manual platform steps and failures.

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月9日 更新

Generate deterministic SVG algorithmic artwork. Invoke when the user asks for geometric, generative, or algorithmic visual art.

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月9日 更新

通过本地 Python CLI 和 OpenAPI 客户端管理、排查火山云手机资源。适用于查询实例和资源、截图、执行命令、查看任务、检查应用、主机和机房容量、标签、DNS、路由,以及操作已授权的测试云手机实例。

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月9日 更新

Launch and continue the Volcengine AI Research survey workflow for concept testing, audience design, questionnaire drafting, interview guide generation, execution confirmation, progress checks, and result queries. Use this skill when the user wants to create, revise, confirm, execute, or follow up on a real AI research survey task in ABCompass instead of doing generic brainstorming, copywriting, translation, summarization, or broad market discussion.

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月9日 更新

Create and check long-running video material evaluation tasks. Use this skill when the user wants to submit videos for evaluation, check an existing video evaluation task list, or fetch the result of a previously created video evaluation task. This skill is not a general-purpose video upload skill because upload is allowed only as an internal step of task creation. Authentication uses an API key passed as an Authorization bearer token.

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月9日 更新

火山引擎 AntiDDoSPro 高防域名只读巡检。用户要查域名健康、攻击、流量、CC/WAF/区域封禁、智能防护或 CCAI 状态时使用。

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月9日 更新

bytedance のスキルをすべて見る

このスキルの問題を報告する