Download videos from YouTube, TikTok, Instagram, Twitter/X, and 1000+ sites. Just paste a link — the video gets downloaded at full quality and sent back to you.
CRITICAL: When the user sends a message that contains a URL from any of these domains, AUTOMATICALLY treat it as a download request. Do NOT ask "what do you want me to do with this?" — just download it.
Auto-detect domains:
youtube.com, youtu.be, m.youtube.comtiktok.com, vm.tiktok.cominstagram.com (reels, posts, stories)x.com, twitter.comreddit.com (video posts)twitch.tv (clips)vimeo.comfacebook.com (videos, reels)Pattern: If user message contains a URL matching these domains → skip questions, download immediately.
yt-dlp --js-runtimes nodejs \
-f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" \
--merge-output-format mp4 \
--no-playlist \
--output "/home/rami/.openclaw/workspace/_incoming/%(title).50s.%(ext)s" \
"<URL>"
Fallback for stubborn sites (TikTok, Instagram):
yt-dlp --js-runtimes nodejs \
-f "best" \
--no-playlist \
--output "/home/rami/.openclaw/workspace/_incoming/%(title).50s.%(ext)s" \
"<URL>"
Remove ALL metadata (title, author, GPS, comments, timestamps, source URL) for clean clips:
ffmpeg -i "/home/rami/.openclaw/workspace/_incoming/<filename>" \
-map_metadata -1 \
-fflags +bitexact \
-flags:v +bitexact \
-flags:a +bitexact \
-c copy \
"/home/rami/.openclaw/workspace/_incoming/<filename>_clean.mp4" \
&& mv "/home/rami/.openclaw/workspace/_incoming/<filename>_clean.mp4" \
"/home/rami/.openclaw/workspace/_incoming/<filename>"
This strips: title, artist, comment, description, source URL, creation date, encoder info, GPS coordinates — everything.
ls -lh /home/rami/.openclaw/workspace/_incoming/<filename>
If file is under 50MB — send directly via Telegram:
openclaw message send \
--channel telegram \
--target <user_id> \
--message "🎬 Downloaded: <title>" \
--media /home/rami/.openclaw/workspace/_incoming/<filename>
If file is over 50MB — use LocalSend:
```bash
localsend-cli send --to "
```
Buttons after send:
buttons: [
[
{ "text": "🎬 Download Another", "callback_data": "dl:another" },
{ "text": "📱 Send via LocalSend", "callback_data": "dl:localsend" }
],
[
{ "text": "🗑️ Delete File", "callback_data": "dl:delete" }
]
]
After confirmed delivery, offer to delete the file to save disk space.
Default is best quality MP4. If user asks for specific quality:
| Request | Flag |
|---|---|
| --------- | ------ |
| "1080p" | -f "bestvideo[height<=1080]+bestaudio/best[height<=1080]" |
| "720p" | -f "bestvideo[height<=720]+bestaudio/best[height<=720]" |
| "audio only" / "mp3" | -x --audio-format mp3 |
| "thumbnail" | --write-thumbnail --skip-download |
If user says "mp3", "audio only", "just the audio":
yt-dlp --js-runtimes nodejs \
-x --audio-format mp3 \
--output "/home/rami/.openclaw/workspace/_incoming/%(title).50s.%(ext)s" \
"<URL>"
If user sends a playlist URL and says "download all":
yt-dlp --js-runtimes nodejs \
-f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" \
--merge-output-format mp4 \
--output "/home/rami/.openclaw/workspace/_incoming/%(title).50s.%(ext)s" \
"<URL>"
Remove --no-playlist flag for playlists.
| Error | Fix |
|---|---|
| ------- | ----- |
| "Video unavailable" | Private/deleted video — notify user |
| "Sign in to confirm" | Age-restricted — try with --cookies-from-browser chrome |
| Geographic restriction | Try with --geo-bypass |
| Rate limited | Wait 30s and retry once |
| Merge failed | Fallback to -f best (single stream) |
| callback_data | Action |
|---|---|
| --------------- | -------- |
dl:another | Prompt for another URL |
dl:localsend | Send last downloaded file via LocalSend |
dl:delete | Delete the downloaded file |
dl:audio | Re-download as MP3 |
| Command | Usage |
|---|---|
| --------- | ------- |
| Best quality | yt-dlp -f "bestvideo+bestaudio/best" --merge-output-format mp4 URL |
| Audio only | yt-dlp -x --audio-format mp3 URL |
| List formats | yt-dlp -F URL |
| Thumbnail | yt-dlp --write-thumbnail --skip-download URL |
共 1 个版本