mirror of
https://github.com/spoopyghosty0/frameport.git
synced 2026-10-20 07:03:23 +02:00
native/venc/fp_venc: own clean-room driver of the Frame's iris encoder (V4L2 stateful encoder interface, written from native/venc/SPEC.md = kernel docs + values measured on the Frame). Reads SteamVR's headset-view webcam, box-scales and converts RGB24 to NV12 (NEON, bit-identical scalar reference), CBR H.264 with SPS/PPS on every IDR, one frame per slot of an even fraction of the panel rate read through DRM (96 Hz -> 32 fps). stdin "k" = keyframe, EOF = stop; --probe/--selftest. Static freestanding aarch64 binary in artifacts/linux-arm64-bin (reproducible). livestream: the script probes fp_venc and pipes it into ffmpeg (-c:v copy + AAC), else the old x264 30 fps path; the helper is synced to ~/.local/share/frameport/bin by sha256 at stream start (no agent change); a new viewer asks for a keyframe and waits for it; the status line shows the encoder and fps. Tests: hardware/fallback script branches, keyframe-on-join, helper sync; tests/test_venc.py compares convert.c with a Python reference (native marker). Not yet run on the device.