Last active
February 22, 2021 16:00
-
-
Save flashingpumpkin/6240338 to your computer and use it in GitHub Desktop.
Save the following file in your project as `bin/post_compile` and after slug compilation it will be downloaded and a binary placed in a `vendor/ffmpeg` folder in your project root. Invoke FFMPEG as `/app/vendor/ffmpeg/ffmpeg -h`
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 | |
| current=`pwd` | |
| filename=ffmpeg.static.64bit.2013-08-15.tar.gz | |
| url=http://ffmpeg.gusari.org/static/64bit/$filename | |
| source $BIN_DIR/utils | |
| puts-step "Installing FFMPEG" | |
| # Download FFMPEG if not downladed yet | |
| if [ ! -d $CACHE_DIR/ffmpeg ]; then | |
| mkdir -p $CACHE_DIR/ffmpeg | |
| cd $CACHE_DIR/ffmpeg | |
| echo "Downloading FFMPEG ..." | indent | |
| curl -O $url >/dev/null 2>&1 | |
| echo "Unpacking FFMPEG ..." | indent | |
| tar -xf $filename | |
| rm $filename | |
| else | |
| echo "Already downloaded FFMPEG ..." | indent | |
| fi | |
| echo "Installing FFMPEG ..." | indent | |
| if [ ! -d $BUILD_DIR/vendor/ffmpeg ]; then | |
| mkdir -p $BUILD_DIR/vendor/ffmpeg | |
| fi | |
| if [ ! -f $BUILD_DIR/vendor/ffmpeg/ffmpeg ]; then | |
| cp -r $CACHE_DIR/ffmpeg/* $BUILD_DIR/vendor/ffmpeg/ | |
| fi | |
| cd $current |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment