Yue (乐) is a desktop music visualizer and MP4 exporter written in Rust with Raylib. It renders a live audio-reactive preview, lets you load custom background/logo art, and exports a high-quality H.264/ALAC video through FFmpeg.
- Live preview window at
1280x720 - Audio-reactive center ring and circular spectrum visualization
- Track loading for
wav,mp3,ogg, andflac - Optional background image and center logo image
- Async export progress overlay so the UI stays responsive during MP4 generation
- High-quality export pipeline:
- logical composition at
1920x1080 - supersampled internal render at
3840x2160 - downscale with
lanczos - video encoded with
libx264 - audio encoded with
ALAC
- logical composition at
- Rust toolchain
- FFmpeg available on
PATH - Raylib build/runtime prerequisites for your platform
cargo runSelect Track: load an audio fileCycle Theme: switch accent colorLoad BG Image: load a background imageLoad Ring Image: load the center logo imageRender MP4: exportoutput.mp4Space: pause/resume playback- Slider: seek through the current track
- Export currently writes to
output.mp4in the project root. - A temporary WAV file is created in the system temp directory during export.
- The UI remains interactive enough to display progress while export work advances frame-by-frame on the main loop.
Useful commands:
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
cargo testsrc/main.rs: app entry point, UI loop, file picking, playback, export job lifecyclesrc/export.rs: offline export pipeline, FFmpeg integration, WAV decoding, export mathsrc/audio.rs: shared audio state and RMS helpersrc/fft.rs: FFT processingsrc/visuals/: visual composition modulescore_ring.rs: center ring and logo renderingspectrum.rs: circular spectrum points/trailsmod.rs: visualizer composition and canvas scaling
The project has unit coverage for:
- RMS calculation
- FFT peak detection for a sine wave
- Core ring state updates
- Spectrum update behavior
- Export helper logic
- WAV sample decoding for float and int sources
Yue (乐) refers to music.