2022-01-29 21:08:49 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
DIR=$(dirname ${BASH_SOURCE[0]})
|
|
|
|
cd "$DIR"
|
|
|
|
. common
|
|
|
|
mkdir -p "$PREBUILT_DATA_DIR"
|
|
|
|
cd "$PREBUILT_DATA_DIR"
|
|
|
|
|
2022-04-29 01:32:14 +08:00
|
|
|
VERSION=5.0.1
|
|
|
|
DEP_DIR=ffmpeg-win64-$VERSION
|
2022-01-29 21:08:49 +08:00
|
|
|
|
2022-04-29 01:32:14 +08:00
|
|
|
FILENAME=ffmpeg-$VERSION-full_build-shared.7z
|
|
|
|
SHA256SUM=ded28435b6f04b74f5ef5a6a13761233bce9e8e9f8ecb0eabe936fd36a778b0c
|
2022-01-29 21:08:49 +08:00
|
|
|
|
|
|
|
if [[ -d "$DEP_DIR" ]]
|
|
|
|
then
|
|
|
|
echo "$DEP_DIR" found
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2022-04-29 01:32:14 +08:00
|
|
|
get_file "https://github.com/GyanD/codexffmpeg/releases/download/$VERSION/$FILENAME" \
|
2022-01-29 21:08:49 +08:00
|
|
|
"$FILENAME" "$SHA256SUM"
|
|
|
|
|
|
|
|
mkdir "$DEP_DIR"
|
|
|
|
cd "$DEP_DIR"
|
|
|
|
|
2022-04-29 01:32:14 +08:00
|
|
|
ZIP_PREFIX=ffmpeg-$VERSION-full_build-shared
|
2022-01-29 21:08:49 +08:00
|
|
|
7z x "../$FILENAME" \
|
|
|
|
"$ZIP_PREFIX"/bin/avutil-57.dll \
|
|
|
|
"$ZIP_PREFIX"/bin/avcodec-59.dll \
|
|
|
|
"$ZIP_PREFIX"/bin/avformat-59.dll \
|
|
|
|
"$ZIP_PREFIX"/bin/swresample-4.dll \
|
|
|
|
"$ZIP_PREFIX"/bin/swscale-6.dll \
|
|
|
|
"$ZIP_PREFIX"/include
|
|
|
|
mv "$ZIP_PREFIX"/* .
|
|
|
|
rmdir "$ZIP_PREFIX"
|