Last active
November 27, 2016 22:45
-
-
Save tozevv/1e0a0dace86167d56e7f01a25855c097 to your computer and use it in GitHub Desktop.
Simple tool to fetch Microsoft Smooth Streaming files.
This file contains 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
#!/bin/sh | |
# | |
# Simple Microsoft Smooth Streaming fetch. | |
# | |
echo $PATH | |
if [ $# -eq 0 ] | |
then | |
echo "Usage: fetch-mss.sh <ism-url>" | |
fi | |
function download { | |
FILE=$(basename $1) | |
curl $1 -o $FILE | |
} | |
ISM_URL=$1 | |
ISM_PATH=$(dirname $ISM_URL) | |
ISMC_URL="$ISM_URL"c | |
echo Downloading $ISM_URL | |
download $ISM_URL | |
download $ISMC_URL | |
ISM_FILE=$(basename $ISM_URL) | |
TRACKS=$(grep -o 'src="[^"]*"' $ISM_FILE | tr -d '"' | sed s/src=//g) | |
for TRACK in $TRACKS; do | |
download $ISM_PATH/$TRACK; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment