Created
April 14, 2017 04:28
-
-
Save mikoim/727005ad51901957d21bfc3f5b6bab9d to your computer and use it in GitHub Desktop.
RTMPDump wrapper for Panasonic Content Meister
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
#!/bin/sh | |
# | |
# RTMPDump wrapper for Panasonic Content Meister | |
# This script allows you to download videos from Content Meister without authentication. | |
# | |
BASE_URL=rtmpt://doshisha.fmsod.stream.ne.jp/doshisha | |
if [ $# -ne 1 ] && [ $# -ne 2 ]; then | |
echo "Usage: $0 <url> [channel]" | |
exit 1 | |
fi | |
RTMPDUMP=$(which rtmpdump 2> /dev/null) | |
if [ -z "${RTMPDUMP}" ]; then | |
echo 'rtmpdump is not found in PATH, install it first. -> https://rtmpdump.mplayerhq.hu/' | |
exit 1 | |
fi | |
CONTENT_ID=$(echo "$1" | cut -d = -f 2) | |
CHANNEL=$([ $# -eq 1 ] && echo 1 || echo "$2") | |
rtmpdump -i "${BASE_URL}/_definst_/${CONTENT_ID}/mp4:video${CHANNEL}.mp4" --verbose --resume --flv "${CONTENT_ID}_video${CHANNEL}.mp4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment