Skip to main content

An automated pipeline to download, upscale audio (Demucs, DeepFilterNet, AudioSR) and generate visualizations.

Project description

Music Upscaling & Visualization

An automated pipeline that downloads audio from YouTube, upscales it using Demucs, DeepFilterNet, and AudioSR, and generates side-by-side comparison visualizations.

Prerequisites

  • FFmpeg: Must be installed and available in your PATH.
  • C Compiler: cc (Linux) or cl.exe (Windows/MSVC) for building the visualizer.
  • Python 3.11: Required. This project relies on specific versions of torchaudio and DeepFilterNet that have compatibility issues with Python 3.12+.
  • X11 Libraries: (Linux only) Required for building the visualizer (Musializer).
    • On Debian/Ubuntu: sudo apt install libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev

Installation

pip install Music-Upsacler-and-Visualizer

Note: It is highly recommended to use a virtual environment with Python 3.11.

Setup

The visualization component (Musializer) needs to be compiled locally.

  1. The tool will automatically clone the musializer repository if it's not present when you run it, or you can do it manually:

    git clone https://github.com/mariobx/musializer-file-paths
    
  2. Compile the binary:

    • Linux: cd musializer-file-paths && cc -o nob nob.c && ./nob
    • Windows (MSVC): cd musializer-file-paths && cl.exe nob.c && nob.exe

The tool expects the binary at ./musializer-file-paths/build/musializer by default, or you can specify the path using --musializer_dir.

Usage

After installation, you can use the musicupscaler command:

musicupscaler <YOUTUBE_URL>

Options:

  • -f, --format: Audio format to download (mp3, m4a, wav, flac) (default: mp3).
  • -t, --threads: Number of threads for upscaling.
  • --to_upscale: Directory for initial downloads.
  • --post_upscaled: Directory for upscaled audio.
  • --final_video_dir: Directory for the final comparison video.
  • --musializer_dir: Path to the compiled Musializer directory.

How it Works

  1. Download: Uses yt-dlp to fetch the highest quality audio.
  2. Upscale:
    • Demucs: Separates audio into stems.
    • DeepFilterNet: Denoises the vocal stem.
    • AudioSR: Performs Super-Resolution (48kHz).
    • Pedalboard: Mixes, masters, and applies stereo widening.
  3. Visualize: Uses a custom build of Musializer to generate waveforms.
  4. Stitch: FFmpeg creates a side-by-side "BEFORE" vs "AFTER" comparison video.

Created by mariobx

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

music_upsacler_and_visualizer-0.1.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

music_upsacler_and_visualizer-0.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file music_upsacler_and_visualizer-0.1.0.tar.gz.

File metadata

File hashes

Hashes for music_upsacler_and_visualizer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8c7bf07a38f231324ed76e37c88c8e0d875feae32526a87f9f01977f46d8613a
MD5 af0c780e301e0c1a59b3d2e5aa546975
BLAKE2b-256 48fd81cb4a7163f3ff2bf207118d0a2ecfbb55b2eb2dd80a3738cb923ba88ec2

See more details on using hashes here.

File details

Details for the file music_upsacler_and_visualizer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for music_upsacler_and_visualizer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55df0c80b43ca984385ff58cacb9ccf4b854f6d87a27add167e2aab6bf64181d
MD5 50ca5dd06ac6be06e1d33d836932aeaa
BLAKE2b-256 478dedcb7cf17d2d156befba45134b2bb50ffc65631ff50f26ac87aa81cc92a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page