Skip to content

Instantly share code, notes, and snippets.

@singpolyma
Created November 26, 2008 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save singpolyma/29434 to your computer and use it in GitHub Desktop.
Save singpolyma/29434 to your computer and use it in GitHub Desktop.
#!/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