- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Plays an M3U playlist (default Stuff.m3u) shuffled and looping, with a ratatui interface for pause/skip/volume. Track titles come from embedded tags via lofty, and REPLAYGAIN_TRACK_GAIN/_PEAK tags adjust playback volume per track. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
mplay
A tiny terminal music player: point it at an .m3u playlist, and it shuffles
the tracks and plays them back-to-back with a TUI showing what's on.
Usage
mplay [playlist.m3u]
With no argument, Stuff.m3u in the current directory is used.
The playlist is shuffled on startup, and reshuffled automatically every time it wraps around, so playback loops forever in a fresh order.
Keys
| Key | Action |
|---|---|
space |
Pause / resume |
n / → |
Next track |
p / ← |
Previous track |
r |
Reshuffle and restart |
↑ / ↓ |
Volume up / down |
q / Esc |
Quit |
Playlist format
Plain and extended M3U are both supported:
- Track titles come from the file's embedded tags (ID3v2, Vorbis
comments, MP4 atoms) as
Artist - Titlewhen available, falling back to the#EXTINF:<secs>,<title>line, then the filename. - Relative paths are resolved against the playlist's directory.
- Comment lines (
#...) and network stream URLs are skipped.
Supported audio formats (via symphonia): MP3, FLAC, OGG/Vorbis, WAV, M4A/AAC.
ReplayGain
If a track carries ReplayGain tags, the volume is adjusted automatically:
REPLAYGAIN_TRACK_GAIN is preferred, falling back to
REPLAYGAIN_ALBUM_GAIN, and REPLAYGAIN_TRACK_PEAK caps the boost to
avoid clipping. The applied gain is shown in the now-playing panel
(e.g. RG -6.5 dB), and the volume keys adjust your listening level on
top of it. To edit the playlist, see the companion m3uedit tool.
Building
cargo build --release
Binary lands at target/release/mplay.exe.
Note (Windows GNU toolchain): some dependencies use raw-dylib linking,
which requires a full mingw-w64 dlltool/as on PATH — the WinLibs
distribution (winget install BrechtSanders.WinLibs.POSIX.UCRT) provides
them.