Repository navigation
Conversation
|
Update: I retrieved the raw log for the I added the missing comments in c9ad363. The new Per your guidance, I have not started the GitHub Actions workflows. I have also left the separate |
We only get 20 runners from GitHub and these are basically running all day long, so I'll run it when I'm ready to merge the code. Docs failures are here: https://app.readthedocs.org/projects/sunshinestream/builds/35131897/ Don't worry about the other already reported failure. Your agent can lint and build the docs if it follows the AGENTS.md file. |
ReenigneArcher
left a comment
There was a problem hiding this comment.
Requesting changes on c9ad3637b48907316f3957f72ac46cb9c7155023: the settings page cannot see the advertised encoder capabilities, and the new backend/negotiation behavior has no added regression tests.
On FFmpeg packaging, I recommend using Sunshine's existing linked FFmpeg libraries for this feature. The pinned build-deps configuration enables the encoders, and its published macOS archive already contains both native encoders. I linked the PR's extracted encoder class to that archive and successfully encoded all eight combinations of AC-3/E-AC-3, stereo/5.1, and normal/high quality. This establishes that a second runtime FFmpeg distribution is unnecessary for those encoding operations; it is not a Windows DLL-loader test.
The native AC-3 and E-AC-3 implementations are LGPL-2.1-or-later, compatible with Sunshine's GPL-3.0 licensing. FFmpeg's legal page distinguishes copyright licensing from codec patents. I found no identified licensing requirement in this PR that mandates user-supplied DLLs. Dolby's 2007 filing listed original Dolby Digital patent expirations through 2017 and Dolby Digital Plus through 2022; that historical disclosure is not comprehensive present-day patent or trademark clearance.
Validation: 28 existing focused Vue tests passed, along with two temporary review reproductions showing the settings bug and verifying the proposed endpoint correction; all eight isolated encoding cases passed; whitespace checks passed for all 15 changed files. The reproductions and probes live outside the working checkout and are not tests contributed by this PR.
GitHub reports the head as mergeable and behind master (current branch tip a178f465e42f8e77102002e9156b8becd7b13628). The Sunshine documentation check passed. Full Windows builds, Windows DLL loading, client passthrough, and protocol interoperability were not verified locally; GitHub Actions await maintainer approval. The reported Sonar issue points to the unchanged permission-status test override, so it is not a new-code finding.
Review completed by Codex | Model: gpt-6.1-sol | Thinking: xhigh
|
Thanks for the detailed review. I pushed a revision to address the requested changes:
The code and tests are committed, but I have not run the revised Windows build or tests locally. I have updated the PR description to reflect that CI and playback re-validation of the linked-FFmpeg change are still pending. I have not attempted to start the Actions workflows, per your note about the runner pool. |
|
I extended the revision beyond the review fixes to remove the remaining Windows/runtime-DLL assumptions:
The current branch head contains these changes. I have not run the revised build/tests or verified Dolby playback on other platforms; per the earlier request, I am leaving Actions for maintainer scheduling. |
|
Hi @ReenigneArcher. How are you today? |
ReenigneArcher
left a comment
There was a problem hiding this comment.
Thanks for the update and for testing with the Tizen client. I’m requesting changes on 31044d8. Please fix the audio transport boundary and keep the diff focused on the Dolby feature.
Audio transport (blocking). The encoder can hand off a Dolby frame that the transport’s fixed-size storage cannot accommodate. The sender should check the actual destination capacity before writing, including any encryption padding. Please give the encoder and sender a shared limit, reject frames that don’t fit, and add transport-boundary coverage for both encrypted and unencrypted audio. The current encoder test exercises encoding into a separate, larger buffer, so it does not cover this boundary.
RTSP. Keep the existing OPTIONS, DESCRIBE, and PLAY handler signatures; the forwarding wrappers are not needed. Put the codec offer in DESCRIBE and the acceptance in ANNOUNCE without otherwise rewriting the handlers. Please cover the actual ANNOUNCE response for both a Dolby-capable client and a legacy Opus client. The new response header is currently sent even when no Dolby codec was offered.
Web UI. Revert the whitespace-only change in Config.vue and the unused include in confighttp.cpp. Keep the quality-toggle behavior local to AudioVideo.vue; a disabled fieldset can wrap the existing checkbox without changing the shared Checkbox.vue. Keep localization changes in en.json only and revert es.json.
Includes, comments, and docs. Move the FFmpeg headers into the existing library include group, retain extern "C" as in the other FFmpeg call sites, and drop the linkage comment. Describe opus as the default audio codec, not as the previous implementation. Put the test include group first in tests/unit/test_audio.cpp. In the user docs, drop the separate-DLL explanation and focus on client support and the fallback. The standard build-deps configuration enables native encoders; please distinguish any limitation of custom FFmpeg builds from supported release builds, and verify encoder availability in the official artifacts before making platform claims.
This was a source review, not a live playback test.
Review completed by Codex | Model: unavailable | Thinking: unavailable
|
fidoboy
left a comment
There was a problem hiding this comment.
Created the requested changes



Description
This PR adds optional Dolby Digital (AC-3) and Dolby Digital Plus (E-AC-3) encoded audio output to Sunshine on platforms whose linked FFmpeg build contains the corresponding encoders. Compatible Moonlight clients can negotiate these formats as an alternative to Opus when they need a compressed Dolby bitstream for native decoding or passthrough.
The main use case is Moonlight running directly on a Smart TV connected to a receiver or sound system through optical S/PDIF. AC-3 can provide Dolby Digital stereo or 5.1 output over compatible TV audio paths. Actual output depends on the TV model, its audio settings, the receiver, and client support; E-AC-3 passthrough over optical output is model-dependent.
Related client implementation
The companion Moonlight Tizen with AC-3 support (see details in its website) implements the client-side Dolby offer/accept negotiation and passthrough through Tizen's native EMSS audio renderer. It is an independently maintained client and is linked here as an example of a client that uses this new host feature. This PR changes Sunshine only; other clients need their own support for the optional negotiation and playback/passthrough path.
Implementation
High quality audioswitch, disabled by default, for higher Dolby bitrates at the cost of increased network bandwidth. It has no effect on Opus and is disabled in the UI while Opus is selected.The existing Opus encoder and its normal negotiation path are intended to remain behaviorally unchanged. This is a host-side feature, not a Tizen-only or Windows-only server feature.
Testing
sunshinestreamRead the Docs build passed (build 35163518).masterinto the feature branch in commite7e57df; GitHub reports no merge conflicts.Type of Change
Checklist
lb-update-clang-formathelper has been run and a second pass produced no changes; other lint checks have not been run on the latest revision).AI Usage
The contributor remains responsible for reviewing the implementation, verifying test results, and addressing review feedback.