Universal Video to S3 Uploader

Download videos from YouTube, Twitter/X, TikTok, Douyin, Bilibili and upload to S3-compatible storage. Universal video downloader with smart quality selection and audio merging.

3,891 stars

Best use case

Universal Video to S3 Uploader is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Download videos from YouTube, Twitter/X, TikTok, Douyin, Bilibili and upload to S3-compatible storage. Universal video downloader with smart quality selection and audio merging.

Teams using Universal Video to S3 Uploader should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/youtube-s3-uploader/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/aiastia/youtube-s3-uploader/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/youtube-s3-uploader/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Universal Video to S3 Uploader Compares

Feature / AgentUniversal Video to S3 UploaderStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Download videos from YouTube, Twitter/X, TikTok, Douyin, Bilibili and upload to S3-compatible storage. Universal video downloader with smart quality selection and audio merging.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Universal Video to S3 Uploader v3.0.1

A universal video downloader that supports multiple platforms and uploads to S3-compatible storage.

## 🚀 Version 3.0.1 - Filename Optimization

### What's New:
- **✅ Clean Filenames**: Removes all punctuation marks, emojis, and special characters from filenames
- **✅ Better Unicode Support**: Proper handling of Chinese punctuation and emojis
- **✅ Platform Detection**: Automatic detection of video platform (YouTube, Twitter/X, TikTok, etc.)
- **✅ Universal Support**: Works with 1000+ websites via yt-dlp

### Breaking Changes:
- **❌ NOT backward compatible**: v3.x is a complete rewrite from v2.x
- **❌ New API**: Universal `video-to-s3-universal.js` script
- **❌ Platform Detection**: Automatically detects video platform

### Why v3.0.1?
v3.0.1 improves filename handling:
1. **Clean filenames** - Removes all punctuation and emojis
2. **Better S3 compatibility** - Avoids issues with special characters
3. **Improved readability** - Clean, readable filenames without clutter

### What's New:
- **✅ S3 Multipart Upload for All Files**: v2.0.0 uses S3 multipart upload for all file sizes
- **✅ Memory Optimization**: Chunked reading to avoid memory overflow
- **✅ Error Recovery**: Automatic retry mechanism for failed uploads
- **✅ Smart Chunk Sizing**: Automatically adjusts chunk size based on file size
- **✅ Performance Improvements**: Better progress tracking and speed calculation
- **✅ Fixed Help System**: Proper help information display

### Breaking Changes:
- **❌ NOT backward compatible**: v2.0.0 is a complete rewrite
- **❌ Old scripts removed**: All v1.x scripts have been replaced
- **❌ New API**: Uses S3 multipart upload for all files, not just large ones

### Why v2.0.0?
v2.0.0 fixes critical issues in v1.x:
1. **Fixed help system** - Proper `--help` display
2. **Consistent API** - Always uses multipart upload
3. **Better error handling** - Improved error messages
4. **Cleaner codebase** - Removed compatibility layers

## Features

- **One-command workflow**: Download YouTube video → Upload to S3 → Get access URL
- **S3-compatible**: Works with Cloudflare R2, AWS S3, MinIO, and any S3-compatible storage
- **Automatic cleanup**: Removes local files after successful upload
- **Progress tracking**: Real-time upload progress and speed calculation
- **Secure by default**: Uses your own S3 credentials, no external dependencies
- **Flexible configuration**: Multiple bucket support, custom paths, metadata
- **Smart upload method**: Automatically uses S3 Multipart Upload for large files (>50MB)
- **Memory efficient**: Chunked reading to avoid memory overflow
- **Error recovery**: Retry mechanism for failed uploads

## Prerequisites

1. **S3-compatible storage** (Cloudflare R2, AWS S3, MinIO, etc.)
2. **S3 credentials** (Access Key ID and Secret Access Key)
3. **Bucket created** with appropriate permissions

## Quick Start

### 1. Install the skill

```bash
clawhub install youtube-s3-uploader
```

### 2. Configure your S3 storage

Create `~/.youtube-s3-uploader.yml`:

```yaml
# Default bucket to use
default: my-videos

# Bucket configurations
buckets:
  my-videos:
    endpoint: https://your-s3-endpoint.com
    access_key_id: YOUR_ACCESS_KEY_ID
    secret_access_key: YOUR_SECRET_ACCESS_KEY
    bucket_name: my-videos
    region: auto  # Use "auto" for Cloudflare R2, or specific region for AWS S3
    # Optional: Custom public URL (e.g., CDN domain)
    # public_url: https://cdn.yourdomain.com
```

### 3. Download and upload a YouTube video

```bash
youtube-s3-upload https://youtu.be/VIDEO_ID
```

## Configuration Details

### Cloudflare R2 Example

```yaml
buckets:
  r2-storage:
    endpoint: https://ACCOUNT_ID.r2.cloudflarestorage.com
    access_key_id: YOUR_R2_ACCESS_KEY_ID
    secret_access_key: YOUR_R2_SECRET_ACCESS_KEY
    bucket_name: video-storage
    region: auto
```

### AWS S3 Example

```yaml
buckets:
  aws-s3:
    endpoint: https://s3.us-east-1.amazonaws.com
    access_key_id: YOUR_AWS_ACCESS_KEY_ID
    secret_access_key: YOUR_AWS_SECRET_ACCESS_KEY
    bucket_name: my-video-bucket
    region: us-east-1
```

### MinIO / Self-hosted Example

```yaml
buckets:
  minio:
    endpoint: http://localhost:9000
    access_key_id: minioadmin
    secret_access_key: minioadmin
    bucket_name: uploads
    region: us-east-1
```

## Usage

### Basic usage

```bash
# Download and upload a YouTube video (original method)
youtube-s3-upload https://youtu.be/8uZGlzWA4oo

# Download and upload using FIXED method (recommended for large files)
npm run youtube-to-s3-fixed -- https://youtu.be/8uZGlzWA4oo

# Specify custom S3 path
youtube-s3-upload https://youtu.be/VIDEO_ID --path videos/2026/march/my-video.mp4

# Use specific bucket (from config)
youtube-s3-upload https://youtu.be/VIDEO_ID --bucket backup-bucket

# Keep local file after upload (for debugging)
youtube-s3-upload https://youtu.be/VIDEO_ID --keep-local
```

### Upload existing video file

```bash
# Upload a local video file to S3
upload-to-s3 /path/to/video.mp4

# With custom S3 path
upload-to-s3 /path/to/video.mp4 --path archived/videos/special.mp4
```

### Test S3 connection

```bash
# Test S3 connection and bucket access
test-s3-connection

# Test specific bucket
test-s3-connection --bucket my-bucket
```

## Output

After successful processing, you'll get:

```
🎉 Processing Complete!

📊 Results:
Video Title: What Made the Turtle Cry!? Vedal's First Interaction with Neuro 3D
Original Size: 41.22 MB
Upload Time: 11.12 seconds
Average Speed: 3.71 MB/s

🔗 S3 Access URL:
https://s3.yourdomain.com/bucket-name/videos/2026-03-25/video-title.mp4

📁 S3 Path:
bucket-name/videos/2026-03-25/video-title.mp4

💡 Tip: This URL may require authentication. Use presigned URLs for temporary access.
```

## Advanced Features

### Presigned URLs

Generate temporary access URLs (default: 1 hour):

```bash
generate-presigned-url videos/2026/march/my-video.mp4

# Custom expiration (e.g., 24 hours)
generate-presigned-url videos/2026/march/my-video.mp4 --expires 24h
```

### List uploaded videos

```bash
# List recent uploads
list-s3-uploads

# List from specific bucket
list-s3-uploads --bucket my-bucket

# List with details
list-s3-uploads --detailed
```

### Delete files from S3

```bash
# Delete a file
delete-from-s3 videos/old-video.mp4

# Delete with confirmation
delete-from-s3 videos/old-video.mp4 --confirm
```

## Environment Variables

- `YOUTUBE_S3_CONFIG`: Path to config file (default: `~/.youtube-s3-uploader.yml`)
- `YOUTUBE_S3_DEFAULT_BUCKET`: Override default bucket
- `YOUTUBE_S3_KEEP_LOCAL`: Keep local files (default: `false`)
- `YOUTUBE_S3_DEBUG`: Enable debug logging

## Security Best Practices

1. **Use IAM roles** when possible instead of long-term credentials
2. **Set short expiration** for presigned URLs (minutes, not days)
3. **Enable bucket versioning** for accidental deletion protection
4. **Configure lifecycle rules** to automatically delete old files
5. **Use bucket policies** to restrict access by IP or referrer

## Troubleshooting

### Common Issues

1. **"Invalid credentials"**: Check your Access Key ID and Secret Access Key
2. **"Bucket does not exist"**: Create the bucket in your S3 provider's dashboard
3. **"Access denied"**: Verify bucket policies and IAM permissions
4. **"SSL certificate error"**: For self-signed certificates, use HTTP or add certificate exception
5. **"Upload timeout"**: Large files may need multipart upload - use the fixed version
6. **"Memory overflow"**: Use the fixed version with chunked reading
7. **"Large file upload fails"**: Use `youtube-to-s3-fixed.js` for files >50MB

### Fixed Version for Large Files

For large video files (>50MB), use the fixed version that implements S3 Multipart Upload:

```bash
# Using npm script
npm run youtube-to-s3-fixed -- https://youtu.be/VIDEO_ID

# Direct script execution
node scripts/youtube-to-s3-fixed.js https://youtu.be/VIDEO_ID

# Upload existing large file
node scripts/fixed-upload-video-to-s3.js /path/to/large-video.mp4
```

The fixed version:
- Uses S3 Multipart Upload for files >50MB
- Implements chunked reading to avoid memory overflow
- Includes retry mechanism for failed uploads
- Shows real-time progress and speed
- Automatically selects best method based on file size

### Debug Mode

Enable debug logging to see detailed information:

```bash
YOUTUBE_S3_DEBUG=true youtube-s3-upload https://youtu.be/VIDEO_ID
```

## License

MIT-0 - Free to use, modify, and redistribute. No attribution required.

## Credits

Created by 西米露 (Simeilu) - A complete YouTube to S3 workflow for personal media storage.

Related Skills

demo-video

3891
from openclaw/skills

Create product demo videos by automating browser interactions and capturing frames. Use when the user wants to record a demo, walkthrough, product showcase, or interactive video of a web application. Supports Playwright CDP screencast for high-quality capture and FFmpeg for video encoding.

Video Production

universal-trading

3891
from openclaw/skills

Execute cross-chain token trading on EVM and Solana with Particle Network Universal Account SDK. Use when users ask to set up universal-account-example, buy or sell tokens, run convert/swap flows, transfer assets, call custom transactions, query balances/history, or monitor transaction status via WebSocket.

Cryptocurrency & DeFi

seedance-video

3891
from openclaw/skills

Generate AI videos using ByteDance Seedance. Use when the user wants to: (1) generate videos from text prompts, (2) generate videos from images (first frame, first+last frame, reference images), or (3) query/manage video generation tasks. Supports Seedance 1.5 Pro (with audio), 1.0 Pro, 1.0 Pro Fast, and 1.0 Lite models.

recipe-video-extractor

3891
from openclaw/skills

Extract a structured cooking recipe from a shared video URL when the user sends `recipe <url>`. Prioritize caption/description and comments via browser automation, then use web search/fetch as fallback with clear source attribution.

per-agent-compression-universal

3891
from openclaw/skills

Zero-config memory consolidation for multi-agent OpenClaw deployments. Auto-discovers agents and registers staggered cron tasks with full state tracking, deduplication, and domain-aware extraction.

json2video-pinterest

3891
from openclaw/skills

Generate Pinterest-optimized vertical videos using JSON2Video API. Supports AI-generated or URL-based images, AI-generated or provided voiceovers, optional subtitles, and zoom effects. Use when creating video content for Pinterest affiliate marketing, creating vertical social media videos, automating video production with JSON2Video API, or generating videos with voiceovers and subtitles.

arch-video-cut

3891
from openclaw/skills

Automatic Architecture Video Editing Workflow with Self-Learning Preferences

short-video-script-generator-pro

3891
from openclaw/skills

AI Short Video Script Generator, support TikTok/YouTube Shorts/Instagram Reels, auto generate hook, shots, voiceover, subtitles, BGM, CTA. $0.005 USDT per use.

ai-notes-of-video

3891
from openclaw/skills

The video AI notes tool is provided by Baidu. Based on the video download address provided by the user, it downloads and parses the video, and finally generates AI notes corresponding to the video (a total of three types of notes can be generated: document notes, outline notes, and image-text notes).

keevx-video-translate

3891
from openclaw/skills

Translate videos into a specified target language using the Keevx API. Supports audio-only translation, subtitle generation, and dynamic duration adjustment. Use this skill when the user needs to (1) Translate/dub a video (2) Translate a video from one language to another (3) Query the list of supported translation languages (4) Check the status of a video translation task. Keywords video translate, Keevx, dubbing.

keevx-image-to-video

3891
from openclaw/skills

Use the Keevx API to convert images to videos. Supports multiple models (V/KL), various resolutions (720p/1080p/4K), and audio generation. Use this skill when the user needs to: (1) Convert images to video (2) Generate video with Keevx (3) Create and query image-to-video tasks (4) Batch image-to-video conversion. Keywords: image to video, Keevx, video generation.

ai-video-prompt

3891
from openclaw/skills

AI视频Prompt构建专家。采用"首尾帧图片+视频"工作流,支持多段5秒视频拼接生成长视频(30秒/60秒)。先生成关键帧图片,再生成视频Prompt,确保段与段之间无缝衔接。针对即梦平台优化,支持全中文Prompt输出。