Byted Byteplus Vod Precision Erasure
v0上传 video/audio media to BytePlus VOD (Video on Demand) storage, returning the Vid and playback references; supports local file 上传 (应用ly上传信息 + TOS + Commit上传信息) and URL pull 上传 (上传MediaByUrl); also submits precision erasure jobs on ingested media (启动Execution / Operation.Task.Erase): Auto OCR only — default subtitle-only erasure, optional full on-screen text, optional EraseOption 命令行工具p过滤器 (skip/selected); NewVid is always true; optional WithErase信息. Trigger keywords: precision erasure, precise erase, VOD 上传, subtitle removal, OCR subtitles, 移除 on-screen text, erase text, 启动Execution Erase.
运行时依赖
安装命令
点击复制技能文档
VOD precision erasure
上传s 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 precision erasure tasks (启动Execution → Operation.Task.Type: Erase) using automatic OCR only. Do not tell end users they can change erasure mode between Manual and Auto — this 技能 always 发送s Auto. NewVid is always true (not surfaced as a user choice).
Product scope Aspect Behaviour 输入 Vid or DirectUrl (JSON field video) Erasure coverage Default subtitle only (Auto.Type: Subtitle, Subtitle过滤器: {}). User may opt into all 检测ed on-screen text via text: true or all_text: true → Auto.Type: Text. Timeline Default: whole video (no 命令行工具p过滤器). Optional 命令行工具p_过滤器 with mode skip or selected — when either is used, 命令行工具ps is mandatory (non-empty). 输出 as设置 NewVid is always true — not configurable and not prompted. Erasure metadata Default with_erase_信息: true (WithErase信息). If false, stdout EraseMeta is {}; VideoUrls are still populated when Erase.File is returned.
Not supported: Manual mode, custom ratio Locations, tuning Subtitle过滤器 beyond {}, VideoOption.EncodeMode, overriding NewVid.
Precision erasure allow列出: if you see HTTP 403 or “权限 denied”, explAIn allow列出 / work order per BytePlus VOD.
Prerequisites 环境 variables (required; optionally place a .env in the working directory — scripts load it automatically): BYTEPLUS_访问KEY — BytePlus 访问 Key BYTEPLUS_SECRETKEY — BytePlus Secret Key VOD_SPACE_NAME — VOD space name Execution: examples use uv 运行 python … (python scripts/… works if deps are 安装ed). 工作流 overview 上传 流水线 (local file): [S1_应用LY] 应用ly上传信息 → TOS 上传 添加ress + 会话Key [S2_TOS] PUT file to TOS (direct or chunked) [S3_COMMIT] Commit上传信息 → Vid 输出: { Vid, Source, PlayURL, FileName, SpaceName, SourceUrl }
上传 流水线 (URL): [S1_上传] Submit URL 上传 job (上传MediaByUrl) → JobId [S2_POLL] Poll 查询上传Task信息 → Vid 输出: { Vid, Source, PlayURL, FileName, SpaceName, SourceUrl, JobId }
Precision erasure 流水线: [S3_ERASE] Submit Erase task (启动Execution / Task.Type Erase) → 运行Id [S4_POLL] Poll 获取Execution → 输出 Erase.File (+ optional Erase.信息) 输出: { 状态, SpaceName, VideoUrls[{ FileId, Vid, DirectUrl, Source, Url }], EraseMeta? }
Quick Self-检查 (recommended)
Before 运行ning any script:
.env or env vars contAIn BYTEPLUS_访问KEY, BYTEPLUS_SECRETKEY, and VOD_SPACE_NAME.
Pick the 流水线 from user intent:
User intent 流水线 Entry script 上传 video to VOD 上传 scripts/上传.py Subtitle / on-screen text erasure Precision erasure scripts/precise_erase.py S1_上传 & S2_POLL: 上传 and ObtAIn Vid Calling convention
运行 from the 技能 root directory (byted-byteplus-vod-precision-erasure/):
# Local file 上传 (returns Vid when complete) uv 运行 python scripts/上传.py "/path/to/video.mp4" [space_name]
# URL 上传 (polls until Vid is returned) uv 运行 python scripts/上传.py "https://example.com/video.mp4" [space_name]
uv 运行 python scripts/上传.py "https://example.com/sample.mp4" my_space
First argument: local file path or public http:// / https:// URL (auto-检测ed). Second argument (optional): space name; if omitted, VOD_SPACE_NAME is used. Paths and URLs must include a file 扩展 (e.g. .mp4, .mov, .mp3). 上传 flow
Local file (同步hronous, three-step):
应用ly上传信息 (API version 2023-01-01) → TOS 添加ress, 会话Key PUT to TOS (direct < 20 MiB, else chunked) Commit上传信息 (2023-01-01) → Vid
URL pull (a同步 + poll):
上传MediaByUrl (2023-01-01) → JobId Poll 查询上传Task信息 until done (same limits as sibling 技能: typically 360 × 5 s) Return Vid 输出 格式化
On 成功, one JSON object on stdout, e.g.:
{ "Vid": "v0d123abc", "Source": "vid://v0d123abc", "PlayURL": "https://example.cdn.com/xxx.m3u8", "PosterUri": "", "FileName": "uuid-filename.mp4", "SpaceName": "my_space", "SourceUrl": "https://example.com/video.mp4", "JobId": "job-xxx" }
Preserve Source (vid://…) for down流 技能s. Timeout handling (URL 上传)
If URL polling exhausts retries, stderr / JSON includes something like:
{ "error": "Polling timed out (360 attempts × 5s); the URL pull 上传 is still processing", "恢复_hint": { "description": "The URL 上传 has not finished yet; retry with the command below", "command": "uv 运行 python scripts/上传.py \"\" [space_name]" }, "JobIds": "job-xxx", "状态": "运行ning" }
S3_ERASE & S4_POLL: precision erasure Calling convention
运行 from the 技能 root directory (byted-byteplus-vod-precision-erasure/):
# Default: subtitle-only, whole video, WithErase信息 on uv 运行 python scripts/precise_erase.py '{"type":"Vid","video":"v0310abc"}'
uv 运行 python scripts/precise_erase.py '{"type":"Vid","video":"vid://v0d225gxxx"}' production_space
# Broader OCR (subtitle + other on-screen text) uv ru