3f8e92c6affc41f2d32fa6aa5639c680437a937f
The first real sender/receiver run failed permanently: the receiver reported 'non-existing PPS 0' for every frame. Without a VBV, a 2256x1504 IDR keyframe bursts hundreds of kilobytes of back-to-back FU-A packets, overflowing the ~208KB default UDP receive buffer; the resulting sequence gap made the depacketizer drop whole keyframes including their in-band SPS/PPS, so the decoder never initialized and never recovered, because every keyframe burst overflowed again. - Encoder: add rc_max_rate = bitrate and rc_buffer_size = bitrate*2/fps, capping any single frame to about two frame periods of bytes (~40KB at the 4Mbps default). - Encoder: switch the time_base to microseconds. It was derived from the configured frame rate, which quantized capture-rate timestamps and duplicated pts; RTP timestamps are now lossless. - Transport: request a 4MB SO_RCVBUF on the receive socket (best-effort; the kernel clamps to net.core.rmem_max). meson test 4/4, valgrind clean (loopback + codec).
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.
- Built with C++20, Meson, PipeWire, FFmpeg, RTP/UDP, and SDL.
This project is in early development. The H.264 codec path is implemented; capture, transport, and rendering are still in progress.
Quick start
Requirements:
- C++20 compiler (GCC 12+, Clang 16+)
- Meson >= 0.63
- Ninja
- FFmpeg development packages (
libavcodec,libavutil,libswscale) - (later phases) PipeWire dev, SDL2/3 dev
Build and run tests:
meson setup build
meson compile -C build
meson test -C build --print-errorlogs
Run with verbose test output:
meson test -C build -v
Architecture
See docs/ARCHITECTURE.md for module boundaries and design rules.
Roadmap
Development is split into phases in docs/PHASES.md.
Current phase: Phase 3 — PipeWire screen capture.
License
MIT — see LICENSE (to be added).
Description
Languages
C++
60.6%
Swift
18%
Kotlin
15.2%
Shell
3.9%
Meson
2%
Other
0.2%