Skip to content

thefernandopaes/audio-drop

Repository files navigation

AudioDrop

Web application for extracting MP3 audio from online videos. https://audio-drop-production.up.railway.app/

Features

  • MP3 audio extraction from YouTube videos and other sites
  • Minimalist and responsive interface
  • Persistent download counter (survives server restarts)
  • Queue system with Bull (optional Redis support)
  • Automatic retry mechanism (up to 3 attempts)
  • Advanced yt-dlp configuration (bypasses YouTube restrictions)
  • Rate limiting to prevent overload (5 requests per 10 minutes)
  • Automatic cleanup of temporary files
  • Better error handling with specific user feedback
  • Auto-update yt-dlp on container start

Tech Stack

Frontend:

  • HTML5 + CSS3 + Vanilla JavaScript
  • Tailwind CSS
  • Responsive interface

Backend:

  • Node.js + Express
  • Redis (optional - for Bull queue)
  • Bull (queue management with fallback)
  • yt-dlp (audio extraction with auto-update)
  • Winston (logs)
  • File-based persistence for stats

Installation

Prerequisites

  • Node.js 18+
  • Redis (optional - for queue system)
  • Python 3 + pip
  • FFmpeg

Local Setup

  1. Clone the repository:

    git clone https://github.com/your-username/audiodrop.git
    cd audiodrop
  2. Install dependencies:

    npm install
  3. Install yt-dlp:

    pip install yt-dlp
  4. Configure environment variables:

    cp .env.example .env
  5. Start Redis (optional):

    redis-server
    # If Redis is not available, the app will work without queue system
  6. Run the application:

    npm run dev

🚀 Deployment

Railway

  1. Connect your repository to Railway
  2. Configure environment variables:
    • REDIS_URL
    • PORT
  3. Automatic deployment

Docker

docker build -t audiodrop .
docker run -p 3000:3000 audiodrop

API Endpoints

POST /api/download

Starts downloading a video.

Body:

{
  "url": "https://www.youtube.com/watch?v=VIDEO_ID"
}

Response:

{
  "jobId": "1234567890",
  "status": "processing",
  "message": "Download started..."
}

GET /api/status/:jobId

Checks download status.

Response:

{
  "status": "completed",
  "file": "/path/to/audio.mp3",
  "timestamp": 1234567890
}

GET /api/download/:filename

Downloads the audio file.

⚠️ Important

  • Only use with content you have the right to download
  • Respect the terms of use of websites
  • This tool is for educational and personal use

Known Limitations

  • YouTube Bot Detection: YouTube may occasionally detect automated downloads. The app uses multiple strategies (iOS, Android, TV clients) to minimize this.
  • Age-Restricted Content: Some age-restricted videos cannot be downloaded without authentication
  • Regional Restrictions: Geo-blocked content may not be accessible
  • Rate Limiting: Maximum 5 downloads per IP every 10 minutes

Tips for Best Results

  • Try different videos if one fails (bot detection is video-specific)
  • Wait a few minutes between downloads
  • Shorter videos typically have higher success rates
  • Public, non-restricted videos work best

🤝 Contributing

  1. Fork the project
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

📄 License

MIT License - see LICENSE file for details.

Releases

No releases published

Packages

 
 
 

Contributors