Repository navigation
RFI recovery frames - #276
Conversation
2ce1553 to
67e9934
Compare
|
Note, you can also try this PR on a real device (phone, Steam Deck, etc.) using moonshine-test-headless:
That builds this PR with hgaiser/pixelforge#62 and serves the test workloads as apps to a real Moonlight device. In Moonlight, add the host by its IP address, then type the PIN Moonlight shows into the terminal. It uses Moonshine's default ports (47984, 47989, 48010 TCP and 47998–48000 UDP), so stop any Moonshine already running on the host first. Pick HEVC in Moonlight (H.264 doesn't use reference frame invalidation), and connect over Wi-Fi, especially forced to 2.4 GHz. With Moonlight's performance stats overlay on, this PR should recover from packet loss with far fewer keyframes, so fewer bitrate spikes and less stutter after a loss. To compare, serve the current main branch the same way:
|
The recovery-frame changes use pixelforge 0.13.0's API (invalidate_reference_frames returning bool, with_active_reference_frames, is_recovery_frame); 0.12.1 doesn't build them.
dab0109 to
e2683c4
Compare
Answer Moonlight's reference frame invalidation with recovery frames instead of an IDR whenever the encoder still holds a good reference.
maxNumReferenceFramesto the host, but predict from one (with_active_reference_frames(1)) so encode time doesn't grow.Depends on hgaiser/pixelforge#62 (
invalidate_reference_framesreturnsbool,with_active_reference_frames,is_recovery_frame).Testing
Known limits
Host/Client Testing: rfi-recovery-frames@2ce1553 vs main@de05168
Hardware
Stream
Report card
The loss streams' rows for HEVC and AV1 (this branch, then main):
RFI recovery rate counts H.264 streams too, where Moonlight never sends RFI, so it reads 37.5% here although HEVC recovered every loss.
Results produced by moonshine-test-headless. Results file attached.
To run the same tests on your host (loopback client):
podman container runlabel run ghcr.io/porkloin/moonshine-test-headless:latest -- --mode 1080p120 --moonshine porkloin@agent/rfi-recovery-frames --pixelforge porkloin@agent/rfi-recovery-frames --baseline --loss --chaos --loss-frame-every 120 --delay 40To view my results in a throwaway Grafana container, download the results archive and run:
podman container runlabel run ghcr.io/porkloin/moonshine-test-headless:view path/to/results-compact-no-traces.tar.gzmoonshine-rfi-results-compact-no-traces.tar.gz