Skip to main content

🎵 MusicViz

PyPI - Version PyPI - Status PyPI - License

MusicViz is a high-performance, aesthetically driven Python tool that transforms your audio tracks into vibrant, neon-drenched visual experiences. Powered by Pygame and Librosa, it generates 1920x1080 MP4 videos with fluid, musically-accurate frequency bars.

Demo on YouTube


✨ Features

  • Neon Aesthetic: Mirrored, centered frequency bars with soft glow effects and a reactive background that pulses with the bass.
  • Beat Explosions: Dynamic particle bursts that trigger on every major beat for high-impact visuals.
  • Beat-Reactive Colors: The entire color palette shifts significantly on beats, keeping the experience fresh and energetic.
  • Circular Mode: Use the --circular flag for a radially expanding visualization centered on the screen.
  • Musically Accurate: Uses Mel-Spectrogram analysis to map frequencies to a human-perceivable scale, ensuring the visuals "feel" right.
  • Fluid Motion: Implements Temporal Smoothing (exponential decay) for professional, non-flickering bar movement.
  • High Performance: Pre-calculated audio analysis and headless Pygame rendering for fast video encoding.
  • Professional Layout: Left-aligned titles and optional artist subtitles for a clean, modern look.

🚀 Installation

1. Requirements

  • Python 3.11+
  • FFmpeg: Required for video encoding.
    • macOS: brew install ffmpeg
    • Ubuntu: sudo apt-get install ffmpeg

2. Setup

It is recommended to use a virtual environment:

conda create -n musicv python=3.11
conda activate musicv
pip install musicviz

For development, install from source:

git clone https://github.com/hathibelagal-dev/musicviz.git
cd musicviz
pip install .

🎨 Usage

Run the musicviz command providing your input audio, desired output name, and track details:

musicviz <input_audio> <output_video> "Track Title" --artist "Artist Name"

Example:

musicviz song.mp3 output.mp4 "Midnight Neon" --artist "SynthWave Artist"

🎥 Output Specifications

  • Resolution: 1920x1080 (1080p)
  • Frame Rate: 30 FPS
  • Color Palette: Dynamic Plasma/Neon (Blue to Pink)
  • Format: MP4 (H.264 codec) with AAC audio

🛠️ Built With

  • Librosa: Audio and music processing.
  • Pygame: High-performance graphics rendering.
  • MoviePy: Video editing and encoding.
  • NumPy: Heavy-duty numerical operations.

Download files

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

Source Distribution

musicviz-0.0.8.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

musicviz-0.0.8-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file musicviz-0.0.8.tar.gz.

File metadata

  • Download URL: musicviz-0.0.8.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for musicviz-0.0.8.tar.gz
Algorithm Hash digest
SHA256 371ac2374ef35d28bd1410d19f00c8c78c41e54f9d3cafa2091b3f67270e346e
MD5 a7b845ced910e64870372b5ff3d2eaae
BLAKE2b-256 f8460081e9d485f6299548605d7a47b804eb19e6d45819e30bdb3fb33f6c1941

See more details on using hashes here.

File details

Details for the file musicviz-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: musicviz-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for musicviz-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3b2cef96cfd4a9f18bb47ef9b39f1492e6322f84b0d367300ff7564d77f1cd32
MD5 035853fa6bf7cd01790d4b615e0fff29
BLAKE2b-256 793f79e1764d2a6393eab12045e73191dcf853e30210d1287df92246a4acadd4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

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