Video Download Faas
Download videos in MP4 format using yt-dlp with FaaS (Firecracker/Container) isolation.
- Rating
- 3.9 (151 reviews)
- Downloads
- 48,374 downloads
- Version
- 1.0.0
Overview
Download videos in MP4 format using yt-dlp with FaaS (Firecracker/Container) isolation.
Complete Documentation
View Source →
Video Download FaaS
Download videos asynchronously using yt-dlp in isolated background processes. All downloads are saved as MP4 files.
Overview
This skill manages video downloads as background tasks that:
- Start immediately and return control to the user
- Continue running even if the session disconnects
- Can be monitored for progress
- Can be terminated when needed
When to Use
Use this skill when:
- Downloading large videos that take time
- Processing multiple videos concurrently
- Running downloads on remote/headless systems
- Need to continue working while downloading
Quick Start
Start a Download
scripts/download.sh "https://youtube.com/watch?v=..."
Returns immediately with:
- Session ID
- Process ID (PID)
- Log file location
Check Status
# List all active downloads
scripts/check-status.sh
# Check specific download
scripts/check-status.sh video_dl_1234567890_12345
Kill Download
# Graceful stop
scripts/kill-download.sh video_dl_1234567890_12345
# Force kill
scripts/kill-download.sh video_dl_1234567890_12345 --force
Commands
download.sh
Start a video download in background with MP4 output format.
Usage:
download.sh <URL> [output_directory]
Parameters:
URL- Video URL to download (required)output_directory- Where to save video (optional, default: ~/Downloads)
- Downloads are automatically converted to MP4 format
- Uses best available MP4 video + M4A audio, merged into MP4
- If source isn't MP4, it will be re-encoded to MP4
- Session ID for tracking
- PID for process management
- Paths to log and session files
scripts/download.sh "https://www.youtube.com/watch?v=dQw4w9WgXcQ" /tmp/videos
check-status.sh
Check download progress and status.
Usage:
# List all sessions
check-status.sh
# Check specific session
check-status.sh <session_id>
Returns:
- Process status (running/completed)
- Download progress (if running)
- Downloaded files (if completed)
- Error information (if failed)
kill-download.sh
Terminate a running download.
Usage:
kill-download.sh <session_id> [--force]
Parameters:
session_id- The session ID from download.sh--force- Use SIGKILL instead of SIGTERM
Session Management
Session files are stored in /tmp/ with format:
video_dl_{timestamp}_{pid}.session- Session metadatavideo_dl_{timestamp}_{pid}.pid- Process IDvideo_dl_{timestamp}_{pid}.log- Download log
- Download completes successfully
- Process is killed via kill-download.sh
FaaS Integration
For containerized/Firecracker execution:
# Run download in isolated container
./run-in-container.sh scripts/download.sh "URL"
# Check from host
scripts/check-status.sh
Troubleshooting
Download not starting:
- Check yt-dlp is installed:
yt-dlp --version - Verify URL is accessible:
curl -I "URL"
- Session may have completed and auto-cleaned
- Check ~/Downloads for finished files
- Ensure scripts are executable:
chmod +x scripts/*.sh
Requirements
- yt-dlp installed and in PATH
- Bash 4.0+
- Write access to /tmp and output directory
Installation
openclaw install video-download-faas
💻Code Examples
scripts/download.sh "https://youtube.com/watch?v=..."
Returns immediately with:
- Session ID
- Process ID (PID)
- Log file location
### Check Statusscripts/kill-download.sh video_dl_1234567890_12345 --force
## Commands
### download.sh
Start a video download in background with **MP4 output format**.
**Usage:**download.sh <URL> [output_directory]
**Parameters:**
- `URL` - Video URL to download (required)
- `output_directory` - Where to save video (optional, default: ~/Downloads)
**Output Format:**
- Downloads are automatically converted to **MP4** format
- Uses best available MP4 video + M4A audio, merged into MP4
- If source isn't MP4, it will be re-encoded to MP4
**Returns:**
- Session ID for tracking
- PID for process management
- Paths to log and session files
**Example:**scripts/download.sh "https://www.youtube.com/watch?v=dQw4w9WgXcQ" /tmp/videos
### check-status.sh
Check download progress and status.
**Usage:**check-status.sh <session_id>
**Returns:**
- Process status (running/completed)
- Download progress (if running)
- Downloaded files (if completed)
- Error information (if failed)
### kill-download.sh
Terminate a running download.
**Usage:**kill-download.sh <session_id> [--force]
**Parameters:**
- `session_id` - The session ID from download.sh
- `--force` - Use SIGKILL instead of SIGTERM
## Session Management
Session files are stored in `/tmp/` with format:
- `video_dl_{timestamp}_{pid}.session` - Session metadata
- `video_dl_{timestamp}_{pid}.pid` - Process ID
- `video_dl_{timestamp}_{pid}.log` - Download log
Sessions are automatically cleaned up when:
- Download completes successfully
- Process is killed via kill-download.sh
## FaaS Integration
For containerized/Firecracker execution:# List all active downloads
scripts/check-status.sh
# Check specific download
scripts/check-status.sh video_dl_1234567890_12345# Graceful stop
scripts/kill-download.sh video_dl_1234567890_12345
# Force kill
scripts/kill-download.sh video_dl_1234567890_12345 --force# List all sessions
check-status.sh
# Check specific session
check-status.sh <session_id># Run download in isolated container
./run-in-container.sh scripts/download.sh "URL"
# Check from host
scripts/check-status.shTags
Quick Info
Ready to Install?
Get started with this skill in seconds
Related Skills
4claw
4claw — a moderated imageboard for AI agents.
Aap Passport
Agent Attestation Protocol - The Reverse Turing Test.
Acestep Lyrics Transcription
Transcribe audio to timestamped lyrics using OpenAI Whisper or ElevenLabs Scribe API.
Adaptive Suite
A continuously adaptive skill suite that empowers Clawdbot.