You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
misc/shell_scripts/videolectures_rtmpdump_warper

25 lines
852 B

#! /usr/bin/env bash
# http://fabien.benetou.fr/Tools/Tools#RTMPDump
if [ $# -lt 1 ]
then
echo "VideoLectures helper for RTMPDump"
echo "usage: $0 http://VideoLecture.net/targetlecture/ [targetlecture.flv]"
echo "if the second parameter is omitted the name of the lecture from the URL will be used"
echo ""
echo "Want to grab a list of lectures? Consider xargs (e.g. xargs -n 1 -a list_of_lectures.txt videolectures.sh )."
echo ""
echo "(note that resuming does not work, neither does keyframe skipping)"
exit
fi
URL=$1
DEST=$2
# if $2 is empty, use the last part of the URI
if [ $# -lt 2 ]
then
DEST=$(echo $1 | sed "s|http://videolectures.net/\(.*\)/|\1|").flv
fi
REMOTE=$(curl $1 | grep clip.url | sed "s/.*\"\(.*\)\".*/\1/" | grep -v flv)
SOURCE=rtmp://oxy.videolectures.net/video
rtmpdump -W $1 -o $DEST -r $SOURCE -y $REMOTE