Skip to content

Instantly share code, notes, and snippets.

@brampersandon
Created January 1, 2015 19:52
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 brampersandon/6d80188bc8b6ba85fc22 to your computer and use it in GitHub Desktop.
Save brampersandon/6d80188bc8b6ba85fc22 to your computer and use it in GitHub Desktop.
Download the Internet Archive's KhanAcademyVideos torrent, and then run this script to convert things. See http://brndn.xyz/khan for more info.
function getKhan() {
for i in *; do
if [ -d $i ]; then
echo "$i"
(cd $i; getKhan)
fi
if [[ $i =~ \.7z$ ]]; then
7z x $i
fi
if [[ $i =~ \.flv$ ]]; then
ffmpeg -i $i -ar 22050 -vcodec libx264 -strict -2 $i.m4v
fi
done
}
getKhan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment