A FastAPI service for downloading YouTube videos using yt-dlp and uploading them to Supabase Storage.
- 🚀 Fast and async API using FastAPI
- 📹 Powered by
yt-dlp(Nightly Build) - ☁️ Auto-upload to Supabase Storage
- 🔐 Basic Authentication
- 🧹 Auto-cleanup of temporary files
Verify the service is running and see the current yt-dlp version.
curl -s http://localhost:8000/healthResponse:
{
"status": "healthy",
"version": "1.0.0",
"yt_dlp_version": "2024.12.23.232938"
}Download a video by providing its URL.
Basic Auth:
- User:
admin(default) - Password:
changeme(default)
Command:
curl -v -u admin:changeme -X POST "http://localhost:8000/youtube/video" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "quality": "1080"}'Parameters:
url: The YouTube video URL (Required)quality: Target quality (e.g., "1080", "720", "best"). Defaults to "1080".proxy: Optional proxy URL.
Response:
{
"status": "success",
"url": "https://your-project.supabase.co/...",
"title": "Rick Astley - Never Gonna Give You Up",
"media_type": "video/mp4",
"filename": "a1b2c3d4e5f6g7h8.mp4"
}-
Clone & Build:
docker-compose up -d --build
-
Environment Variables: Create a
.envfile based on.env.exampleto configure Supabase credentials.