🦀 ClawHub
Youtube Hq Downloader
by @accidwar
Youtube Highest Quality Downloader - Download highest quality silent video and pure audio from YouTube, then merge into video with sound
TERMINAL
clawhub install youtube-hq-downloader📖 About This Skill
name: youtube-hq-downloader description: Youtube Highest Quality Downloader - Download highest quality silent video and pure audio from YouTube, then merge into video with sound
YouTube Highest Quality Downloader
Download the highest quality silent video and pure audio from YouTube, then merge into a video with sound using ffmpeg. 从YouTube下载视频的最高清无声版本和纯音频,然后使用ffmpeg合并为有声视频。
Features / 功能
Usage / 使用方法
Quick Start
# Run the download script directly
python3 ~/clawd/skills/youtube-hq-downloader/download.py "YouTube_URL" [output_directory]
Full Workflow
# 1. Enter the skill directory
cd ~/clawd/skills/youtube-hq-downloader2. Create virtual environment (first run)
python3 -m venv .venv
source .venv/bin/activate
pip install yt-dlp3. Run download and merge
python3 download.py "https://www.youtube.com/watch?v=xxxxx"Or run step by step manually
./download.sh "YouTube_URL"
Manual Commands
# Activate environment
cd ~/clawd/skills/youtube-hq-downloader
source .venv/bin/activateDownload video (highest quality, silent)
yt-dlp -f "bestvideo[ext=mp4]" "YouTube_URL" -o "%(title)s_video.%(ext)s"Download audio
yt-dlp -x --audio-format m4a "YouTube_URL" -o "%(title)s_audio.%(ext)s"Merge video and audio
ffmpeg -i "*.mp4" -i "*.m4a" -c:v copy -c:a aac -shortest "output.mp4" -y
Parameters / 参数说明
yt-dlp Video Download
-f "bestvideo": Download highest quality video format (may be WebM or MP4)%(title)s_video.%(ext)syt-dlp Audio Download
-x: Extract audio--audio-format m4a: Output as M4A formatffmpeg Merge
-i "video.mp4" -i "audio.m4a": Input files-c:v copy: Copy video stream, no re-encoding-c:a aac: Convert audio to AAC encoding-shortest: Use shorter duration-y: Overwrite output fileDependencies / 依赖
brew install ffmpeg)Auto Install / 自动安装
The script will automatically detect and use system-installed yt-dlp. If not found:
# Manual install yt-dlp
pip install yt-dlpOr use uv
pip install uv && uv pip install yt-dlp
FAQ / 常见问题
Q: Downloaded video has no sound?
A: This is normal. Usingbestvideo only downloads the video track. You need to download audio separately and merge.Q: Video resolution is too low?
A: YouTube may have regional or quality restrictions on certain videos. Try other formats likebest instead of bestvideo.Q: ffmpeg error "No such file"?
A: Make sure ffmpeg is installed:brew install ffmpegQ: How to specify output directory?
A: Pass the second parameter as output directory when running the script, or modify the OUTPUT_DIR variable in the script.💡 Examples
# Run the download script directly
python3 ~/clawd/skills/youtube-hq-downloader/download.py "YouTube_URL" [output_directory]
Full Workflow
# 1. Enter the skill directory
cd ~/clawd/skills/youtube-hq-downloader2. Create virtual environment (first run)
python3 -m venv .venv
source .venv/bin/activate
pip install yt-dlp3. Run download and merge
python3 download.py "https://www.youtube.com/watch?v=xxxxx"Or run step by step manually
./download.sh "YouTube_URL"
Manual Commands
# Activate environment
cd ~/clawd/skills/youtube-hq-downloader
source .venv/bin/activateDownload video (highest quality, silent)
yt-dlp -f "bestvideo[ext=mp4]" "YouTube_URL" -o "%(title)s_video.%(ext)s"Download audio
yt-dlp -x --audio-format m4a "YouTube_URL" -o "%(title)s_audio.%(ext)s"Merge video and audio
ffmpeg -i "*.mp4" -i "*.m4a" -c:v copy -c:a aac -shortest "output.mp4" -y