7c04506dde
A headless receiver has no window manager, so a windowed window is meaningless there — the screencast should simply fill the screen. The renderer now goes borderless fullscreen automatically when SDL runs the KMSDRM backend, and --fullscreen forces the same behavior in desktop sessions. The video keeps its aspect ratio via SDL_SetRenderLogicalPresentation(LETTERBOX): a 4:3 desktop on a 16:9 TV renders with black bars instead of a stretched picture, the cursor is hidden, and the clear-before-draw keeps the bars black. Verified live on a 3440x1440 monitor: the --fullscreen receiver window covered the entire display while a 4:3 synthetic feed rendered with pure-black pillarbox bars (Y=0/SAT=0) and a saturated-red center (V=254). meson test 5/5 in both build configurations.
76 lines
2.3 KiB
Markdown
76 lines
2.3 KiB
Markdown
# screen_cast
|
|
|
|
A native Linux peer-to-peer screencast application.
|
|
|
|
- **Send** your desktop or a window to another Linux machine.
|
|
- **Receive** a stream and render it in a window.
|
|
- Discover receivers on the LAN via **mDNS/Avahi**; negotiate sessions with
|
|
**JSON signaling**; stream **H.264 over RTP/UDP**.
|
|
|
|
Built with **C++20**, **Meson**, **PipeWire**, **FFmpeg**, and **SDL3**.
|
|
|
|
## Quick start
|
|
|
|
Requirements:
|
|
|
|
- C++20 compiler with `<format>` (GCC 13+, Clang 18+)
|
|
- Meson >= 0.63, Ninja
|
|
- FFmpeg development packages (`libavcodec`, `libavutil`, `libswscale`)
|
|
- SDL3 development package (`sdl3`)
|
|
- nlohmann JSON (`nlohmann_json`) and Avahi client (`avahi-client`)
|
|
- For the sender only: PipeWire dev (`libpipewire-0.3`) and libportal
|
|
|
|
Build and run tests:
|
|
|
|
```sh
|
|
meson setup build
|
|
meson compile -C build
|
|
meson test -C build --print-errorlogs
|
|
```
|
|
|
|
Stream between two machines:
|
|
|
|
```sh
|
|
screencast --receive # machine A: announces itself, opens a window
|
|
screencast --send # machine B: discovers A, negotiates, streams
|
|
```
|
|
|
|
See `docs/RUNBOOK.md` for all modes, flags, and validation procedures.
|
|
|
|
## Receiver on a small ARM board (e.g. Raspberry Pi Zero 2 W)
|
|
|
|
The receiver does not need the sender's PipeWire/portal capture stack. On
|
|
the board, run:
|
|
|
|
```sh
|
|
sudo ./scripts/install-receiver.sh
|
|
screencast --receive
|
|
```
|
|
|
|
The script installs the dependencies, builds a receiver-only binary
|
|
(`-Dsender=false`), runs the test suite, and installs to `/usr/local/bin`
|
|
(override with `SC_RECEIVER_INSTALL_DIR`). It needs Raspberry Pi OS Trixie
|
|
or newer (GCC 13+ for C++20 `<format>`), builds SDL3 from source when the
|
|
distribution does not package it, and enables `avahi-daemon`. It also
|
|
installs and enables a systemd service so the receiver starts at boot —
|
|
`systemctl status screencast-receiver` to check on it.
|
|
|
|
Performance note: decoding is software H.264; on very small boards expect
|
|
smooth playback for modest resolutions and reduced frame rates at high
|
|
resolutions. Hardware decode is planned for Phase 7. On a headless console
|
|
the receiver runs fullscreen automatically with aspect-preserving
|
|
letterboxing.
|
|
|
|
## Architecture
|
|
|
|
See `docs/ARCHITECTURE.md` for module boundaries and design rules.
|
|
|
|
## Roadmap
|
|
|
|
Development is split into phases in `docs/PHASES.md`.
|
|
|
|
Current phase: **Phase 7 — Resilience and polish**.
|
|
|
|
## License
|
|
|
|
MIT — see `LICENSE` (to be added). |