#5946

feat(video): add PyroWave encoding

Openjoshrmcdanielwants to merge intofrom

Description

Add host-side PyroWave encoding for 8-bit SDR and 10-bit HDR 4:2:0 and 4:4:4 streams. Sunshine advertises successfully probed profiles and rejects unsupported requests during RTSP negotiation.

  • Added bundling of pinned PyroWave and Granite dependencies.
  • Integrate encoding into the existing video pipeline.
  • Enable capability detection by default.

Clients must implement the added PyroWave negotiation and frame format.

Screenshot

Not captured.

Issues Fixed or Closed

None I'm aware of

Roadmap Issues

None I'm aware of

Testing

Added regression coverage for capability advertisement, RTSP negotiation, configuration, SDR/HDR conversion, packet framing, resource ownership, and failure handling.

Validation performed:

  • Linux release build passed.
  • Targeted native tests: 149 passed, 1 skipped
  • UI test passed
  • Verified installation includes dependency licenses and requires no separate PyroWave shared library.

The skipped test validated SDR/HDR packet containers but skipped pixel decoding on software Vulkan. Hardware capture and decoding, end-to-end playback, and other platform builds not tested. Full test suite and documentation build were not run.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

Codex (model: astra) assisted with implementation, tests, documentation, and validation

Activity

34
J
07670d6
LrrrAc13d ago

Noice, this is exciting!

cgutmanreviewed13d ago
ReenigneArcherrequested changes13d ago
ReenigneArcher13d ago

Thanks for the PR, this is just a preliminary review. I'm going to do a second review with AI assistance shortly.

This is on the roadmap, see https://github.com/LizardByte/roadmap/issues/181 ... I also created a milestone for this https://github.com/LizardByte/Sunshine/milestone/21

ReenigneArcherrequested changes13d ago
ReenigneArcher13d ago

Reviewed c0de7d06c67e99062a552e7ef6ed9b87c8ec1ade, including the complete PR diff and current master (5f823ddd69f240794ff5721a7033707a29dbf05d). Four additional build/behavior issues are detailed inline; existing review threads have not been duplicated.

Validation:

  • The unmodified PR configured under Windows/MSYS2 UCRT64, but building test_sunshine failed because the NVENC object targets cannot find pyrowave.h.
  • With a temporary, local-only dependency fix, the focused native filter *Pyrowave*-*Review* passed 20 tests, with 1 skipped because an FFmpeg-compatible Vulkan device was unavailable. Real-codec SDR/HDR encode/decode round trips passed. The full native suite was not run.
  • A supplemental bitrate-cap regression failed against the unchanged budget calculation, as described inline.
  • All 24 web configuration tests passed. Changed CMake files passed cmake-lint --line-width 120 --tab-size 4; changed native files passed clang-format 23.1.0, and the PR diff passed git diff --check.

The current Sonar quality gate also has 46 open new findings. Hosted Actions are awaiting maintainer approval; I inspected the failed GH-Pages Read the Docs log and it only timed out waiting for the corresponding workflow. That is a verification limit, not an additional code finding.

GitHub confirms merge conflicts (mergeable_state: dirty). Please rebase onto current master and resolve the conflicts before merging. Native macOS capture, a Flatpak build, and end-to-end client playback remain unverified.

Review completed by Codex | Model: gpt-6.1-sol | Thinking: xhigh

J
4a3194f
joshrmcdanielreviewed13d ago
joshrmcdanielreviewed13d ago
joshrmcdanielreviewed13d ago
J
d9c6091
joshrmcdanielreviewed13d ago
joshrmcdanielreviewed13d ago
joshrmcdanielreviewed13d ago
sonarqubecloud[bot]13d ago

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

andygrundman8d ago

Be aware that PyroWave support also exists in Vibeshine where various clients are already using it. It also has special FEC handling (since it's wasteful to protect the entire frame, only a part of the frame is protected). It's probably a good idea to make sure this is compatible. Xbox is running quite well with it in a new prerelease build today.

Also, please don't include any Mac changes with this. A large Mac PR is pending and I doubt it's a practical use case.