I2music : JS-Free music player, with torrent packing/indexing

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: I2music : JS-Free music player, with torrent packing/indexing

Re: I2music : JS-Free music player, with torrent packing/indexing

by cumlord » Mon Mar 03, 2025 8:52 pm

thanks for the input anon! glad it mostly worked, i'm still trying to find a good balance for tunnels and compression, but i'm glad it at least sounds good. trying some stuff for the stuttering issue, maybe 64k is just a little too high for i2p.

it was made with the intention of being a private frontend where you'd share your own music, and it probably needs some work to make it easier to deploy. Hadn't really considered making it a public thing for people to upload. Not opposed to it completely, my main concerns are attack surface and..sounds hard lol. Maybe a kind of middle ground where certain people are given access to upload? so people could share an instance

it does delete the original file on converting. right now it has an "exclude list" which will just skip the playlists in that list from being encoded. It should skip .ogg/opus tracks, but you reminded me i didn't give it any logic for other formats or bitrates....i need to take another look at that. For encoding you can chose the bitrate/format in config but i think it will probably re-encode everything if you already did some with another format like mp3 and don't put it in exclude list

going to be working on the metadata thing, that would be good to have. i redid the way it stores track information, think i should be able to tack metadata in there.

Re: I2music : JS-Free music player, with torrent packing/indexing

by Anon » Mon Mar 03, 2025 7:48 pm

64kb/s opus stutters sometimes but sounds very high quality to me, I'm surprised you're able to load the file as fast.

Is this going to be only a simple private frontend for the webmaster to upload his own music or will it be a public instance thing where multiple people can upload music on one instance? Does it also delete music after converting because it sounds like a lot of unnecessary space could be used up, especially if you're converting from FLAC. I think it would be also good if there there was an option to not encode your music especially if you already have them encoded in opus at around the same bitrate or any other format that's equivalent to opus 64kb/s..

I think it would also be cool to be able to browse music through the metadata like genre, artist and album.

I2music : JS-Free music player, with torrent packing/indexing

by cumlord » Mon Mar 03, 2025 5:50 pm

Image
Leopold wanted to find a way to have music on an eepsite without needing JS, or loading all of the audio files at once. For those of you that have used the save feature on simp.i2p, it works by using a tiny iframe as the number. This was done to avoid refreshing the whole page. You can get some limited interactivity with iframes like this, so i thought i could do the same sort of tricks for a music player without js.

It uses 4 iframes, left for track list, middle for the music/album art, top right for settings, bottom right for info. It loads the next track by using meta refresh and loading a new html page in the player iframe.

There's fully automaged audio compression/torrent creation functionality for each playlist with scraping, borrowing code from simp.i2p. You place media and image files in a directory under "/static/playlists".

If the options under "[torrent]" in the config file are enabled, running

Code: Select all

python3 updateplaylists.py

will compress all found media files (including video) for audio playback in i2p, make a torrent, and send it to your torrent client for seeding. The webapp will show a magnet link and link to download the .torrent file.

If scraping is enabled it'll show peercounts, pulling from all trackers in the "tracker_list" (also used for hashing torrents). Scraping needs to use an i2p http proxy to work.

The steps updateplaylists.py takes:
- search all playlist directories for media files and images (ignores previously converted items)
- compress all found media files to a given codec as set in "[audio_settings]", default is 64k opus as ogg for browser playback, using ffmpeg. This will accept major video formats too.
- convert any images to progressive jpeg
- hash a .torrent file for each playlist (all contents of the directory will be hashed)
- create a symlink from the playlist data folder to a torrent client watch directory (for seeding, to avoid needing 2 copies of the media files)
- copy the .torrent files to your torrent client watch directory
- creates data.json file of the tracks for the webapp to use

Input appreciated, it's in testing

Source code: http://git.simp.i2p/simp/i2music
Live test instance: http://u327ny5s3a2qy2tgeiwr3yvfhoz3lhc7 ... a.b32.i2p/

Top