-
-
Save stevesoltys/413366850eed97cee27d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| bash <(curl -s https://gist.githubusercontent.com/garyttierney/61e51a6f1e50ff002988/raw/72606dbde0c171ce6b2c83625a8ac0a97ccb19a3/screencast_install.sh) |
This file contains hidden or 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/bash | |
| function upload() { | |
| curl -s -F "fileToUpload=@$1" -F "theTitle=Screencast" http://webm.host/working/upload.php | grep -E -o "url=(.*)" | grep -E -o "http://webm.host/[^<\"]*" | |
| } | |
| function screencast() { | |
| FILE=$(mktemp "/tmp/XXXXX.webm") | |
| ffcast -vv -s ffmpeg -y -r 25 -qmax 8 -fs 5000000 -t 15 $FILE | |
| ffcast -k | |
| notify-send "Uploading..." | |
| URL=$(upload $FILE) | |
| echo "$URL/vid.webm" | xclip -selection clipboard | |
| notify-send "Successfully uploaded." | |
| } | |
| screencast | |
This file contains hidden or 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/bash | |
| function screencast_install() { | |
| if [ ! -f /usr/include/X11/Xlib.h]; then | |
| echo "x11 headers not found, install it via one of the following options:" | |
| echo " RedHat/Fedora/CentOS: yum install libx11-devel" | |
| echo " Debian/Ubuntu: apt-get install libx11-dev" | |
| echo " Mac OS X: download and install http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.7.dmg" | |
| fi | |
| if [ ! -f /usr/bin/ffmpeg ]; then | |
| echo "ffmpeg not found, install it via one of the following options:" | |
| echo " RedHat/Fedora/CentOS: yum install ffmpeg" | |
| echo " Debian/Ubuntu: apt-get install ffmpeg" | |
| echo " Mac OS X: brew install ffmpeg" | |
| fi | |
| if [ ! -f /usr/bin/drive ]; then | |
| echo "gdrive executable not found, downloading..." | |
| if [ "$OSTYPE"="linux-gnu" ]; then | |
| URL="https://drive.google.com/uc?id=0B3X9GlR6EmbnMHBMVWtKaEZXdDg" | |
| elif ["$OSTYPE"="darwin"* ]; then | |
| URL="https://drive.google.com/uc?id=0B3X9GlR6EmbnVWtGWjBmNmhVeHM" | |
| else | |
| echo "Unknown architecture. Exiting." | |
| exit -1 | |
| fi | |
| sudo wget $URL -O /usr/bin/drive | |
| sudo chmod +x /usr/bin/drive | |
| fi | |
| if [ ! -f /usr/bin/ffcast ]; then | |
| echo "can't find ffcast, downloading..." | |
| git clone https://github.com/minos-org/ffcast.git $HOME/ffcast | |
| cd $HOME/ffcast | |
| echo "compiling ffcast..." | |
| make | |
| sudo make install | |
| fi | |
| grep -q "screencast" "$HOME/.bashrc" | |
| if [ $? -eq 1 ]; then | |
| SCREENCAST_BIN="https://gist.githubusercontent.com/garyttierney/61e51a6f1e50ff002988/raw/e000c991cc0e2ce1a9a02f850488b8edadb4b933/screencast.sh" | |
| curl -s "$SCREENCAST_BIN" >> ~/.bashrc | |
| fi | |
| } | |
| screencast_install | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment