Chrome embedded in a docker container with RTSP stream output (including audio and video) and remote debugging
| VAR | Description | Default Value |
|---|---|---|
| DISPLAY_WIDTH | The display width (for xvfb, x11vnc and chrome) | 1920 |
| DISPLAY_HEIGHT | The display height | 1080 |
| DISPLAY | The display id | :99 |
| VNC | Enable VNC server (needed if you want to use noVNC) | true |
| NOVNC | Enable noVNC (to use vnc in a browser) | true |
| REMOTE_DEBUG | Enable chrome remote debugging (especially useful for puppeteer) | true |
| RTSP_SERVER | Use the built-in RTSP server (rtsp-simple-server) | true |
| ENABLE_VIDEO | Enable video stream (if disabled, the rtsp stream only contains audio) | true |
| RTSP_URL | RTSP url for ffmpeg (change this only if you decide to use another RTSP server) | rtsp://localhost:8554/stream |
| Service | Port |
|---|---|
| VNC | 5900 |
| noVNC | 8080 |
| RTSP | 8554 |
| CHROME_REMOTE_DEBUG | 9222 |
Set your environment variables in the docker-compose file
run docker-compose build to build the container
run docker-compose up -d to run the container
You can open the RTSP stream on VLC with rtsp://yourip:8554/stream
You can interact with chrome with the noVNC server
You can remotely control chrome in Node.js with puppeteer-core
This project uses the following softwares
- ffmpeg to create the RTSP stream
- xserver (Xvfb) to create a xserver without display
- x11vnc to allow remote interaction with the xserver
- noVNC and websockify to use vnc with a browser
- PulseAudio to create a virtual sound card
- rtsp-simple-server to serve the RTSP stream
- socat to allow to connect to chrome remote debugging from a remote pc