20 lines
501 B
Bash
20 lines
501 B
Bash
#!/bin/bash -x
|
|
|
|
#https://jeromewu.github.io/build-ffmpeg-webassembly-version-part-2-compile-with-emscripten/
|
|
|
|
FFMPEG_VERSION=n4.4
|
|
EM_VERSION=1.39.18-upstream
|
|
|
|
if [ ! -d ffmpeg ]; then
|
|
git clone --depth 1 --branch $FFMPEG_VERSION https://github.com/FFmpeg/FFmpeg ffmpeg
|
|
fi
|
|
|
|
cp build.sh ffmpeg/build.sh
|
|
cd ffmpeg
|
|
|
|
docker pull trzeci/emscripten:$EM_VERSION
|
|
docker run \
|
|
-v $PWD:/src \
|
|
-v $PWD/cache-wasm:/emsdk_portable/.data/cache/wasm \
|
|
trzeci/emscripten:$EM_VERSION \
|
|
sh -c 'bash ./build.sh' |