Added AGPL license
Updated readme
This commit is contained in:
@@ -1,120 +1,81 @@
|
||||
# Oscilloscope Video Generator
|
||||
|
||||
A high-performance Rust tool for generating oscilloscope-style visualizations from audio files. Uses parallel rendering for fast processing.
|
||||
Transform any audio file into stunning oscilloscope visualizations. Supports massive files with zero memory issues.
|
||||
|
||||
## Features
|
||||
 
|
||||
|
||||
- **Multiple visualization modes**: combined, separate, all (L/R + XY)
|
||||
- **Parallel rendering**: Uses all CPU cores for fast frame generation
|
||||
- **High quality output**: Supports up to 4K resolution at 60fps
|
||||
- **Original audio**: Copies audio stream without re-encoding (perfect sync)
|
||||
- **Customizable**: Colors, resolution, FPS, line thickness
|
||||
## ✨ Key Features
|
||||
|
||||
## Installation
|
||||
- **🎵 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
|
||||
|
||||
### From Source
|
||||
## 🚀 Quick Start
|
||||
|
||||
```bash
|
||||
cd oscilloscope-video-gen
|
||||
cargo install --path .
|
||||
# Install dependencies
|
||||
sudo apt install ffmpeg # Ubuntu/Debian
|
||||
# or
|
||||
brew install ffmpeg # macOS
|
||||
|
||||
# Build and install
|
||||
cargo install --git https://github.com/yourusername/oscilloscope-video-gen
|
||||
|
||||
# Generate video
|
||||
oscilloscope-video-gen -i your_music.flac -o oscilloscope.mp4
|
||||
```
|
||||
|
||||
### Build Only
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
The binary will be at `target/release/oscilloscope-video-gen`.
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic
|
||||
## 🎮 Usage Examples
|
||||
|
||||
### Basic Usage
|
||||
```bash
|
||||
oscilloscope-video-gen -i audio.wav -o video.mp4
|
||||
```
|
||||
|
||||
### Full Options
|
||||
|
||||
### High Quality 4K Output
|
||||
```bash
|
||||
oscilloscope-video-gen \
|
||||
-i audio.wav \
|
||||
-i audio.flac \
|
||||
-o video.mp4 \
|
||||
--width 1920 \
|
||||
--height 1080 \
|
||||
--fps 30 \
|
||||
--width 3840 --height 2160 --fps 60 \
|
||||
--mode all \
|
||||
--quality high \
|
||||
--left-color "#00ff00" \
|
||||
--right-color "#00ccff" \
|
||||
--xy-color "#ff8800" \
|
||||
--background "#0a0f0a" \
|
||||
--line-thickness 2 \
|
||||
--threads 8 \
|
||||
--overwrite \
|
||||
--verbose
|
||||
--quality high
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|--------|---------|-------------|
|
||||
| `-i, --input` | Required | Input WAV file |
|
||||
| `-o, --output` | Auto-generated | Output MP4 file |
|
||||
| `--width` | 1920 | Video width in pixels |
|
||||
| `--height` | 1080 | Video height in pixels |
|
||||
| `--fps` | 30 | Frames per second |
|
||||
| `--mode` | all | Visualization mode |
|
||||
| `--quality` | high | Video quality |
|
||||
| `--left-color` | #00ff00 | Left channel color (hex) |
|
||||
| `--right-color` | #00ccff | Right channel color (hex) |
|
||||
| `--xy-color` | #ff8800 | XY mode color (hex) |
|
||||
| `--background` | #0a0f0a | Background color (hex) |
|
||||
| `--show-grid` | true | Show grid lines |
|
||||
| `--line-thickness` | 2 | Line thickness in pixels |
|
||||
| `--threads` | All cores | Number of rendering threads |
|
||||
| `--overwrite` | false | Overwrite output file |
|
||||
| `--verbose` | false | Enable verbose output |
|
||||
|
||||
### Modes
|
||||
|
||||
- `combined`: Both channels merged into single waveform
|
||||
- `separate`: Left on top, Right on bottom
|
||||
- `all`: Left and Right on top row, XY pattern on bottom
|
||||
|
||||
### Quality Presets
|
||||
|
||||
| Preset | Video Bitrate |
|
||||
|--------|---------------|
|
||||
| low | 2 Mbps |
|
||||
| medium | 5 Mbps |
|
||||
| high | 10 Mbps |
|
||||
|
||||
## Requirements
|
||||
|
||||
- Rust 1.70+
|
||||
- ffmpeg (for video encoding)
|
||||
|
||||
## Building
|
||||
|
||||
### Custom Styling
|
||||
```bash
|
||||
# Debug build
|
||||
cargo build
|
||||
|
||||
# Release build (optimized)
|
||||
cargo build --release
|
||||
|
||||
# Build with specific number of threads
|
||||
cargo build --release --jobs 8
|
||||
oscilloscope-video-gen \
|
||||
-i audio.mp3 \
|
||||
-o video.mp4 \
|
||||
--left-color "#ff0080" \
|
||||
--right-color "#8000ff" \
|
||||
--background "#000000" \
|
||||
--line-thickness 3
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
## 🎛️ 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
|
||||
|
||||
Make sure ffmpeg is installed and in your PATH:
|
||||
|
||||
```bash
|
||||
# Ubuntu/Debian
|
||||
sudo apt install ffmpeg
|
||||
@@ -122,17 +83,23 @@ sudo apt install ffmpeg
|
||||
# macOS
|
||||
brew install ffmpeg
|
||||
|
||||
# Windows
|
||||
winget install FFmpeg
|
||||
# Windows (via winget or chocolatey)
|
||||
winget install ffmpeg
|
||||
```
|
||||
|
||||
### Out of memory
|
||||
### File Format Issues
|
||||
If your audio file isn't recognized:
|
||||
```bash
|
||||
# Check if ffmpeg can decode it
|
||||
ffmpeg -i your_file.ext -f null -
|
||||
```
|
||||
|
||||
For very long audio files, try:
|
||||
- Lower resolution (`--width 1280 --height 720`)
|
||||
- Lower FPS (`--fps 24`)
|
||||
- Fewer threads (`--threads 4`)
|
||||
## 📄 License
|
||||
|
||||
## License
|
||||
**AGPL-3.0-or-later** - Free software that respects your freedom.
|
||||
|
||||
MIT
|
||||
See [LICENSE](LICENSE) for full terms.
|
||||
|
||||
---
|
||||
|
||||
*Made with ❤️ using Rust and ffmpeg*
|
||||
|
||||
Reference in New Issue
Block a user