Last active
November 13, 2020 06:24
-
-
Save yifeiyin/013e494d08e92a45d93a092ed55aa739 to your computer and use it in GitHub Desktop.
Download MyMedia Video
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 | |
# Usage: | |
# $ mymediadl URL [FILE_NAME] | |
mymediadl() { | |
URL=$(echo "$1" | awk -F '/' '{ print $NF }') | |
echo "Downloading $URL" | |
NAME="$2" | |
if [[ -z $NAME ]]; then | |
NAME=$(date -R) | |
fi | |
ffmpeg \ | |
-v warning \ | |
-stats \ | |
-i "https://stream.library.utoronto.ca:1935/MyMedia/play/mp4:1/$URL.mp4/playlist.m3u8" \ | |
-c copy \ | |
"$NAME.mp4" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment