The easiest music streaming server available
Go to file
2016-12-02 00:09:57 -05:00
jplayer A lot of CSS tweaks and improvements. 2016-09-10 12:58:42 -04:00
modules Fixed broken API endpoint 2016-12-02 00:09:57 -05:00
public The server portion works. Need to finish the database building and import tools 2016-11-28 22:13:31 -05:00
untitled folder The server portion works. Need to finish the database building and import tools 2016-11-28 22:13:31 -05:00
database-private-beets.js WIP - everything is broken 2016-11-20 16:52:44 -05:00
Dockerfile Added Dockerfile and modified README 2016-08-26 09:33:39 +02:00
mstream.js All core functions work. Some secondary functions are still broken or missing 2016-11-30 16:46:19 -05:00
package.json The server portion works. Need to finish the database building and import tools 2016-11-28 22:13:31 -05:00
README.md All core functions work. Some secondary functions are still broken or missing 2016-11-30 16:46:19 -05:00

mStream

mStream is an music streaming server written in NodeJS. It's focus is on ease of installation and FLAC streaming. mStream will work right out of the box without any configuration.

Live Demo

Check it out: http://darncoyotes.mstream.io/

Main Features

  • Supports FLAC streaming
  • DB Plugin System. Use SQLite, MySQL, LokiJS or roll your own custom DB system
  • Works on Mac, Linux and Windows
  • Integrates easily with Beets DB
  • Allows multiple users

Installation

Windows Executable

There is work being done to port mStream to a Windows Executable. Check out the prototype here: https://drive.google.com/file/d/0B1oiqEsIbjFidk8tVjR0TmZIb0k/view?usp=sharing

Default

mStream has the following dependencies:

  • NodeJS and NPM
  • Python 2
  • GCC and G++

Once have all the dependencies you can install and setup mStream by doing the following

npm install -g node-gyp
npm install -g mstream

cd /path/to/your/music

mstream

Make sure it's working by checking out http://localhost:3000/

Install on Ubuntu

Copy and paste the following commands:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

sudo apt-get install -y build-essential

sudo npm install -g node-gyp

Using Docker

Download the Dockerfile, or clone the repository, then run the following commands:

docker build -t local/mstream .

docker run --rm -v /path/to/my/music:/music local/mstream

The ENTRYPOINT is mstream, so you can use the same option as if using the default installation.

docker run --rm -v /path/to/my/music:/music local/mstream -l -u username -x password

Options

-p, --port           -> set port number
-l, --login          -> enable user login
-u, --user           -> add user
-x, --password       -> set Password
-G, --guest          -> set guest username
-X, --guestpassword  -> set guest password
-d, --database       -> set the database file
-t, --tunnel         -> tunnel
-g, --gateway        -> set gateway for tunnelling
-i, --userinterface  -> use an alternative UI.  Currently only the value 'jplayer' works

User System

The current user system is a simple as it comes. There are two users you can have, main and guest. Guest users do not have any access to API functions that write to the file system. Currently guest users cannot access the save-playlist, recursive-scan, or delete-playlist functions

mstream -l -u [username] -x [password]

The user system is simple for a few reasons. First, I wanted to have a user system that doesn't need a database to work. Secondly, mStream is a personal server and most users don't need anything more complex than this.

Database

mStream currently uses a SQLite database for a music library. You have the option of using a beets DB or having a mStream create it's own DB.

Beets DB

http://beets.io/

mStream can use your beets database without any configuration.

mstream -d path/to/beets.db

Currently using beets is the recommended way to create a music database.

use mStream to build your DB

Use the /db/recursive-scan API call to kickoff a full scan of your library. Currently this is the only way to add files to the library. Version 2 of mStream will include new functions to update the library more efficiently

Automatically setup port forwarding

Please note that this feature is still experimental

mStream can try to automatically open a port to the internet. Use the '-t' command to try to setup port forwarding. Additionally you can use the '-g' command to set the gateway IP manually. If you don't include '-g', the program will use an extension to try to figure it out

mstream  -t

OR

mstream  -t -g [gatewayIP]
mstream musicDirectory/ -t -g 192.168.1.1

Please note that not all routers will allow this. Some routers may close this port after a period of time.

Known Issues

  • Does not work on 32bit versions of Linux. The sqlite3 library will not compile on 32bit Linux
  • Only works on Node v4 or greater

TODO

  • Album Art
  • Reset Password Functions
  • Ability to store hashed passwords
  • Scripts that help construct configs
  • MySQL DB plugin