all repos — site @ f66c2c121ae3edd04ec3b8ca9b960cd9f632d8aa

source for my site, found at icyphox.sh

pages/txt/music-streaming.txt (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
   13 December, 2020

My music streaming setup

Think Spotify, but self-hosted and not as good

   Having a self-hosted, centralized music streaming setup has been on my
   todo list for the longest time. I'd initially tried using NFS, but
   mounting it on my phone was very inconvenient. Incidentally, a few days
   ago, the existence of Subsonic/*sonic became known to me.

gonic

   I found [1]gonic to be the simplest of them all, and proceeded to set
   it up on the RPi. There are other alternatives too, like [2]Navidrome,
   which ships with a web player, or [3]Airsonic. gonic stood out the most
   to me because it's effectively headless, barring a simple web interface
   for configuration.

   Setting it up was trivial. I did run into an [4]issue -- I noticed that
   only songs that were already in folders, sorted by album, were being
   picked up in the scan.
|-- Void Of Vision - Hyperdaze (2019)
|   |-- 01. Overture.mp3
|   |-- 02. Year of the Rat.mp3
|   |-- 03. Babylon.mp3
|   |-- 04. If Only.mp3
|   |-- 05. Slave to the Name.mp3
|   |-- 06. Adrenaline.mp3
|   |-- 07. Hole In Me.mp3
|   |-- 08. Kerosene Dream.mp3
|   |-- 09. Decay.mp3
|   |-- 10. Splinter.mp3
|   |-- 11. Hyperdaze.mp3
|-- Volumes - Disaster Vehicle.mp3
|-- Volumes - Finite.mp3
|-- Volumes - Heavy Silence.mp3
|-- Volumes - Hope.mp3
|-- Volumes - Interlude.mp3
...


   So, in a directory tree like above, only the tracks inside "Void Of
   Vision - Hyperdaze (2019)" would get picked up, and all the "Volumes"
   songs wouldn't -- since it wasn't in a subfolder of its own.

   As a workaround -- and a necessary cleanup of my music -- I figured I'd
   give [5]beets a shot.

beets

   beets is extensively documented, so I'll skip the basics. In essence,
   it's a music organization tool -- fetches tags, sorts your collection,
   etc. Most of my music has been tagged already, so I skipped that. I
   only it all to be grouped by album. A bit of digging in the docs, and I
   found what I wanted: --group-albums.

   And in my config.yaml, I specified my desired path format like so:
...
paths:
  default: $albumartist - $album%aunique{}/$track $title

   Finally, running:
$ beet import --noautotag --move --group-albums path/to/dirty/music

$ tree ~/music
...

104 directories, 1108 files

   Nice! gonic then happily scanned all my music.

actually streaming this music

   On my laptop, I decided to just use the NFS share approach -- primarily
   because I'd like to stick to cmus and desktop Subsonic clients like
   [6]Sublime Music are very clunky.

   On Android, there are quite a few options on F-Droid -- I decided to go
   with [7]Ultrasonic since it's the only one that supports Last.fm
   scrobbling.

   All things considered, I think I'm pretty satisfied with this. `twas a
   good weekend.

References

   1. https://github.com/sentriz/gonic
   2. https://www.navidrome.org/
   3. https://airsonic.github.io/
   4. https://github.com/sentriz/gonic/issues/89
   5. https://beets.io/
   6. https://gitlab.com/sublime-music/sublime-music
   7. https://github.com/ultrasonic/ultrasonic