-
-
Save tomka/837135 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env sh | |
# Watch Al Jazeera live stream with mplayer. You can specify the | |
# quality as argument by passing either "low", "high" or "veryhigh" | |
# to the script. If nothing is given it defaults to "veryhigh". | |
function printUsage() { | |
echo "Please pass no arguments or either \"low\", \"high\" or \"veryhigh\". No arguments defaults to \"veryhigh\"." | |
} | |
# default quality | |
PLAYPATH="aljazeera_en_veryhigh" | |
# test for possible quality parameter | |
if [ $# -gt 1 ]; then | |
printUsage | |
exit 1 | |
elif [ $# -eq 1 ]; then | |
case $1 in | |
low) | |
PLAYPATH="aljazeera_en_low" | |
;; | |
high) | |
PLAYPATH="aljazeera_en_high" | |
;; | |
veryhigh) | |
PLAYPATH="aljazeera_en_veryhigh" | |
;; | |
*) | |
printUsage | |
exit 1 | |
esac | |
fi | |
# Call rtmpdump and mplayer | |
rtmpdump -v -r rtmp://livestfslivefs.fplive.net/livestfslive-live/ -y "${PLAYPATH}" -a "aljazeeraflashlive-live" -o -| mplayer - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment