Raspberry Pi/FastAPI service for streaming HDMI video/audio over the internet using the WebRTC protocol
Utilizes https://github.com/meetecho/janus-gateway, https://github.com/catid/kvm
- Raspberry Pi 4 running 32-bit Raspberry Pi OS (tested with 4 GB RAM)
- Username "pi" preferred
- Docker must be installed (https://docs.docker.com/engine/install/debian/)
- The pi must have a way to connect to the outer internet (needed for docker build)
- HDMI-to-USB Capture Card supporting MJPG capture format
- (If on corporate network) A STUN/TURN server (see docs/stun.md)
cd /home/pi
git clone https://github.com/MattWeinberg24/pi-stream.git
cd pi-stream
- edit
docker-compose.yml
in vim or nano to configure environment variables
docker compose up
- Navigate to http:https://<PI IP>:<FASTAPI PORT>/static/index.html in Chrome or Edge (Firefox untested)
- Enter STUN/TURN information for frontend
- Use the API
- Test buttons available on the above site
- Full API documentation available at http:https://<PI IP>:<FASTAPI PORT>/docs
- Selected topics detailed in /docs
- Frontend debug messages can be found in the browser console
- Backend debug messages can be found through docker's output
- 8088
- Janus Gateway WebRTC Server
- 8000
- Python FastAPI
- HTML/Javascript served at /static/index.html on this port
- Docs served at /docs on this port
- 5002
- gstreamer opus RTP audio stream
- (Used internally)
KVM (Video) Janus plugin by Chris Taylor (https://github.com/catid)
Janus Gateway server and javascript library by Meetecho (https://github.com/meetecho)
Mentors and coworkers during my summer internship
Contact: [email protected]