This proof-of-concept implements a virtual Wayland display inside a container that can capture and stream graphical content over the network using GStreamer's pipeline architecture.
The demo showcases rendering weston-simple-egl (a spinning cube OpenGL demo) and streaming it to a remote client.
- start.sh: Sets up a virtual Wayland display using GStreamer and runs weston-simple-egl demo
- Dockerfile: Container definition with all necessary components (GStreamer, Wayland, Weston)
- stream-base-*.yaml: Kubernetes manifests for deployment
- Virtual Display Layer: Uses GStreamer's waylanddisplaysrc to create a virtual Wayland display without requiring real hardware
- Application Layer: The weston-simple-egl demo application runs inside the container and renders to the virtual Wayland display
- Streaming Layer: GStreamer captures the Wayland display content and streams it via RTP/UDP to remote clients
./deploy-stream-base.sh
The start.sh
script:
- Creates a virtual Wayland display using GStreamer's waylanddisplaysrc
- Starts weston-simple-egl demo in a tmux window
- Streams the rendered content via RTP/UDP
To view the stream on a remote machine, run:
gst-launch-1.0 -v udpsrc port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string)RGB, depth=(string)8, width=(string)1920, height=(string)1080" ! rtpvrawdepay ! videoconvert ! autovideosink
This will display the weston-simple-egl demo (spinning cube) that's being rendered inside the container.
The container build process use OpenShift BuildConfigs.
It can be triggered via the ./build.sh
scripts.
If you're deploying to OpenShift or another Kubernetes environment with a private registry:
oc create secret generic registry-pull-secret --from-file=.dockerconfigjson=/tmp/new-pull-secret.json --type=kubernetes.io/dockerconfigjson
oc secrets link builder registry-pull-secret --for=pull,mount
This project is licensed under the Apache License, Version 2.0. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0