Last active
October 26, 2016 13:52
-
-
Save charbgr/c775d6914f25d40db6d4b1dc3a38f1df to your computer and use it in GitHub Desktop.
Android - Gif Recording Device
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/bash | |
adb shell screenrecord --bit-rate=20M "/sdcard/recording.mp4" & | |
PID=$! | |
echo "Recording.. ($PID)" | |
read -n1 -r -p "Press any key to stop" key | |
kill -SIGHUP $PID | |
sleep 1 | |
adb pull "/sdcard/recording.mp4" | |
echo "Gififying..." | |
gifify -r 60 "recording.mp4" | |
echo "Removing from device..." | |
adb shell rm "/sdcard/recording.mp4" |
Also give permissions using chmod +x record-gif.sh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requires gifify.
You can find it from
brew
ornpm
etc.