Created
November 26, 2008 16:19
-
-
Save singpolyma/29434 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
#!/bin/sh | |
YT=`which yt` | |
if [ -z "$YT" ]; then | |
YT="`dirname $0`/yt" | |
fi | |
if [ -z "$YT" ]; then | |
echo "ERROR: could not find yt script" 1>&2 | |
exit 1 | |
fi | |
TOTHEORA=`ffmpeg2theora` | |
if [ -z "$TOTHEORA" ]; then | |
echo "ERROR: could not find ffmpeg2theora" 1>&2 | |
exit 1 | |
fi | |
wget -O"/tmp/youtube.2theora.flv" "`$YT "$*"`" | |
ffmpeg2theora "/tmp/youtube.2theora.flv" | |
mv "/tmp/youtube.2theora.ogg" "./youtube.ogg" | |
rm -f "/tmp/youtube.2theora.flv" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment