Skip to content

GMMA is a modular music & video server with a complete and beautiful frontend. Host your own server, we'll handle the UI.

Notifications You must be signed in to change notification settings

klashdevelopment/gmma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mediaslay

Logo

Mediaslay is a modular music & video server with a complete and beautiful frontend. Host your own server, we'll handle the UI.

Demo Video

brave_1C5MhqBchD brave_uwgmBSmKqg brave_1vr0PgpF8f

Setup - Backend Info

Clone the repo, and head into the gmma-backend folder. You'll want to host this one yourself. It's a simple npm i and npm start. The minimum supported device is a Raspberry Pi 5, which can handle audio encoding and playback for one or two people max. Videos & song may take ages to download. I reccomend an old laptop, sleeper PC, or a Mac Mini.

IMPORTANT: Install FFMPEG on your machine before hosting! Some features may not function without it (YouTube downloads, playback on some elements). You can set your FFMPEG path in the config, but it is not required. YtDlp may detect it automatically.

IMPORTANT: To fix 403 or other errors when youtube downloading, delete the 'bin' folder every once in a while to update YtDlp.

Setup - Backend APIs

Rename config.json.example to config.json and read below. Let's go one by one to see what APIs need setup and which ones are free.

Genius (Recommended) - API Client needed
Test Endpoint: /api-tests/genius

Genius is used for plain lyrics, but mainly HD artwork & song info. You'll need to obtain a Genius API client and gather the client ID, client secret, and access token. These can all be inputted into the config.

Spotify - SP-DC Needed
Test Endpoint: /api-tests/spotify

Spotify's api is used for good quality search, playlist & album importing, and most importantly, synced lyrics for most songs.

Spotify's color-lyric api has a bypass so that no authentication is required from the user. In order for it to work, you need to input an SP_DC key into the config. You can find your personal SP_DC via a guide here - this only needs to be inputted once to work. Please note that this may not work 100% of the time as spotify has been going after OSS projects that find Spotify's auth keys. We rely on a few of these, so if they go down at all, check back to see if a fix has been published.

Apple Music - MediaUserToken Needed
Test Endpoint: /api-tests/applemusic

Apple Music's bypass API is used to fetch song, album, and artist metadata without paying $100/year to a red fruit. You need a media_user_token, which (similar to spotify's SP_DC) can be found by logging into music.apple.com and using Cookie Editor to find the correct cookie. Put this into config.json.

Apple provides two seperate api returns depending on if your account is a subscriber or not. If you are, you can get lyric data from Apple Music (*not implemented yet as I don't own apple music), and if not, you still get 4k & animated cover art with your songs.

Musixmatch - No setup
Test Endpoint: /api-tests/musixmatch

Musixmatch is used for Rich Sync word-by-word lyrics, synced lyrics, plain lyrics, and some searching. It requires HIGHLY specific format for the bypass to work, and I'm not sure how they 100% sanitize text, so don't be alarmed if you spot an error here or there. Pay attention to the Musixmatch API Test inside the frontend settings, or visit the backend endpoint /api-tests/musixmatch to check if it's working. If it's not, leave an issue here on GitHub with any server logs.

Lyrics.ovh - No setup
Test Endpoint: /api-tests/ovh

Lyrics.ovh is a great open-source lyric library for plain lyrics. It can be a bit slow at times, however it is 100% open source and free, without a bypass.

LRCLIB - No setup
Test Endpoint: /api-tests/lrclib

LRCLIB is the best option to fall back to. They provide synced and plain lyrics at zero cost with a very generous no-auth API. Decently fast, but goes down now and then.

iTunes - No setup
Test Endpoint: /api-tests/itunes

iTunes provides a free, yet extremely basic API for scraping song metadata. It's used for song search.

TheAudioDB - No setup
Test Endpoint: /api-tests/audiodb

TheAudioDB provides a free API for artist searching. Their default api key isn't super generous so don't be alarmed if you have a multiple-user backend and it fails.

Setup - frontend

Visit our frontend and enter your server URL, or host your own via npm start in the gmma folder.

todo

  • DONE Backend: Switch to yt-dlp execution from @distubejs/ytdl-core as its deprecated.
  • Backend: Switch from fluent-ffmpeg to custom ffmpeg dl & wrapper. (Low priority until ffmpeg args change.)
  • DONE Frontend: Lyric inputting for manual lyrics, syncing feature, cached lyrics so less API calls.
  • DONE Backend: add codec detection besides just Pi! nvenc for nvidia gpus!
  • App: Create iOS app build and publish to store via Hack Foundation

About

GMMA is a modular music & video server with a complete and beautiful frontend. Host your own server, we'll handle the UI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published