64 releases
0.9.1 | Aug 21, 2024 |
---|---|
0.9.0 | Mar 24, 2024 |
0.7.11 | Jul 10, 2023 |
0.7.9 | Feb 16, 2023 |
0.2.11 | Jul 16, 2021 |
#20 in Audio
66 downloads per month
2MB
41K
SLoC
Terminal Music and Podcast Player written in Rust
Listen to music and podcasts freely as both in freedom and free of charge!
Freedom: As time goes by, online service providers control pretty much everything we listen to. Complicated copyright issues make things worse. If my favorite song cannot be found on a website, I'll probably just not listen to them for years.
Free of charge: You can download from YouTube, NetEase, Migu and KuGou for free. No need to register for monthly paid memberships.
As a contributor of GOMU, I met serious problems during development. The main problem is data race condition. So I rewrote the player in rust, and hope to solve the problem.
Supported Formats
Below are the audio formats supported by the various backends.
In the case that metadata is not supported, an attempt will still be made to play the file.
Format (feature ) |
Symphonia (rusty ) |
Mpv (mpv ) |
Gstreamer (gst ) |
Metadata |
---|---|---|---|---|
ADTS | Yes | Yes | Yes | No |
AIFF | No | Yes | Yes | Yes |
FLAC | Yes | Yes | Yes | Yes |
M4a | Yes | Yes | Yes | Yes |
MP3 | Yes | Yes | Yes | Yes |
Opus | No | Yes | Yes | Yes |
Ogg Vorbis | Yes | Yes | Yes | Yes |
Wav | Yes | Yes | Yes | Yes |
WebM | Yes(opus not supported) | Yes | Yes | No |
MKV | Yes(depends on codec) | Yes | Yes | No |
Default backend: rusty
Installation
Requirements
MSRV
You will need to build with the stable rust toolchain. Minimal Supported Rust Version 1.77.0.
git
git
will be required to build the package.
=======
Backend | Requirements |
---|---|
Symphonia | You will need ALSA installed to support decoding with symphonia. Note that the ALSA development files are required. These are provided as part of the libasound2-dev package on Debian and Ubuntu distributions and alsa-lib-devel on Fedora.In addition soundtouch and clang (build only) are required. |
GStreamer | GStreamer |
MPV | MPV |
Protobuf
This is required to build and run termusic. For ubuntu: apt-get protobuf-compiler
, For arch: paru -S protobuf
.
Dbus
As right now use_dbus is a configuration option, it's required to compile. For ubuntu: apt-get libdbus-1-dev
, For arch: paru -S dbus
.
Yt-dlp support
You can optionally install yt-dlp and FFmpeg to download MP3s from Youtube.
Album cover support
For kitty, album cover support is default. For other terminals, need ueberzug/ueberzugpp installed and cover
feature flag compiled.
Packages
Do note that these will be compiled with the symphonia backend.
Arch Linux
Arch Linux users can install termusic
from the AUR using an AUR helper.
paru termusic
NetBSD
NetBSD users can install termusic
from the official repositories.
pkgin install termusic
Nix/NixOS
Either in the user's environment:
nix-env --install termusic
Or declaratively in /etc/nixos/configuration.nix
:
{
environment.systemPackagess = with pkgs; [
...
termusic
];
}
Cargo
cargo install termusic termusic-server --locked
From Source
git clone https://github.com/tramhao/termusic.git
cd termusic
make
Then install with:
make install
By default, termusic can display album covers in Kitty or iTerm2 (mac, not tested). If you need album covers displayed on other terminals, please install ueberzug or ueberzugpp, then:
make full
Finally, you can run it with:
~/.local/share/cargo/bin/termusic
You can copy it anywhere in your $PATH
. The configuration file for the TUI is located in ~/.config/termusic/tui.toml
, and the configuration file for the server is located in ~/.config/termusic/server.toml
(or on macOS, ~/Library/Application Support/termusic/tui.toml
, ~/Library/Application Support/termusic/server.toml
, respectively).
However, as this is a minimalistic program, you don't need to edit the configuration file and almost everything can be set from the app.
TODO
- Better interface to adjust timestamp of lyric.
- Rating and sync support.
- Multiple root and easy switch.
- Save playlists.
- Listen to rss feeds/Podcasts. Need a new layout.
Contributing and issues 🤝🏻
Contributions, bug reports, new features and questions are welcome! 😉 If you have any question or concern, or you want to suggest a new feature, or you want just want to improve termusic, feel free to open an issue or a PR.
Please follow our contributing guidelines
Contributors
hasezoey
Thanks
License
MIT License for main part of code.
GPLv3 for NetEase api code under src/lyric/netease
. Comes from netease-cloud-music-gtk.
GPLv3 for Podcast code under src/podcast
. Comes from shellcaster.
Dependencies
~59–98MB
~1.5M SLoC