Created
September 7, 2018 07:23
-
-
Save rschiang/9f17bac823b5a17a8ffbe2f9150ce132 to your computer and use it in GitHub Desktop.
Fetch and join file from soundcloud
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Copy M3U response from Firefox and do this | |
pbpaste | base64 --decode | python -c 'import sys;_=list(sys.stdout.write('"'"'url="{}"\noutput="{:02}.mp3"\n'"'"'.format(line.strip(), i)) for i, line in enumerate(filter(lambda x: x[0] != "#", sys.stdin), start=1))' | curl -K - | |
ffmpeg -i concat:"01.mp3|02.mp3|03.mp3|04.mp3|05.mp3|06.mp3|07.mp3|08.mp3|09.mp3|10.mp3|11.mp3|12.mp3|13.mp3|14.mp3" -c copy output.mp3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment