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, is there anything more that needs to be changed or do I need to do anything more to get the PR approved? |
|
Thanks. I don’t have any further code changes to request on The remaining item from my earlier review is playback validation. If your existing test covered high-quality 5.1 AC-3 on a 1500-byte MTU path, please share the exact Sunshine and Tizen client revisions and whether playback stayed clean. If it didn’t cover that case, please retest it on the current PR head. The writer tests cover buffer capacity, not whether the larger audio packets reach the client and play correctly. Maintainer-gated CI is separate; there’s nothing for you to change there. Review completed by Codex | Model: unavailable | Thinking: unavailable |
|
One new fix is needed on Please add the bool to the declaration and call, then extend the existing socket test to check that the serialized Review completed by Codex | Model: unavailable | Thinking: unavailable |
Manual Dolby audio validationTested using Moonlight Tizen v1.3.2 stable and a Windows AMD64 build of Sunshine. Sunshine build:
Results:
Both Dolby tests successfully reported HQ audio through Moonlight's statistics overlay. The Opus result is included for comparison only; its existing behavior is outside the scope of this PR. |
|
Thanks for pinning down the versions. I verified that the fork workflow checked out Review completed by Codex | Model: unavailable | Thinking: unavailable |
Playback validation – E-AC-3 5.1 over a 1500-byte MTU pathHi, I have completed the playback validation requested. Test environment
MTU 1500 verification The host Ethernet interface reports an MTU of 1500 bytes. I also verified the complete path to the Tizen client ( ping 192.168.0.41 -f -l 1472All four packets were received successfully, with no fragmentation and 0% packet loss. Since 1472 bytes of ICMP payload plus the 28-byte IPv4/ICMP headers equals 1500 bytes, this confirms that the path supports 1500-byte IPv4 packets without fragmentation. Audio playback results
The previous AC-3 stereo and 5.1 tests also showed the HQ indicator in green. Conclusion High-quality Dolby audio negotiation and playback work correctly on the tested 1500-byte MTU network path. No playback issues were observed. |
|
Thanks, that confirms clean 5.1 E-AC-3 playback. Could you repeat the listening check on the same setup with AC-3 selected instead of E-AC-3, keeping 5.1 and HQ enabled? The host sends 640 kbps for HQ 5.1 AC-3 versus 384 kbps for HQ 5.1 E-AC-3, so the AC-3 case exercises larger packets. The existing build is fine; just note whether you hear dropouts or distortion. If you already listened to the earlier AC-3 run on this same setup, confirming that is enough. Review completed by Codex | Model: unavailable | Thinking: unavailable |
|
Test setup
Playback results
The AC-3 5.1 playback sounded good, with no audible dropouts or distortion. The HQ indicator remained green throughout the test. This confirms clean HQ playback with both AC-3 and E-AC-3 in stereo and 5.1 on the same MTU 1500 setup. All four Dolby HQ bitrates match the values configured in Sunshine. |
|
@ReenigneArcher Do you need anything more? |
|
Patience... there's 75 open PRs. I'm going as fast as I can. |
|
Ok, Patience is something I have :) No problem |
Hi @ReenigneArcher, This PR has been ready for merging for two days now. Please merge it soon. I'm concerned that new changes to the master branch might cause further issues that would prevent a conflict-free merge. |
There was a problem hiding this comment.
Hi, @ReenigneArcher What happened? Why is this closed now without merge?
|
I don't have time to review this right now and you seem to not have patience. |
@ReenigneArcher I just wanted to make sure there wouldn't be any new conflicts with the target branch, as has happened before. I've put a lot of effort and work into this PR, so I didn't want to make it harder to merge. That's why I left another reminder with the warning. I didn't mean to sound impatient—just cautious. That's all. Please reactivate this PR so that it remains pending merge if everything is correct, as it appeared to be earlier. |
|
@ReenigneArcher I don't really understand how the PR process works or how long it's reasonable for a pending merge to remain on hold. I'm not really familiar with how GitHub works, how pull requests are typically handled, or how long it takes to complete a successful merge. That's why I may have been a little too eager about this. I thought that two days after the last response, it was reasonable to check in and express interest in its status, just in case it had been forgotten. So, please reactivate the PR, and I'll wait as long as it takes. From now on, I'll consider it normal to have to wait several days for it to be processed. |
|
This is one of the one most popular projects on all of GitHub, and we are inundated with PRs now that AI has made it so anyone can contribute. Unfortunately stuff is going to sit in review a lot longer now. We used to have 20-30 pending PRs at a time. Now it's 70-80 while I have AI reviewing issues and PRs basically 24/7. I have not even really looked at this PR in detail, but I think to improve the chances of getting this merged it would be good if other moonlight clients supported these audio codecs. Right now it seems like your fork is the only one? |
|
I
You're right, and I understand. I apologize if I was too pushy. For my part, I've put a great deal of effort into the Moonlight client for Tizen to ensure it works properly with Dolby Digital audio. It's a project I conceived several years ago. Indeed, this is currently the only GameStream client that uses the audio stream in that format. |
|
|
@ReenigneArcher But you should also consider its importance—not just if you’re the only one who will be using the audio stream in this format. In the case of TizenOS (which is the operating system used by all Samsung TVs), using the AC-3 or E-AC-3 format is essential because, otherwise, you won’t be able to get 5.1-channel surround sound. On clients running Windows, macOS, or other Linux distributions, this may not be as important, since there are more routing options on the client side. But to ensure playback on any TV running TizenOS (which, as I mentioned, includes all Samsung TVs as well as some others), this aspect is crucial. Without this format, it’s impossible to achieve surround sound in any other way. And currently this is the only active Moonlight client being mantained and developed for this platform. There isn't any other. You can see detailed info about this here: https://fidoboy.github.io/moonlight-tizen-ac3/ |



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. Higher bitrates increase network bandwidth usage.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.