Go to file
2026-01-19 01:04:37 +01:00
src Rewrote to be able to process large audio files 2026-01-19 00:40:23 +01:00
.gitignore initial commit 2026-01-18 15:34:01 +01:00
Cargo.lock Remove unsused variable 2026-01-18 19:52:25 +01:00
Cargo.toml Remove unsused variable 2026-01-18 19:52:25 +01:00
LICENSE Added AGPL license 2026-01-19 01:00:40 +01:00
README.md Updated readme to include build command 2026-01-19 01:04:37 +01:00

Oscilloscope Video Generator

Transform any audio file into stunning oscilloscope visualizations. Supports massive files with zero memory issues.

License

Key Features

  • 🎵 Universal Audio Support - FLAC, MP3, WAV, AAC, and 200+ formats via ffmpeg
  • 🚀 Streaming Architecture - Processes huge files without filling RAM or SSD
  • 📊 Professional Spectrometer - FFT analyzer with smooth Cava-style animations
  • 🎯 4-Quadrant Display - Waveforms + XY pattern + spectrometer in one video
  • 🎬 High Quality Output - 4K 60fps support with customizable colors
  • Memory Efficient - Constant RAM usage regardless of file size

🚀 Quick Start

1. Install System Dependencies

Ubuntu/Debian:

sudo apt update && sudo apt install ffmpeg

macOS:

brew install ffmpeg

Windows:

# Via winget (recommended)
winget install ffmpeg

# Or download from https://ffmpeg.org/download.html
# Make sure ffmpeg is in your PATH

2. Build the Project

# If you have the source code locally:
cd /path/to/oscilloscope-video-gen

# Build in release mode (much faster)
cargo build --release

# The binary will be at: target/release/oscilloscope-video-gen

3. Generate Your First Video

# Basic usage - replace 'audio.wav' with your audio file
./target/release/oscilloscope-video-gen -i audio.wav -o oscilloscope.mp4

# Check available options
./target/release/oscilloscope-video-gen --help

🎮 Usage Examples

Basic Usage

oscilloscope-video-gen -i audio.wav -o video.mp4

High Quality 4K Output

oscilloscope-video-gen \
  -i audio.flac \
  -o video.mp4 \
  --width 3840 --height 2160 --fps 60 \
  --mode all \
  --quality high

Custom Styling

oscilloscope-video-gen \
  -i audio.mp3 \
  -o video.mp4 \
  --left-color "#ff0080" \
  --right-color "#8000ff" \
  --background "#000000" \
  --line-thickness 3

🎛️ Visualization Modes

  • all (default) - 4 quadrants: L/R waveforms + XY pattern + spectrometer
  • combined - Single merged waveform
  • separate - Left channel top, right channel bottom

🏗️ How It Works

This tool uses a streaming pipeline that pipes audio decoding directly to video encoding, eliminating temporary files and memory issues. The FFT spectrometer provides real-time frequency analysis with logarithmic scaling and temporal smoothing for smooth animations.

No file size limits - handles anything ffmpeg can decode, from tiny samples to 24-hour recordings.

📋 Requirements

  • Rust 1.70+
  • ffmpeg (with libavcodec, libavformat, libswresample)

🔧 Troubleshooting

ffmpeg not found

# Ubuntu/Debian
sudo apt install ffmpeg

# macOS
brew install ffmpeg

# Windows (via winget or chocolatey)
winget install ffmpeg

File Format Issues

If your audio file isn't recognized:

# Check if ffmpeg can decode it
ffmpeg -i your_file.ext -f null -

📄 License

AGPL-3.0-or-later - Free software that respects your freedom.

See LICENSE for full terms.


Made with ❤️ using Rust and ffmpeg