ProductPromotion
Logo

Rust

made by https://0x3d.site

GitHub - tramhao/termusic: Music Player TUI written in Rust
Music Player TUI written in Rust. Contribute to tramhao/termusic development by creating an account on GitHub.
Visit Site

GitHub - tramhao/termusic: Music Player TUI written in Rust

GitHub - tramhao/termusic: Music Player TUI written in Rust

Terminal Music and Podcast Player written in Rust

Build status crates.io dependency status MSRV

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 Yes 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.79.0.

git

git will be required to build the package.

Backends

Backend Requirements
Symphonia(rusty) On Linux libasound2-dev is required for building.When using rusty-soundtouch additionally soundtouch and clang(build only) are required.
GStreamer GStreamer
MPV MPV

Protobuf

This is required to build and run termusic. For ubuntu: protobuf-compiler, For arch: protobuf.

Dbus

DBus is required for MPRIS control. For ubuntu: libdbus-1-dev, For arch: dbus.

Yt-dlp support

You can optionally install yt-dlp and FFmpeg to download from various providers.

Album cover support

To display covers in the terminal itself, feature cover can be enabled. To only enable specific protocols for cover support, see Cargo.toml#features.

Feature cover-ueberzug will require some ueberzug implementation to be present at runtime.

Pre-Compiled Packages

Do note that these will be compiled with the symphonia backend.

Arch Linux

Arch Linux users can install termusic from the official repositories using pacman.

pacman -S 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, you can enable the sixel protocol or use a ueberzug implementation(x11/xwayland only).

To build with all backends and all cover protocols:

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.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory