EDIT: I found a better and faster way to stream from bandcamp thanks to mpv!
The process is pretty much the same as mpv has youtube-dl integrated, therefore I will leave the original post so that you can check what I was doing.

To play any bandcamp content (as many url as you wish will be added to the playlist):

mpv URL [URL2 URL3 URL4 etc...]

With a GUI is even better than bandcamp itself ehehe

original post:

Hi!

Thanks to youtube-dl it’s quite easy to extract the url of an Audio/Video content from many different websites, not just YouTube.

That is basically the only thing you need together with an audio player to stream a song or an entire album from Bandcamp.

To do so you simply need to run youtube-dl with the -g option (–get-url) to extract all the songs’ url from the desired Band/Album webpage, the urls tell you the quality and the signature key for any single track and other info, i.e.:

youtube-dl -g https://pleiadians.bandcamp.com/track/alpha-draco-live-edition
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=d56ebfec45312cb96c31f4b5b83ec032&id=593179869&stream=1&ts=1498138808.0

As far as I know there is no way to go over a 128k mp3 but that’s not a big deal for me, you can still buy the tracks if you want better quality :)

Now you can use that command as an input for your music player, with mplayer:

mplayer $(youtube-dl -g https://venetiansnares.bandcamp.com/album/winnipeg-is-a-frozen-shithole)

and change track with PG Up or PG Down.
Unfortunately I can’t really replay a previous track, therefore I normally stream an album (or more than one) using VLC with the ncurses interface:

nvlc $(youtube-dl -g https://fleshgodapocalypse.bandcamp.com/album/oracles)

The player has a nice interface and it’s easy to jump between tracks and play whatever you like.

The only problem is that there is no proper tracklist but only urls that don’t really tell you what’s the songs’ titles.

youtube-dl has another feature that prints the titles, so you can add that to the command and it will first print the song title and then its url:

youtube-dl -ge https://bong-ra.bandcamp.com/album/voodoom
Alla Malla
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=a38f33f71d84028e405dd31a9a8e9aa2&id=3771122612&stream=1&ts=1498645310.0
Kongo Nails
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=b1be74f324b2e4f61ffa112942f93c68&id=2816601748&stream=1&ts=1498645311.0
Wisi Mang
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=aeb5a552ce79ac7758c1d895d138ed5e&id=3118111046&stream=1&ts=1498645312.0
Sacrifice
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=248008dba1a08b853edb8d77d1782fa4&id=3985912914&stream=1&ts=1498645313.0
Rituals
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=7d5ae864bfce6c03a9f15d52ace03347&id=2457850202&stream=1&ts=1498645314.0
Kankan Un De
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=eb588e43bf9b5413961ed443e423dd9c&id=2314842173&stream=1&ts=1498645316.0
Bar Baka
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=be0d98c52dfb34fbcea26419d142350b&id=978986760&stream=1&ts=1498446319.0
Wasteland
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=069736f3434374ae608d5fd40b52103a&id=679423186&stream=1&ts=1498645318.0
Voodoom
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=52c2901e859050da36e61f0f9fec4298&id=4221838226&stream=1&ts=1497822416.0
Death Curse
http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=6867458fba2a1c482e47808ab3c05ec8&id=420345331&stream=1&ts=1498645320.0

The problem is that those titles may contain a space or more than one depending on how many words compose the song title, for example:

Kongo Nails contains a space between Kongo and Nails, nvlc thinks that those are 2 different files with Kongo being the first track and Nails the second.
This is not really an issue because by launching any word composing the title the correct url is going to be played but it is very annoying as the interface is uselessly filled.

Luckily youtube-dl always prints the title before its url, this way I know that the titles will be in a odd number line (1st line, 3rd line, 5th line, etc..), therefore I can now use sed to replace the ” ” (space) on every odd line with a “_” (or anything else but space or new line):

nvlc $(youtube-dl -ge  https://plus8records.bandcamp.com/album/from-my-mind-to-yours|sed '1~2 s/ /_/g')

This method can probably be applied to other similar websites.

 

TA SALÜDE

Advertisements