Install mediasoup via NPM within your Node.js application:
$ npm install mediasoup@3
During the installation process, the mediasoup NPM package will try to fetch a prebuilt mediasoup-worker binary appropriate for current platform and architecture. If not found, it will locally build the mediasoup-worker binary.
git+ssh
(instead of via npm
), and if “MEDIASOUP_FORCE_WORKER_PREBUILT_DOWNLOAD” environment variable is not set, the installation process won't attempt to fetch any prebuilt mediasoup-worker binary and it will build it locally instead.MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD="true" npm install mediasoup@3
mediasoup/worker/out/Release
path).MEDIASOUP_WORKER_BIN="/home/xxx/src/foo/mediasoup-worker" npm install mediasoup@3
MEDIASOUP_WORKER_BIN="/home/xxx/src/foo/mediasoup-worker" node myapp.js
In order to build the mediasoup C/C++ components the following packages and libraries must be available in the target host:
make
Python and make
are just needed in case no prebuilt mediasoup-worker binary was downloaded during the installation process.
The installation path MUST NOT contain whitespaces.
gcc
and g++
>= 8 or clang
(with C++17 support)cc
and c++
commands (symlinks) pointing to the corresponding gcc
/g++
or clang
/clang++
executablespython3-pip
DEB package, otherwise PIP package manager might be unavailable.build-essential
DEB package. It includes both make
and gcc
/g++
.yum groupinstall "Development Tools"
.If there is neither python3
nor python
command pointing to Python 3 executable, set the PYTHON
environment variable during mediasoup installation:
$ PYTHON=python3.9 npm install mediasoup@3 --save
If the MEDIASOUP_MAX_CORES
environment variable is set, the build process will use that number of CPU cores. Otherwise, it will auto-detect the number of cores in the machine.
make
can be installed with MSYS from MinGW and make sure to append the path of folder containing make
to the Windows Path
environment variable (e.g. C:\MinGW\msys\1.0\bin
).