Music player with IPFS backend

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!

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

@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

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:

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:

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

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.

@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

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

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

hi,

i found your approach very intresting :+1:

Regards

1 Like

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ā€¦

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.

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ā€¦

What was the problem?

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

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?

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

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:

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/