Skip to content

dat514/Music-Player

Repository files navigation

🎡 ServerMusicSong - Web Music Player

Python Flask License Version Platform FFmpeg Cloudflare Tunnel Status

ServerMusicSong Screenshot

🌟 Features

  • 🎡 Upload and play MP3/WAV audio files
  • 🎨 Real-time audio visualization with wave effects
  • 🎧 Built-in equalizer with presets
  • πŸ“± Responsive design with mini-player
  • πŸ”’ User authentication and admin verification
  • πŸ” Search functionality
  • πŸ“‹ Queue management
  • 🎬 Custom background support (images/videos)
  • πŸ”— Direct upload from YouTube/SoundCloud links
  • 🎚️ Volume boost and audio enhancement

πŸ“ Directory Structure

ServerMusicSong/
β”œβ”€β”€ DownloadWithLinkTool/     # YouTube/SoundCloud download utility
β”‚   └── tool.py
β”œβ”€β”€ RunAndUpdateLink/         # Cloudflare tunnel management
β”‚   β”œβ”€β”€ cloudflare_url.txt
β”‚   └── update_cloudflare_url.py
β”œβ”€β”€ Verify Users/            # User verification tools
β”‚   β”œβ”€β”€ verify_tool.py
β”‚   └── readme.txt
β”œβ”€β”€ static/                  # Frontend assets
β”‚   β”œβ”€β”€ dashboard.js
β”‚   β”œβ”€β”€ index.html
β”‚   └── styles/
β”œβ”€β”€ music/                   # Music storage
β”œβ”€β”€ thumbnails/             # Track thumbnails
β”œβ”€β”€ backgrounds/            # Custom backgrounds
β”œβ”€β”€ randomthumbnail/       # Default thumbnails
β”œβ”€β”€ avatars/               # User avatars
β”œβ”€β”€ project_upload/        # Project files
β”œβ”€β”€ app.py                 # Main server application
β”œβ”€β”€ requirements.txt
└── README.md

πŸš€ Prerequisites

  • Python 3.8+
  • FFmpeg
  • Cloudflare CLI
  • Node.js (for development)

βš™οΈ Detailed Installation

1. Environment Setup

# Install Python 3.8+ from python.org

# Install virtualenv
pip install virtualenv

# Create virtual environment
python -m venv venv

# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux/Mac:
source venv/bin/activate

# Install required libraries
pip install -r requirements.txt

2. Install FFmpeg

3. Install Cloudflare

4. Configuration Setup

  1. Create .env file:
# .env
JWT_SECRET_KEY=your-secret-key
FLASK_PORT=6001
CORS_ORIGINS=http://localhost:6001,https://your-cloudflare-url.com
  1. Create necessary directories:
mkdir music thumbnails backgrounds randomthumbnail avatars project_upload
  1. SSL Configuration (optional):
  • Place cert.pem and key.pem in the root directory
  • Update paths in app.py

5. Running the Application

  1. Run Flask server:
python app.py
  1. Start Cloudflare tunnel:
python RunAndUpdateLink/update_cloudflare_url.py
  1. Access:

6. Default Admin Account

  • Username: admin
  • Password: admin_password

7. User Management

# Verify new users
python "Verify Users/verify_tool.py"

8. Advanced Configuration

  1. Change admin password:
cd HashCreate
python create_hash.py
  1. Music Loading Configuration:
  • Place MP3/WAV music files in music/ directory
  • Place thumbnail images in thumbnails/
  • Place background images in backgrounds/
  • Place default thumbnails in randomthumbnail/
  1. Download music from YouTube/SoundCloud:
cd DownloadWithLinkTool
python tool.py

9. Common Error Handling

  1. FFmpeg Error:
pip install -U yt-dlp
  1. SSL Error:
  • Check cert.pem and key.pem
  • Update paths in app.py
  1. CORS Error:
  • Check CORS_ORIGINS in .env
  • Ensure Cloudflare URL is correct
  1. Upload Error:
  • Check directory permissions
  • Ensure file names have no special characters

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

βš’οΈ Credits

  • Built with ❀️Python, Flask, CustomTkinter, SQLite3, JWT Extended, mutagen, yt-dlp, FFmpeg, Deezer’s open-source Spleeter AI model, Cloudflare Tunnel, Optional support for ngrok

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors