Logo Youtube Downloader

Youtube Downloader

Tổ chức
OpenMinis
youtube-downloader

Download YouTube videos or extract audio using yt-dlp + ffmpeg in the Linux shell. Trigger when the user shares a YouTube URL and wants to download, save, rip, extract, or convert it — to video or audio (MP3/M4A). Also trigger for phrases like "download this video", "save this YouTube", "rip audio from", "grab this video", or when a YouTube link is shared with intent to save it locally. Works with youtube.com/watch, youtu.be/, and youtube.com/shorts/ URLs.

Tổng quan

Nhà phát hànhOpenMinis
Kho mãMinisSkills
Tên kỹ năngyoutube-downloader
Sao
543
Bản fork
86
Tệp đi kèm
2
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được OpenMinis công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Youtube Downloader trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/OpenMinis/MinisSkills/tree/main/youtube-downloader
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/OpenMinis/MinisSkills.git /tmp/MinisSkills
mkdir -p .claude/skills
cp -r /tmp/MinisSkills/youtube-downloader .claude/skills/youtube-downloader
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Youtube Downloader trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Youtube Downloader ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Youtube Downloader với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

YouTube Downloader

Download YouTube videos or extract audio. Files are named after the video title, saved to the user's preferred location, and remuxed to play correctly as video on iOS.

How This Skill Works

This skill runs yt-dlp + ffmpeg inside the Minis Linux sandbox (iSH). Two iSH-specific workarounds are required:

  1. Manual DASH merge: yt-dlp's built-in video+audio merger crashes in iSH. For high-quality formats (1080p, 1440p), the script downloads video and audio separately using -k (keep video), lets the merger fail, then merges them with a direct ffmpeg call.

  2. iOS container fix: YouTube's MP4 files use the mp42 brand, which iOS may treat as audio-only. The script remuxes to M4V (for H.264) or standard mp4 (for AV1/VP9) with +faststart so iOS Files plays them as video.

First Run — Onboarding

On the FIRST time this skill triggers, run onboarding before downloading anything.

Step 1: Check status

bash
sh /var/minis/skills/youtube-downloader/scripts/yt-config.sh status

If onboarded: true, skip to Normal Operation. If onboarded: false (or config doesn't exist), continue onboarding.

Step 2: Install dependencies

If yt-dlp: no or ffmpeg: no in the status output, install them:

bash
apk add yt-dlp ffmpeg py3-pip
pip install --upgrade --break-system-packages yt-dlp

The pip upgrade is essential — Alpine's yt-dlp package is stale and YouTube's player changes frequently. This takes ~30 seconds.

Step 3: Ask the user two questions

Present as a friendly numbered list. Wait for answers.

Question 1 — Quality preference:

What quality do you want by default?

  1. 1080p video — Full HD, best balance of quality and size (default)
  2. 1440p video — 2K, highest quality, large files (~300 MB per 10 min)
  3. 720p video — HD, smaller file size
  4. Audio only — best for music/podcasts, smallest file
  5. Ask me every time — no default, I'll pick per video

Question 2 — Where to save:

Where should I save your downloads?

  1. iOS Files app (Downloads folder) — appears in Files → Downloads
  2. iOS Photos (YouTube Downloads album) — appears in Photos
  3. Keep in Minis — stays in the app's attachments folder

Step 4: Set up Files mount (if user chose option 1)

Check if the Downloads mount already exists via the status command. If downloads_mount: yes, skip. If downloads_mount: no, tell the user:

To save videos to your Files app, I need you to mount your Downloads folder:

  1. Tap this link: Mount External Folders
  2. Tap "Add Mount"
  3. Navigate to the folder you want (e.g., iCloud Drive → Downloads, or On My iPhone → Downloads)
  4. Name it "Downloads"
  5. Come back here and tell me when you're done

After the user confirms, re-run the status check to verify downloads_mount: yes.

Step 5: Save config

bash
sh /var/minis/skills/youtube-downloader/scripts/yt-config.sh set quality "<chosen_quality>"
sh /var/minis/skills/youtube-downloader/scripts/yt-config.sh set save_mode "<chosen_save_mode>"
sh /var/minis/skills/youtube-downloader/scripts/yt-config.sh complete
  • Quality: "1080p", "1440p", "720p", "360p", "audio", or "" (empty string for "ask every time")
  • save_mode: "files", "photos", or "minis"

Step 6: Offer a test download

Tell the user setup is complete. Offer to download a short test video at 360p so they can verify the flow:

bash
sh /var/minis/skills/youtube-downloader/scripts/yt-download.sh "https://www.youtube.com/watch?v=aqz-KE-bpKQ" 360p <save_mode>

Replace <save_mode> with whatever the user chose (files, photos, or minis). 360p is used for the test because it's the most reliable quality — higher quality works the same way once configured.

Confirm the file appeared where they expected. Then proceed with whatever they originally asked for.


Normal Operation

bash
sh /var/minis/skills/youtube-downloader/scripts/yt-download.sh "<URL>" [quality] [save_mode]
  • Quality is optional — if omitted, uses the saved default from config
  • save_mode is optional — if omitted, uses the saved default from config (files, photos, or minis)
  • If the user specified a quality in their message ("just the audio", "1440p", etc.), use that
  • If the user specified where to save ("save to photos", "put it in files"), pass that as save_mode

After download, report to the user

The script prints one of three status lines. Read it and tell the user:

  • If SAVED_TO_FILES: "Saved to your Files app → Downloads folder. Pull to refresh if you don't see it yet."
  • If SAVED_TO_PHOTOS: "Saved to the 'YouTube Downloads' album in your Photos app."
  • If KEPT_IN_ATTACHMENTS: The file is at /var/minis/attachments/<filename>. Display it inline and tell the user it's available in Minis.
  • Always include the video title and file size.

Quality Reference

QualityFormatApprox size (10-min video)Reliability
1080pDASH H.264 + AAC, manually merged~256 MB✅ Works (M4V container)
1440pDASH AV1 or VP9 + AAC, manually merged~300-460 MB✅ Works (mp4 container)
720pMP4 pre-merged (format 22)~80 MB✅ Always works
360pMP4 pre-merged (format 18)~27 MB✅ Always works
audioM4A 128kbps (format 140)~10 MB✅ Always works

DASH formats (1080p, 1440p) download video and audio separately, then merge with ffmpeg (yt-dlp's built-in merger fails in iSH). H.264 streams go into the Apple M4V container; AV1/VP9 streams go into standard mp4. Both play as video on iOS. All video downloads are remuxed with +faststart and the correct container brand.


Troubleshooting

403 Forbidden on DASH streams: YouTube transiently blocks DASH downloads when using the android vr client fallback (no JS runtime available). Retry — it usually works within 1-2 attempts. Pre-merged formats (360p, 720p) bypass this entirely.

"No supported JavaScript runtime": iSH has no Deno/Node, so yt-dlp can't do YouTube's nsig extraction. Pre-merged formats (18, 22) and audio (140) work without JS. DASH formats work via the android vr client fallback but may intermittently 403.

yt-dlp out of date: YouTube breaks extraction often. Run pip install --upgrade --break-system-packages yt-dlp.

Downloads mount disappears: The mount may disconnect if iCloud sync state changes. Run yt-config.sh status to check. If broken, guide the user to re-mount via Mount External Folders.

Large files: 1440p files can exceed 450 MB. If the app crashes or becomes unstable, stick to 1080p or lower.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Youtube Downloader làm được gì?

Download YouTube videos or extract audio using yt-dlp + ffmpeg in the Linux shell. Trigger when the user shares a YouTube URL and wants to download, save, rip, extract, or convert it — to video or audio (MP3/M4A). Also trigger for phrases like "download this video", "save this YouTube", "rip audio from", "grab this video", or when a YouTube link is shared with intent to save it locally. Works with youtube.com/watch, youtu.be/, and youtube.com/shorts/ URLs.

Vì sao nên dùng Youtube Downloader trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Youtube Downloader là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Youtube Downloader trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/OpenMinis/MinisSkills/tree/main/youtube-downloader. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Youtube Downloader?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Youtube Downloader với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Youtube Downloader với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Youtube Downloader có miễn phí không?

Có. Kỹ năng này được OpenMinis phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇