sudo -i
mkdir -p /opt/bin
# install wiringpi
#need to enable I2C on hardware(use raspi-config)
git clone https://github.com/WiringPi/WiringPi.git
./build
#Some distributions do not have /usr/local/lib in the default LD_LIBRARY_PATH. To
#fix this, you need to edit /etc/ld.so.conf and add in a single line:
/usr/local/lib
#then run the ldconfig command.
sudo ldconfig
# install Adafruit-SSD1306
sudo apt install -y python3-pip
pip install adafruit-circuitpython-ssd1306
cd /opt/bin
apt install git
git clone https://github.com/ThomasVon2021/blikvm.git
git submodule update --init --recursive
cd blikvm/src
make
# For ARM based systems (like the Raspberry Pi), use:
#make RPI=1 SSD1306=1
Install dependencies:
sudo apt install libmicrohttpd-dev libjansson-dev \
libssl-dev libsrtp2-dev libsofia-sip-ua-dev libglib2.0-dev \
libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \
libconfig-dev pkg-config libtool automake libnice-dev
sudo apt-get install build-essential libspeex-dev libspeexdsp-dev libpulse-dev
Clone and install libwebsockets:
git clone https://libwebsockets.org/repo/libwebsockets
cd libwebsockets
# If you want the stable version of libwebsockets, uncomment the next line
# git checkout v4.3-stable
mkdir build
cd build
# See https://github.com/meetecho/janus-gateway/issues/732 re: LWS_MAX_SMP
# See https://github.com/meetecho/janus-gateway/issues/2476 re: LWS_WITHOUT_EXTENSIONS
cmake -DLWS_MAX_SMP=1 -DLWS_WITHOUT_EXTENSIONS=0 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" ..
make && sudo make install
Clone and install Janus:
cd /opt/bin
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --prefix=/opt/janus
make
make install
make configs
Additional required dependencies for µStreamer:
apt-get install -y libasound2-dev
Clone and compile µStreamer:
cd /opt/bin
apt install -y build-essential libevent-dev libjpeg-dev libbsd-dev
git clone --depth=1 https://github.com/pikvm/ustreamer
cd ustreamer
ln -s /opt/janus/include/janus /usr/include/janus
sed \
--in-place \
--expression 's|^#include "refcount.h"$|#include "../refcount.h"|g' \
/usr/include/janus/plugins/plugin.h
make WITH_JANUS=1
With the WITH_JANUS
option you compile the µStreamer Janus plugin and outputs is at: janus/libjanus_ustreamer.so
. Move this file to the plugin directory of your Janus installation.
mv \
janus/libjanus_ustreamer.so \
/opt/janus/lib/janus/plugins/libjanus_ustreamer.so
Finally, create a configuration file for the shared memory object, so that the µStreamer Janus plugin can read µStreamer’s video data.
nano /opt/janus/etc/janus/janus.plugin.ustreamer.jcfg
#add
memsink: {
object = "demo::ustreamer::h264"
}
audio: {
device = "hw:1,0"
tc358743 = "/dev/video0"
}
init submodule
git submodule update --init --recursive
Install NodeJS first:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 18.19.0
How to run
// client
cd web_src/web_client
npm install
npm run dev
// server
cd web_src/web_server
npm install
npm run dev
How to build
cd web_src
bash pack.sh
//Then you can find the binary web_src/web_server/release
The default executable package path is in the/mnt/exec path, and you can replace its corresponding path with the server_app to complete the replacement.
In the /boot/config.txt
end, add the following content:
dtoverlay=tc358743
dtoverlay=tc358743-audio
dtoverlay=dwc2
# Install the main controller service
cd /opt/bin/blikvm/package/kvmd-main
./install-kvmd-main.sh
# Install the ustreamer service
cd /opt/bin/blikvm/package/ustreamer
./install-ustreamer.sh
# Install the HID service
cd /opt/bin/blikvm/package/kvmd-hid
./install-kvmd-hid.sh
# Install the web service
cd /opt/bin/blikvm/package/kvmd-web
./install-kvmd-web.sh
# Install the MSD service
cd /opt/bin/blikvm/package/kvmd-msd
./install-kvmd-msd.sh
# Install the OLED service
cd /opt/bin/blikvm/package/kvmd-oled
./install-kvmd-oled.sh
# Install the fan service
cd /opt/bin/blikvm/package/kvmd-fan
./install-kvmd-fan.sh
# Copy the package.json file
cp /opt/bin/blikvm/src/config/package.json /usr/bin/blikvm
sudo systemctl reboot