Music player with IPFS backend

ipfs-cluster
go-ipfs
#21

That works. Not sure how I missed the instructions the last time around. Thanks for pointing it out so kindly.

As a simple music player, your site is nice, clean, and easy, even if it isn’t packed full of features. It’s good work. Can I ask where you go from here? What’s the intended use?

You now have a bunch of ID3 and filename data correlated to hashes. Will you make that usable to others? If so, how?

Good luck!

#22

No problem and thanks for the feedback! :relaxed:

I’m not 100% sure where I’ll go from here, but I do know that:

  • I’ll add the ability to upload files as well
  • It should be really easy for people to copy their IPFS hashes, share it with people and then play the music with the app
  • Proper integration with the Blockstack platform (currently in development)
  • Add more features like playlists and a album-art view

As far as the data goes (the id3 and filenames which you mentioned), I don’t have access to that at all. The application is completely client-side and the data collected is completely in the user’s control.

Thanks again!

1 Like
#23

@flyingzumwalt already answered it well, but one addendum, because you asked for the publishing key. That’s the key a user would generate in his client software to publish metadata, playlists etc. (maybe even songs for download) on ipns. The go-ipfs equivalent is ipfs key gen --type=rsa --size=2048 mykey. The key “mykey” will then be saved to your ~/.ipfs directory, and you can then publish using that key, instead of using your PeerID. You can create as many keys as you like, e.g. if you want to share metadata/playlists etc. with different friends, you can create one publishing key & one ipns publication per friend sharing linkup. Then you just need to share that publishing key with the people you’ve linked up, and for that key-sharing operation, the key needs to be transferred encrypted, and for that a public-private key cryptography would be the best way. (Simple S/MIME with openssl would probably suffice.) You also need to account for the situation when one user leaves or is kicked out of a sharing group: then your app needs to remove that key again, i.e. it has to be stored locally in encrypted form as well, but this time the encryption is only known to your app, not to the user, i.e. the user won’t be able to just snatch the key from the Application Support folder before leaving the group. :wink:

PS: what you put into the ipns directory should be encrypted too. And that would complicate things, if multiple users share that directory, if users are added, if others leave etc.

1 Like
#24

Thanks for the awesome explanation @JayBrown! I really appreciate it!
It’ll be quite a challenge to implement this, but I’ll see what I can do :sweat_smile:
It certainly has a lot of potential :open_mouth:

#25

Ok, here’s my first attempt at writing down something that would work for my application. It’s definitely not as refined as what you described, but I’m slowly getting there :stuck_out_tongue_winking_eye:

Thoughts?

PS. I know that it isn’t very secure (yet), but I’m trying to wrap my head around the basic idea :sweat_smile:

#26

Hi!

I’m still very excited for this! I’ve been wanting something similar.

A) Is there a way for my server to add files to my library? Use case: having my mqtt-controlled cloud-dwelling bestie receive a song web address, rip it via youtube-dl or similar, push it to ipfs/AWS, and put it in my library. Only required input is sharing the link on the relevant mqtt topic.

b) could a server modify my queue on my phone or laptop? I.e. have a recommender system of my own on my server be able to dynamically live-recommend songs into my queue

C) could this run on a phone? I.e possibly by

  • using pre-populated local storage in a folder, and other software (synching) actually batch updating the folder when on WiFi & plugged in
  • pulling from AWS, caching locally
    • using IPFS on the phone (not yet afaik)

D) the songs are stored not-encrypted, correct? It’s only the personal info that is encrypted like AWS keys and blockstack stuff?

1 Like
#27

Thanks @haniawni!

A - Part 1 :: I’m not sure what you mean by ‘server’, this application is client-side only (html + javascript). There is no backend/server. It connects to remote sources in the browser itself, finds all the music files on it, gets the metadata from those files and then stores that metadata somewhere (ie. localStorage, Blockstack storage or something else). I’m also working on IPNS support, but IPNS in go-ipfs is hella slow at the moment…

A - Part 2 :: I’m not sure if I understand your use case entirely, I have no idea what ‘mqtt’ is. But I can say that file uploading is planned for the future. Then you’ll be able to upload files from inside the app directly to your storage. Does that answer your question?

B :: That’s not possible no. Maybe someday?

C :: Only using the “anonymous” mode at the moment. Blockstack is still working on iOS support. So at the moment you can login using the anonymous mode, and then add a remote ipfs hash or AWS S3 bucket/directory.

D :: Like I described in my answer for A, the songs are not copied/stored, the app only extracts the metadata and stores that. Your files stay where they are.

Thanks for all the questions! Let me know if I missed something or if something wasn’t clear.

PS. There’s also the about page, which you can find here http://ongakuryoho.com/about/ But I now realize that I probably should explain it a bit better.

#28

@icidasset

This is an awesome project a little bit ago I was working on something similar with videos it only incorporates the local storage solution you have with the anonymous login.

I wonder if it wouldn’t be worth while to incorporate video into your project too.

Video Player Sample App

#29

Thanks! I don’t plan on adding support for videos, but feel free to fork the project and customise it however you see fit: https://github.com/icidasset/diffuse

#30

By the way, if anyone is still interested, the app is now called Diffuse and can be found at:

https://diffuse.sh/

The github repo has native versions you can download, see releases page.
Any feature requests can be made on the issues page.

2 Likes
#31

hi,

i found your approach very intresting :+1:

Regards

1 Like
#32

I made a [REC] Machine for wedradio streams recording (https://www.copylaradio.com French as we pay a tax for keeping our private copy right, this machine is legal). It uses youtube-dl on a Pi Zero W

I am looking for a way to make that Radios interconnected.
I am gonna try ipfs-cluster.

I still try to figure out how to use your song meta index…

#33

That looks cool!
If you do end up using ipfs(-cluster) for that, I’d love to read about your experience.

I still try to figure out how to use your song meta index…

Not sure if you were addressing me with this statement, if so…
Let me know what you exactly have problems with.

#34

My first ipfs-cluster setup has not been succesful yet… But I have arm, arm64 and amd64.
Going to try in a more regular way…

I was wondering if you ever use beets and beet-ipfs plugin
https://beets.readthedocs.io/en/v1.4.7/plugins/ipfs.html?highlight=ipfs

For me it seems to work (logging is good) but I couldn’t find how to get ipfs reference then and any easy way to share my music library…

#35

What was the problem?

#36

Even sharing same secret, cluster nodes didn’t connect.

ipfs-cluster-ctl peers ls
QmYQJExSsv29GFJ3U59jgozAbUvDoF6VUFMWNeAnj89ed3 | rock64 | Sees 0 other peers

Maybe I didn’t wait enough, or architecture storage and processors are too different (16GB RpiZeroW, 32GB RPI3B+, 5TB Rock64, 200GB amd64)
The more I discover IPFS, the more I think this is ENORMOUS! It can really replace so much tools in one.

Now I am trying to share my Music library between my computers with CLI first.
I wanted to use cluster to have an automatic sync, but I mostly need to have repository CID distributed.
I must figure out how to keep a permanent reference to a changing dataset…
And how to host a Web GUI for it

#37

diffuse.sh is a So Great Network Magic?
Some browser based executed code (js) which files are hosted inside IPFS swarms and redirected by DNSLink?
Am I right?

#38

Did you bootstrap one to the other as shown in https://cluster.ipfs.io/documentation/quickstart/#step-1-add-new-members-to-the-cluster ?

#39

Difuse is a static html page (aka. a static site) with javascript, hosted on Netlify. Alternatively, there’s a native app which is basically the same but you can use it offline. Nothing fancy. In the application you can add a “source” of music, which can be IPFS, among other options. It scans the metadata from files/directories you added (or linked if you will), you get a list of all the music you added and then you can play the music.

In V2, you’ll be able to store the application data as well on IPFS, encrypted that is.

No further associations with IPFS.
I hope that clears things up :v:

#40

Yes I followed it… But I didn’t investigate enough to know where the problem was.
ipfs dht findpeer QmYQJExSsv29GFJ3U59jgozAbUvDoF6VUFMWNeAnj89ed3 could have helped

I’ll come back later on that cluster mode…
I am studying how to add a directory to IPFS and still be able to change files in it but be sure to keep access with same CID to all sub datastructure… https://docs.ipfs.io/guides/examples/websites/