this post was submitted on 23 Jul 2023
192 points (97.1% liked)

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

55085 readers
297 users here now

⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.

Rules • Full Version

1. Posts must be related to the discussion of digital piracy

2. Don't request invites, trade, sell, or self-promote

3. Don't request or link to specific pirated titles, including DMs

4. Don't submit low-quality posts, be entitled, or harass others



Loot, Pillage, & Plunder

📜 c/Piracy Wiki (Community Edition):


💰 Please help cover server costs.

Ko-Fi Liberapay
Ko-fi Liberapay

founded 2 years ago
MODERATORS
 

cross-posted from: https://zemmy.cc/post/25499

You may have seen my previous post over here, after I had just gotten everything setup initially.

I've now expanded this with an additional script, a github repo, and proper documentation.

Here's a cleaner explanation:

I've taken on the challenge of self-hosting more of the services I regularly depend on. The latest target is Spotify. This meant I needed a simple and convenient way to listen to my music from anywhere, get new music into my collection, and also still receive recommendations based on my interests and listening habits.

I now have what I think is the pretty ideal setup, here's what it includes:

  • A 24/7 radio station that plays my entire catalog (link here if you're interested). This is powered by Azuracast along with the scripts in the repo. The station link is using the Public Pages feature in Azuracast with a bunch of custom CSS.

  • A Spotify-like experience that also supports mobile and offline. This is powered by Navidrome for web/desktop and Substreamer for mobile. Substreamer connects to Navidrome using the Subsonic API.

  • A couple of scripts that allow me to easily download tracks/albums/playlists from Spotify and Youtube. I used these to bootstrap the collection and export my existing playlists from each service.

  • A couple of scripts that automatically grab my latest recommendations from Spotify and LastFM, add them into Navidrome, and provide me a nearly fully automated way to parse out tracks I want to keep permanently.

That last point is the most interesting part in my opinion. Both scripts run on a weekly cron job that downloads my Discover Weekly playlist from spotify, and current recommendations from LastFM. It then creates a playlist for each source for that weeks collection and moves it into Navidrome.

I then browse that weeks playlist at my leisure, using the "star" feature in Navidrome to decide what to keep. Once I'm done I run another script manually that takes all of the starred tracks from those two playlists and moves them into my catalog, and then deletes the remaining tracks and the playlists.

This means I just need to go through and listen to recommendations and click a button on what to keep, and the rest is discarded automatically. It really doesn't get any simpler than this!

What remains will then be available for on-demand playback through Navidrome and also added to the full catalog that powers the 24/7 radio station.

FAQs from the last thread

What is being used to download from X? - spotdl is being used for Spotify.pytube is being used for LastFM and Youtube. spotdl is also just downloading tracks from Youtube under the hood.

What is the audio quality of the downloaded tracks? - Since these are coming from Youtube, everything is a 128kbps VBR Opus codec. It's certainly not FLAC but it's good enough for my enjoyment.

top 28 comments
sorted by: hot top controversial new old
[–] [email protected] 22 points 1 year ago (1 children)

This is awesome. I’m gonna save this and unfortunately probably do nothing with it. It’s something I’d like to do but I don’t listen to a whole lot of music and spotify is cheap enough it’s not worth the effort for me. But this is quite impressive.

[–] [email protected] 15 points 1 year ago

This is awesome. I'm gonna save this and unfortunately probably do nothing with it.

I relate to this so hard

[–] [email protected] 11 points 1 year ago (2 children)

128kbps VBR

So...early 90s quality? 😬

[–] [email protected] 6 points 1 year ago (1 children)

It's good enough for my purposes, which mostly involve streaming it over 96kbps for playback on wireless headphones. It's a small price to pay for the convenience of the automation.

[–] [email protected] 8 points 1 year ago (2 children)

So 128kbps transcoded to 96kbps? Seems like quite a significant price to pay, but whatever you're happy with works for you :)

[–] [email protected] 2 points 1 year ago (2 children)

You'd be hard pressed to find the difference.

[–] [email protected] 1 points 1 year ago

I never have been able to, even while wearing wired studio monitors

[–] [email protected] 1 points 1 year ago (1 children)

Transcoding kills audio but whatever :)

[–] [email protected] 1 points 1 year ago

It depends on how many layers of transcoding is happening. Listening to a random file, you won't be able to tell wether is 320 or 128 just by listening to it.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

I've honestly never been able to discern a difference in quality between 96kbps and 320, even while wearing my ATHM50's, maybe my hearing just sucks. 🤷‍♂️

Azuracast let's me stream up to 320, but I choose to use 96 to save bandwidth.

[–] [email protected] 0 points 1 year ago (1 children)

Opus is way better than MP3 and even AAC at the same bitrate

[–] [email protected] -1 points 1 year ago (1 children)

Keep telling yourself that 🤣

[–] [email protected] 0 points 1 year ago* (last edited 1 year ago) (1 children)
[–] [email protected] 7 points 1 year ago (1 children)

Very interesting, how does Spotify and LastFM get your listening habits to create the recommended lists?

[–] [email protected] 7 points 1 year ago

Spotify pretty much has them down from my years of use. Even if you're not coming back and listening regularly it will still update that playlist every week.

LastFM is getting my actual up to date listening habits as I use their scrobbling service with my music clients, including Navidrome.

[–] [email protected] 7 points 1 year ago* (last edited 1 year ago) (1 children)

Since these are coming from Youtube, nearly everything is a 320kbps MP3.

Where are you getting that format and quality from? I use youtube-dl and non-premium audio for everything is ~128kbps VBR Opus, which aligns with other sources I can find. If I use Premium then I can get up to ~256kbps m4a but still not 320 and I see no mention of 320 availability online. Is there a trick you are using?

[–] [email protected] 5 points 1 year ago

That was my mistake, and I'll edit the post. I just verified that you are correct by checking a random subset of the MP3's I have. I clearly got wrong information from somewhere.

[–] [email protected] 4 points 1 year ago (1 children)

We will watch your career with great interest, young Skysinger.

Great work, and an excellent tool for those looking to create their own online radio stations.

[–] [email protected] 6 points 1 year ago (1 children)

I'm a dev of nearly 20 years, but all of this was written by ChatGPT as described in the repo readme 😅

https://github.com/Zetaphor/personal-auto-radio#created-by-chatgpt

[–] [email protected] 5 points 1 year ago

We will watch your domination of the airwaves with great interest, ~~young~~ old Skysinger.

[–] [email protected] 3 points 1 year ago (1 children)

Thanks for posting this! Just what I was looking for more that YouTube music pricing is going up for me and so is Spotify.

[–] [email protected] 2 points 1 year ago (1 children)

It's worth noting that on android, you can use Revanced Manager to patch the Youtube Music app to get almost all of the premium features for free.

revanced.app

Only thing you can't do is the local downloads for when your service is crap.

[–] [email protected] 1 points 1 year ago

Oooh, thanks!

[–] [email protected] 3 points 1 year ago (1 children)

Nice write-up. Not really for me as I prefer to keep my library made up of whole albums and min. 320kbps since I ditched Spotify.

Check out Symfonium if you haven't and you're using Android - it's by far the best subsonic client I've used.

[–] [email protected] 2 points 1 year ago

Substreamer is working well for me, and additionally it's free.

[–] [email protected] 1 points 1 year ago

Interesting! I've been thinking about doing something similar with Youtube videos, make a little fake TV channel. I'll definitely be taking a look through your code.

load more comments
view more: next ›