Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nealrs/mov-gif-db
convert a mov into a gif & upload it to dropbox
https://github.com/nealrs/mov-gif-db
Last synced: 1 day ago
JSON representation
convert a mov into a gif & upload it to dropbox
- Host: GitHub
- URL: https://github.com/nealrs/mov-gif-db
- Owner: nealrs
- License: gpl-2.0
- Created: 2014-03-07T09:55:21.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-07T10:27:41.000Z (almost 11 years ago)
- Last Synced: 2023-07-31T17:26:00.706Z (over 1 year ago)
- Homepage:
- Size: 125 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**Turn Quicktime movies into animated gifs & automagically upload them to Dropbox!**
**Inspired by:** this [gist](https://gist.github.com/dergachev/4627207) from [Alex Dergachev](https://github.com/dergachev/)
**Dependencies:** ffmpeg, X-Quartz, gifsicle (available via homebrew) and [Dropbox-Uploader](https://github.com/andreafabrizi/Dropbox-Uploader)
After you've squared away the dependencies:
1. Add the code below to your `.bash_profile` & alias Dropbox Uploader as `dbu`
2. Run `dbu` & follow the setup procedure to create a new app & API keys.
3. Try converting & upload a movie `$ movgif input.mov [max-width]`
4. Have fun!```shell
movgif(){# check for input file
if [ -z "$1" ]
then
echo "$(tput setaf 1)$(tput setab 7)PROPER USAGE: $ movgif input.mov [max width in pixels]$(tput sgr 0)"
kill -INT $$
fi
# check for & set maxsize
if [ ! -z "$2" ]
then
maxsize="-vf scale=$2:-1"
else
maxsize=""
fi
# set output & run conversion
out="$1_$(LC_CTYPE=C tr -cd '[:alnum:]' < /dev/urandom | fold -w8 | head -n1).gif"
ffmpeg -i $1 $maxsize -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $out
echo "$(tput setaf 2)output file: $out$(tput sgr 0)"
# upload to dropbox & get sharing link
dbu upload "$out" /
dbu share "$out"
}
```