Project link:https://github.com/jordiwang/web-capture
- Clone project
cd ~
git clone https://github.com/jordiwang/web-capture
- Download and install emsdk Official instruction link:https://emscripten.org/docs/getting_started/downloads.html
cd ~
git clone https://github.com/emscripten-core/emsdk.git
./emsdk install latest
# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate latest
# Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh
Note 1: the emsdk folder must be in the same directory as the web-capture folder.
Note 2: you must source ./emsdk_env.sh before compile ffmpeg-js.
3. Download ffmpeg
cd ~
wget http://ffmpeg.org/releases/ffmpeg-3.4.8.tar.xz
xvf ffmpeg-3.4.8.tar.xz
- Compile ffmpeg-js
If you want to add compile option, modify the build_ffmpeg-emcc.sh
cd ~/web-capture/script
bash build_ffmpeg-emcc.sh
bash build.sh