emscripten compiled wasm of latest ffmpeg code (multi-threaded) and worker thread compatible
> cmake -DCMAKE_TOOLCHAIN_FILE=./build/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Release -DEMSCRIPTEN_ROOT_PATH=/usr/local/opt/emscripten/bin/ -G "Unix Makefiles" .
> make all
emcmake cmake -G "Unix Makefiles" .
emcmake cmake ../<path_to>/ffjs -B <dest folder i.e. .> -Wno-dev
- -Wno-dev (disable policy warnings)
- -DLLVM_ROOT (set llvm root to emscripten custom build)
> brew install make binaryen emscripten llvm
> cmake -Wno-dev -DLLVM_ROOT=/usr/local/opt/emscripten/libexec/llvm/bin -DCMAKE_TOOLCHAIN_FILE=./build/emscripten/cmake/Modules/Platform/Emscripten.cmake -DEMSCRIPTEN_ROOT_PATH=/usr/local/opt/emscripten/bin/ -G "Unix Makefiles" .
> make all
ffmpeg conversion to HLS
- via probing of file based on ffmpeg
- conversion of file into HLS playlist and segments
- hosted in browser
- probing done in web worker / WorkerFS to avoid copying / upload large files
- outputting file to browser storage or node system
Largely based on
- ffmpeg.wasm-core
- ffmpeg.js