This app is comprised of 4 Docker containers:
rtsp-server
: mediamtx- This is what serves the converted
rtsps
stream into aWebRTC
stream for the browser
- This is what serves the converted
rtsp-clients
: Uses a Node.js container to lauch the streams withffmpeg
and publish them tortsp-server
mqtt
: Connects to the printers to their localMQTT
server- It then parses the topics and cleans up some of the data, then publishes a
WebSocket
server for the browser to listen to
- It then parses the topics and cleans up some of the data, then publishes a
app
: Node.js Express web app that serves the page, loads the streams and listens to theWebSocket
server.
Comment out the app
portion of the docker-compose.yaml
file:
# app:
# build:
# dockerfile: ./app/Dockerfile
# depends_on:
# - rtsp-server
# - rtsp-clients
# - mqtt
# ports:
# - "9000:9000"
Now start the containers: docker-compose up --build
In another terminal, cd app && ./index.js
This way you can work on the Express app without having to build to container all the time.
Each of the containers can pretty much run by themselves as well if you want to work on them too.