videos von youtube herunterladen, ansehen, umwandeln. mich hat der mangel an flash unter gnu/linux/ppc dazu gezwungen:
Bash
#!/bin/bash
BASEURL="http://youtube.com/get_video.php?"
TMPFILE=$(mktemp) || exit 1
clear
read -p "YouTube URL? " ORIGURL
wget -c -S -O ${TMPFILE} ${BASEURL}$(
wget -O - ${ORIGURL} |
grep player2.swf |
cut -f2 -d? | cut -f1 -d\"
) || exit 1
ANS=""; FILENAME="";
while [ '${ANS}' != 'q' ]; do
clear
echo "Menu: "
echo "p)... play file (using mplayer)"
echo "r)... rip file (using ffmpeg)"
echo "s)... save file"
echo "q)... quit"
read -p "What do you want to do? " ANS
case ${ANS} in
"p")
mplayer ${TMPFILE}
;;
"r"|"s")
if [ '${FILENAME}' = '' ]; then
read -p "Desired path/filename (without extension)? " FILENAME
fi
case ${ANS} in
"r")
echo "ripping..."
ffmpeg -i ${TMPFILE} -ab 56 -ar 22050 -b 500 -s 320x240 ${FILENAME}.mpg
;;
"s")
echo "saving file..."
cp ${TMPFILE} ${FILENAME}.flv && echo "successfully saved..." && sleep 2
;;
esac
;;
*)
continue
;;
esac
done
rm -f ${TMPFILE}
exit 0
Alles anzeigen