nuclear icon indicating copy to clipboard operation
nuclear copied to clipboard

Internet Archive and M3U support

Open TWINGSISTER opened this issue 3 years ago • 10 comments

There is a wealth of music on Internet Archive (IA) , (and that's obvious). Less obvious is the fact that it is not organized as just the dump of WAVs in CDs. Songs are carefully presented as individal mp3. What is even more incredible is that you can put a .m3u list (readily available on IA) pointing to these mp3 in a player like Clementine and IA has enough bandwidth to send it just in time for Clementine to play. So i tried to put in Nuclear search bar or in the URL import this e.g. https://archive.org/download/u2-the-joshua-tree/u2-the-joshua-tree_vbr.m3u but nothing happens. Any idea?

Originally posted by @TWINGSISTER in https://github.com/nukeop/nuclear/issues/616#issuecomment-1229175807

TWINGSISTER avatar Aug 27 '22 11:08 TWINGSISTER

We don't have support for m3u nor importing via the search bar.

nukeop avatar Aug 27 '22 12:08 nukeop

Thanks for the prompt reply! I find that Internet Archive has a lot to offer so the first question is can you point out some docs on how to add this (IA access and M3U import) in a plugin? I read the docs about plugin interface but I miss some examples on how to deal with Nuclear internals and architecture. In particular I do not completely understand what is the role of nuclear-web-services. Can one embed the player in a HTML page?

TWINGSISTER avatar Aug 27 '22 13:08 TWINGSISTER

For m3u support, I think Nuclear would first get local files to play: #1008 (I also mentioned m3u playlist support there).

mYnDstrEAm avatar Aug 30 '22 11:08 mYnDstrEAm

M3u import and export would be great and very useful. This way you could easily open your existing playlists. Should this be a separate issue and is it planned for an upcoming release?

mYnDstrEAm avatar Oct 01 '22 15:10 mYnDstrEAm

I don't think this would work, because we can't store paths to streams. Can m3u have a playlist with only metadata?

nukeop avatar Oct 01 '22 17:10 nukeop

I don't know if m3u can store paths to streams, that may be possible too. In any case you wouldn't need to store the particular stream but only the track title. If you don't just import m3us but also allow saving/exporting to m3u files, it probably wouldn't be much of a problem if other music players can't play some of the tracks in the playlist (these tracks can or would display as faulty).

Moreover, it's not needed anyway: this would already be immensely useful if you could just import M3Us to start a new playlist which at first only has local tracks. You can then also add streams and save it as a playlist in another format.

mYnDstrEAm avatar Oct 01 '22 17:10 mYnDstrEAm

Thanks for your renewed interest. From my point of view I just need to import these .m3u, from Internet Archive, that points a wealth of mp3 tracks, e.g. https://archive.org/download/u2-the-joshua-tree/u2-the-joshua-tree_vbr.m3u and have the single URL stored in Nuclear. Nuclear proves to be able to play mp3 just storing the URL. The second step would be to compile a playlist into a similar m3u citing just URLs to mp3. This will enable to exchange playlists without copyright infringement and would be a basis for a royalty free Internet radio. The access to YouTube in Nuclear is great and could be enough for most practical purposes yet I wonder if this is going to last because in this way they cannot show ads and they probably wouldn't like to have server working for this. Nevertheless what you can find in Internet Archive is just unbelievable and goes beyond YouTube including a lot live recordings and 78 rpm dumps. So i think it is valuable to import URL entries from m3u. Will try this to build a plugin for this when will find some time

TWINGSISTER avatar Oct 02 '22 10:10 TWINGSISTER

The one you linked to is unavailable.

Normally you can't store urls to streams in the playlist because they're unstable, and need to be retrieved at runtime when the track is added to the queue. I don't know if it's possible to store extra metadata (stream source) in this format, or if it's possible to have a track without a stream url.

The access to YouTube in Nuclear is great and could be enough for most practical purposes yet I wonder if this is going to last because in this way they cannot show ads and they probably wouldn't like to have server working for this.

Youtube-dl and similar programs are as old as youtube, and they will keep working forever, because their advertising model locks them into having to serve ads from a separate server. To change this would require some pretty fundamental changes to the way ads work on youtube.

Nevertheless what you can find in Internet Archive is just unbelievable and goes beyond YouTube including a lot live recordings and 78 rpm dumps.

Can you search this from a script? E.g. can you find a stream for a song given an artist/title pair? And are those stream urls stable?

nukeop avatar Oct 02 '22 11:10 nukeop

Yeah, given the proposed use case, Internet Archive would definitely fit a Stream Provider plugin, provided heuristics to successfully identify a streaming url based on artist/title. Although I knew it was a thing, I haven't used or searched within the IA much myself.

a0kami avatar Feb 08 '23 19:02 a0kami

I'd rather expand the search box so that you could paste an m3u link into it and load it as a playlist (display it or add to the queue). It would be hard to use it as a general use stream provider because a lot of stuff retrieved from e.g. discogs would be unavailable.

nukeop avatar Feb 08 '23 19:02 nukeop