一鍵加速影片下載
作者 / 工作流程設計:AI落地第四聲。本作者資訊僅用於展示與來源識別,不添加額外授權限制。
這是一套面向影片和音訊下載的確認優先工作流程。使用者只需要把連結交給 AI,AI 會先檢查 yt-dlp 與 ffmpeg 環境,列出可用格式,解釋實用選擇,再確認畫質、儲存目錄和檔名。只有使用者確認後,AI 才會執行下載。
核心價值:避免拿到連結就直接下載,減少下錯清晰度、下錯容器、檔名混亂、HDR/編碼不相容、輸出位置不清楚等問題。預設適用於 YouTube、YouTube Shorts、Vimeo、TikTok、Instagram、X/Twitter、Facebook、Twitch、Bilibili、Dailymotion、SoundCloud、Bandcamp、Reddit 及其他 yt-dlp 支援的來源;完整範圍以 yt-dlp 官方站點清單 為準。播放清單只在使用者明確要求時處理。
快速開始:把影片連結發送給 AI,並說明你想要「最高畫質」「MP4 相容」「小檔案」「只要音訊」或讓 AI 推薦。預設推薦最高可用畫質,而不是為了省空間主動降到 720p。下載若會繼續做字幕翻譯,AI 會在你指定的位置建立一個以中文影片名稱和影片 ID 命名的小工程資料夾;影片、音訊和字幕都放在這裡。yt-dlp 負責解析和下載;ffmpeg 負責把分離的影片與音訊合併、轉換容器、提取音訊,以及需要時處理字幕、封面和中繼資料。
效果範例:
使用者:幫我下載這個 YouTube 影片,盡量清晰。
AI:我會先列出可用格式,然後給你幾個選擇:最高畫質、MP4 相容、較小檔案、僅音訊。確認畫質、儲存路徑和檔名後再下載。
以下從 "English Execution Contract" 開始是給 AI 執行者讀取的正式規則;上面的中文說明僅用於 SkillHub、ClawHub、skills.sh 和使用者理解,不替代執行合約。
English Execution Contract
Use this skill for reviewed video/audio downloads with yt-dlp. Do not download immediately after the user provides a link. First inspect available formats, summarize practical choices, and ask the user to choose. Before downloading, also confirm the download path and filename. Download only after the user confirms all required choices or explicitly delegates them.
Workflow
- Check tools if not already confirmed:
command -v yt-dlp
command -v ffmpeg
- List available formats:
yt-dlp --no-playlist -F "VIDEO_URL"
Use --no-playlist unless the user explicitly asks for a playlist.
- Summarize the useful choices:
- Best quality (default recommendation): highest available video plus best audio. Prefer H.264 video plus M4A/AAC in
mp4when that preserves the highest available resolution; otherwise explain the container tradeoff. - MP4 compatibility: H.264 video plus M4A/AAC audio, usually
mp4. - Smaller file: 1080p, 720p, or another clear cap.
- Audio only: best audio or M4A compatibility.
- Best quality (default recommendation): highest available video plus best audio. Prefer H.264 video plus M4A/AAC in
Mention format IDs or selectors, resolution, FPS, HDR/SDR, video codec, audio codec, estimated size when visible, and container.
-
Ask the user which quality or format to download. Do not run the download command until they confirm.
-
Confirm the parent download location and create a media project folder.
- Treat every download that may continue to subtitle translation as one media project, not a loose collection of files.
- Use the confirmed location as
PARENT_DIR, then createPROJECT_DIRnamed<localized video title> [<video id>]beneath it. Localize the title to the user's requested language when asked. - Save the video, an explicitly downloaded audio-only file, ASS/SRT outputs, and hidden working artifacts under
PROJECT_DIR. Do not leave related files in the parent directory. - Pass the same
PROJECT_DIRto video translation as both its--outputs-dirand the parent of its hidden.work/directory.
-
Confirm the filename.
- Propose a default filename from the video metadata, normally:
%(upload_date>%Y-%m-%d)s - %(title).200B [%(id)s].%(ext)s
- Ask whether the user wants to update the filename.
- If yes, ask them to send the filename directly. Preserve or add the final extension based on the chosen container.
- Keep
[%(id)s]in the default name to avoid collisions and preserve the source video ID, but remove it if the user requests a cleaner name. - Use the confirmed filename or template as
OUTPUT_NAME. When a localized project title is used, keep the same localized basename for video, audio, and subtitles.
Commands
Use explicit reviewed IDs when possible:
yt-dlp --no-playlist --windows-filenames \
-f "VIDEO_ID+AUDIO_ID" \
--merge-output-format mkv \
-P "OUTPUT_DIR" \
-o "OUTPUT_NAME" \
"VIDEO_URL"
Use best quality after the user delegates selection:
yt-dlp --no-playlist --windows-filenames \
-f "bv*+ba/b" \
--merge-output-format mkv \
-P "OUTPUT_DIR" \
-o "OUTPUT_NAME" \
"VIDEO_URL"
Use MP4 compatibility after confirmation:
yt-dlp --no-playlist --windows-filenames \
-f "bv*[ext=mp4][vcodec^=avc1]+ba[ext=m4a]/b[ext=mp4]/b" \
--merge-output-format mp4 \
-P "OUTPUT_DIR" \
-o "OUTPUT_NAME" \
"VIDEO_URL"
Use audio only after confirmation:
yt-dlp --no-playlist --windows-filenames \
-f "ba" \
-P "OUTPUT_DIR" \
-o "OUTPUT_NAME" \
"VIDEO_URL"
Final Response
After downloading, report the saved path, file size, selected format IDs or selector, confirmed output directory, confirmed filename, and any important caveats such as HDR, MKV playback, subtitles, or audio language.
Remind the user to download only content they have permission to save or use when relevant.