An extensible music server written in Rust πŸš€πŸŽ΅βœ¨

Overview

Music Player (written in Rust)

License: MIT release rust-clippy discord-server

Note: This is a work in progress.

This is a simple music player that I made for my own use. It is written in Rust and uses rodio, symphonia, and gRPC libraries.
Music is played through the server's audio device. The daemon stores info about all available music, and this info can be easily searched and retrieved. Like mpd or Mopidy but written in Rust.

Installation

# Install dependencies
brew install protobuf # macOS
sudo apt-get install -y libasound2-dev protobuf-compiler # Ubuntu/Debian
choco install protoc # Windows using Chocolatey Package Manager
# Compile
git clone https://github.com/tsirysndr/music-player.git
cd music-player/webui/musicplayer
nvm install # install node version specified in .nvmrc (optional on windows)
npm install -g yarn
yarn install && yarn build # build webui
cd ../..
cargo install --path .

Note: Don't forget to add ~/.cargo/bin to your PATH environment variable.

macOS/Linux

brew install tsirysndr/tap/musicplayer

Or download the latest release for your platform here.

Start the server

music-player

Usage

USAGE:
    music-player [SUBCOMMAND]

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

SUBCOMMANDS:
    albums      List all albums
    artists     List all artists
    help        Print this message or the help of the given subcommand(s)
    next        Play the next song
    pause       Pause the current song
    open        Open audio file
    playlist    Manage playlists
    prev        Play the previous song
    queue       Manage the queue
    play        Resume the current song
    scan        Scan music library: $HOME/Music
    search      Search for a song, album, artist or playlist
    stop        Stop the current song
    tracks      List all tracks

GraphQL API

# Start the server
music-player

Open http://localhost:5053/graphiql in your browser.

Features

  • Play music from specified path
  • Configuration file support
  • gRPC API for controlling the player
  • Scan music library
  • Play/Pause/Stop music
  • Next/Previous track
  • Create/Delete playlists
  • Music Player Client
  • Terminal UI (using tui-rs)
  • GraphQL API
  • Web UI
  • Desktop version (using gtk-rs)
  • Android Library
  • iOS Library
  • Mobile version (React Native)
  • Stream to Chromecast
  • Stream to Airplay
  • Stream to Kodi
  • Stream from Youtube (audio only)
  • Stream from Spotify
  • Stream from Soundcloud
  • Stream from Deezer
  • Stream from DatPiff
  • Stream from Tidal
  • Stream from MyVazo
You might also like...
A html document syntax and operation library written in Rust, use APIs similar to jQuery.

Visdom A server-side html document syntax and operation library written in Rust, it uses apis similar to jQuery, left off the parts thoes only worked

A Blog & RSS system written in Rust based on Luke Smith's LB.
A Blog & RSS system written in Rust based on Luke Smith's LB.

OB - Oliver's Blog Script A Blog and RSS system written in Rust. Features Converts blog entries written in Markdown into HTML. ✍🏻 Keeps a rolling blo

Sample serverless application written in Rust
Sample serverless application written in Rust

This is a simple serverless application built in Rust. It consists of an API Gateway backed by four Lambda functions and a DynamoDB table for storage.

Fastest autocomplete API written in rust πŸ¦€

rust-autocomplete-api fastest* autocomplete API written in rust πŸ¦€ *probably Run it locally cargo build --release ./target/release/autocomplete-api-po

A very basic "clone" of Reddit's r/place written in Rust using warp

r(usty)/place A very basic "clone" of r/place written in Rust using warp. Instead of rendering the image on the client side, the image is encoded as P

An API to track various stats written in Rust. Tracking Github, Wakatime, Spotify, and Duolingo
An API to track various stats written in Rust. Tracking Github, Wakatime, Spotify, and Duolingo

Null API API For collecting data Explore the docs Β» View Demo Β· Report Bug Β· Request Feature Table of Contents About The Project Built With Getting St

A simple clone of Waifu-pics written in Rust

really A simple clone of Waifu-pics written in Rust. Why? I've no idea. API Doc GET /api/v1/meta GET /api/v1/by/:type/:category GET /api/v1/random GET

Rust Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
Rust Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.

Rust Embed Rust Custom Derive Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev. Y

Rust I18n is use Rust codegen for load YAML file storage translations on compile time, and give you a t! macro for simply get translation texts.

Rust I18n Rust I18n is use Rust codegen for load YAML file storage translations on compile time, and give you a t! macro for simply get translation te

Comments
  • Standalone Tauri app proof of concept

    Standalone Tauri app proof of concept

    I've been looking into developing a desktop music player app for my own personal use, and since my main expertise is in JavaScript development I got an interest in Tauri as a desktop app development solution. Along the way, I stumbled upon the impressive work here and thought I would try my hand at adding a Tauri standalone client based on this application.

    It turned out to be surprisingly simple - a testament to your modular implementation and technology choices here.

    This PR adds a proof of concept Tauri client implementation. It currently runs only in dev mode and may or may not work OOTB on your system (tested on MacOS only). It wraps the web UI in a desktop shell and runs its own backend independently of the server, though it's not fully independent since it won't initialize the database or scan the music directory, as that would require extra UX considerations.

    Screen Shot 2022-11-26 at 7 18 37 PM

    Ultimately I think the goal here would be to make the client fully independent so a user could install the packaged app on their system without also installing the server/CLI application. In all likelihood that's contrary to your vision for the project, in which case I'm happy to continue to poke around in my fork.

    Regardless, I thought you would be interested in what it looks like.

    Overview of changes:

    • Add Tauri boilerplate from the CLI (assets, Tauri main, etc.)
    • Add REACT_APP_NATIVE_WRAPPER env variable in the client to identify if the app is running in the Tauri shell
    • Use Tauri asset protocol to serve cover images. Unfortunately this does require the client to use different URIs where applicable. Also this adds an async initialization step for the client since the Tauri API's are all async.
    • Set up app in the Tauri main function following other main.rs files
    • Add a custom GraphQL communication layer for Tauri. There's sort of an existing solution for this but it's not very well maintained. Anyway as you can see it ended up being pretty simple.

    Et voila! Desktop app.

    enhancement 
    opened by jacobstern 2
  • Remove daemonize dependency to allow building on Windows

    Remove daemonize dependency to allow building on Windows

    The only thing keeping the project from building on Windows was the daemonize dependency, which wasn't being used. Unless you have future plans for it?

    opened by bsinky 1
Releases(v0.2.0-alpha.8)
Owner
Tsiry Sandratraina
Software Engineer, enjoy using Go and always keen to learn new things. I love to simplify and create user-friendly tools. 9CE9 3A9A 43D8 ED4A
Tsiry Sandratraina
A Rust Boilerplate server with GraphQL API, Diesel, PostgreSQL, session authentication and JWT

Canduma rust Graphql A Rust authentication server with GraphQL API, Diesel, PostgreSQL session authentication and JWT This repository contains a Graph

Julien Lenne 738 Dec 28, 2022
Rust GraphQL server using simple type-only schema

SimpleGQL This library allows a simplified GraphQL schema to be given and will run a server with a backend store (currently only SQLite) and a set of

Daniel Cocks 5 May 10, 2023
Rust server with Axum, GraphQL and SurrealDb

??️ Article on my web Axum server, Async-GraphQl, SurrealDB template Run without any prior setup, DB is in memory: cargo run To use routes other than

null 15 Jun 26, 2023
Markdown LSP server for easy note-taking with cross-references and diagnostics.

Zeta Note is a language server that helps you write and manage notes. The primary focus is to support Zettelkasten-like1, 2 note taking by providing an easy way to cross-reference notes (see more about features below).

Artem Pyanykh 4 Oct 27, 2022
A super-easy, composable, web server framework for warp speeds.

warp A super-easy, composable, web server framework for warp speeds. The fundamental building block of warp is the Filter: they can be combined and co

Sean McArthur 7.5k Jan 2, 2023
REST API server that abstracts the need to write CRUD methods by exposing a standardized API to interact with a Postgres database

Basiliq Exposing a Postgres database via a REST API that follows the JSON:API specs. All in all, a tasty API. What is Basiliq Quickstart Ready to use

Basiliq 54 Apr 21, 2022
Hot reload static web server for deploying mutiple static web site with version control.

SPA-SERVER It is to provide a static web http server with cache and hot reload. δΈ­ζ–‡ README Feature Built with Hyper and Warp, fast and small! SSL with

null 7 Dec 18, 2022
Proxies all incoming connections to a minecraft server of your choosing, while also logging all ping and login requests to a json file and discord webhook.

minecraft-honeypot Proxies all incoming connections to a minecraft server of your choosing, while also logging all ping and login requests to a json f

Cleo 19 Jan 4, 2023
An adapter to easily allow an Axum server to be run within a Cloudflare worker.

axum-cloudflare-adapter An adapter to easily allow an Axum server to be run within a Cloudflare worker. Usage use worker::*; use axum::{ response

Logan Keenan 4 Feb 28, 2023
An async no_std HTTP server suitable for bare-metal environments, heavily inspired by axum

picoserve An async no_std HTTP server suitable for bare-metal environments, heavily inspired by axum. It was designed with embassy on the Raspberry Pi

Samuel Hicks 81 Oct 7, 2023