ra-video-download

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

视频下载

视频下载

Download source media only. Do not transcribe, rewrite, edit, or publish it.
仅下载源媒体。不要转录、改写、编辑或发布。

Storage rules

存储规则

  • Keep source URLs, source titles, source metadata, and downloaded reference media inside
    01-内容生产/视频工作台/.internal/
    by default.
  • Use
    01-内容生产/视频工作台/制作中/<日期-主题>/原始素材/
    only when the caller explicitly names a production project and the media is an approved production input.
  • Never place source information in a handoff, finished script, final archive, or public document.
  • Never overwrite an existing file. Let the downloader add a stable suffix or stop.
  • 默认将源 URL、源标题、源元数据和下载的参考媒体保存在
    01-内容生产/视频工作台/.internal/
    中。
  • 仅当调用方明确指定制作项目,且该媒体是已获批准的制作输入时,才使用
    01-内容生产/视频工作台/制作中/<日期-主题>/原始素材/
    。
  • 切勿将源信息放入交付结果、成片脚本、最终归档或公开文档中。
  • 切勿覆盖已有文件。让下载器添加稳定后缀或停止下载。

Workflow

工作流

  1. Confirm that the URL is source media and that downloading it is within the user's request.
  2. Run the bundled downloader. It uses this order:
    • Douyin: TikHub media URL, then
      yt-dlp
      with browser cookies, then plain
      yt-dlp
      .
    • Other supported sites: plain
      yt-dlp
      , optionally with browser cookies when required.
  3. Inspect the returned local path and media probe. A successful HTTP response alone is not delivery.
  4. Require a playable audio or video stream and a non-zero duration. Report the local path, duration, dimensions, and selected download method.
  5. If every route fails, preserve the concise failure log and state the missing prerequisite. Do not claim that the video was downloaded.
  1. 确认该 URL 指向源媒体,且下载行为在用户请求范围内。
  2. 运行随附的下载器。其使用顺序如下:
    • 抖音:TikHub 媒体 URL,然后使用浏览器 cookies 的
      yt-dlp
      ,最后使用普通
      yt-dlp
      。
    • 其他支持的网站:普通
      yt-dlp
      ,必要时可选用浏览器 cookies。
  3. 检查返回的本地路径和媒体探测结果。仅获得成功的 HTTP 响应不代表交付成功。
  4. 要求媒体包含可播放的音频或视频流,且时长不为零。报告本地路径、时长、分辨率和所选下载方式。
  5. 如果所有下载路径均失败,保留简洁的失败日志并说明缺少的前置条件。不要声称视频已下载。

Command

命令

Use the Python interpreter that can import
tikhub
for the best Douyin path. In this workspace, prefer
/opt/homebrew/bin/python3
when available.
bash
/opt/homebrew/bin/python3 scripts/download_media.py '<url>'
Useful options:
bash
undefined
使用能够导入
tikhub
的 Python 解释器,以获得最佳的抖音下载路径。在此工作区中,如
/opt/homebrew/bin/python3
可用,则优先使用它。
bash
/opt/homebrew/bin/python3 scripts/download_media.py '<url>'
常用选项:
bash
undefined

Explicit production input directory

Explicit production input directory

/opt/homebrew/bin/python3 scripts/download_media.py '<url>' --output-dir '01-内容生产/视频工作台/制作中/<日期-主题>/原始素材/<项目>'
/opt/homebrew/bin/python3 scripts/download_media.py '<url>' --output-dir '01-内容生产/视频工作台/制作中/<日期-主题>/原始素材/<项目>'

Extract audio only

Extract audio only

/opt/homebrew/bin/python3 scripts/download_media.py '<url>' --audio-only
/opt/homebrew/bin/python3 scripts/download_media.py '<url>' --audio-only

Use an authenticated browser profile for a protected public page

Use an authenticated browser profile for a protected public page

/opt/homebrew/bin/python3 scripts/download_media.py '<url>' --cookies-from-browser chrome

Resolve `scripts/download_media.py` relative to this `SKILL.md`; do not assume the current directory is the skill directory.
/opt/homebrew/bin/python3 scripts/download_media.py '<url>' --cookies-from-browser chrome

相对于此 `SKILL.md` 解析 `scripts/download_media.py` 的路径;不要假定当前目录就是 skill 目录。

Safety and failure handling

安全与失败处理

  • Use browser cookies only for the requested public media. Do not print, copy, or persist raw cookies.
  • Read
    TIKHUB_API_KEY
    from the environment or the workspace-root
    .env
    ; never print it.
  • Do not bypass private-account access controls, paywalls, DRM, or deleted/private media.
  • Treat TikHub and browser cookies as acquisition fallbacks, not as proof that reuse rights exist.
  • Keep the original source file untouched after download.
  • If
    ffprobe
    fails, reject the file even if it has an
    .mp4
    extension.
  • 仅针对用户请求的公开媒体使用浏览器 cookies。切勿打印、复制或持久化原始 cookies。
  • 从环境变量或工作区根目录的
    .env
    中读取
    TIKHUB_API_KEY
    ;切勿打印该密钥。
  • 切勿绕过私密账号访问控制、付费墙、DRM,或已删除及私密媒体。
  • 将 TikHub 和浏览器 cookies 视为获取媒体时的备用方案,而不是拥有复用权利的证明。
  • 下载后保持原始源文件不被改动。
  • 如果
    ffprobe
    执行失败,即使文件扩展名为
    .mp4
    ,也应拒绝该文件。

Handoff

交付

Return a compact result containing:
  • local media path
  • source metadata path
  • method used (
    tikhub
    ,
    yt-dlp-cookie
    , or
    yt-dlp
    )
  • duration, resolution, and codecs
  • any limitation such as watermark, missing audio, or authentication failure
Then route onward only when requested:
ra-逐字稿提取skill
for source speech extraction,
video-use
for editing, or
ra-video-production-director
for production.
返回简洁的结果,其中包含:
  • 本地媒体路径
  • 源元数据路径
  • 使用的下载方式(
    tikhub
    、
    yt-dlp-cookie
    或
    yt-dlp
    )
  • 时长、分辨率和编解码器
  • 水印、音频缺失或认证失败等限制
仅在用户提出要求时继续路由:源语音提取使用
ra-逐字稿提取skill
,编辑使用
video-use
,制作使用
ra-video-production-director
。