Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio is not sent streaming from MAC #3516

Open
2 tasks done
ndesgranges opened this issue Jan 5, 2025 · 2 comments
Open
2 tasks done

Audio is not sent streaming from MAC #3516

ndesgranges opened this issue Jan 5, 2025 · 2 comments

Comments

@ndesgranges
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the latest beta/pre-release?

This issue is present in the latest pre-release

Describe the Bug

On Mac M1 as host, audio won't work, clients does not receive anything

Expected Behavior

I'm expecting the sound thrown at the the "audio sink" to be transmitted to the client.

I've linked my complete, log, but I think this particular line is of interest :

Warning: audio_control_t::set_sink() unimplemented: BlackHole 2ch

Additional Context

The documentation states

Sunshine can only access microphones on macOS due to system limitations.
To stream system audio use Soundflower or BlackHole.

BlackHole is running, I've been able to test it, there is no issue there.

Host Operating System

macOS

Operating System Version

15.2

Architecture

amd64/x86_64

Sunshine commit or version

v2025.104.135703

Package

macOS - Homebrew

GPU Type

Apple Silicon

GPU Model

M1

GPU Driver/Mesa Version

M1

Capture Method

AVCaptureScreen (macOS)

Config

audio_sink = BlackHole 2ch
output_name = 2
sunshine_name = Mac M1

Apps

Relevant log output

[2025-01-05 01:46:17.068]: Info: Sunshine version: v2025.104.135703
[2025-01-05 01:46:17.069]: Info: Package Publisher: LizardByte
[2025-01-05 01:46:17.069]: Info: Publisher Website: https://app.lizardbyte.dev
[2025-01-05 01:46:17.069]: Info: Get support: https://app.lizardbyte.dev/support
[2025-01-05 01:46:17.136]: Warning: No gamepad input is available
[2025-01-05 01:46:17.136]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-05 01:46:17.136]: Info: Trying encoder [videotoolbox]
[2025-01-05 01:46:17.154]: Info: Detecting displays
[2025-01-05 01:46:17.154]: Info: Detected display: Essentiel+ (id: 2) connected: true
[2025-01-05 01:46:17.154]: Info: Detected display: Built-in Retina Display (id: 1) connected: true
[2025-01-05 01:46:17.154]: Info: Configuring selected display (2) to stream
[2025-01-05 01:46:17.160]: Info: Creating encoder [h264_videotoolbox]
[2025-01-05 01:46:17.160]: Info: Color coding: SDR (Rec. 601)
[2025-01-05 01:46:17.160]: Info: Color depth: 8-bit
[2025-01-05 01:46:17.160]: Info: Color range: JPEG
[2025-01-05 01:46:19.607]: Warning: [h264_videotoolbox @ 0x157129120] PrioritizeEncodingSpeedOverQuality property is not supported on this device. Ignoring.
[2025-01-05 01:46:19.608]: Info: [h264_videotoolbox @ 0x157129120] This device does not support the AllowOpenGop option. Value ignored.
[2025-01-05 01:46:19.848]: Info: Creating encoder [hevc_videotoolbox]
[2025-01-05 01:46:19.848]: Info: Color coding: SDR (Rec. 601)
[2025-01-05 01:46:19.848]: Info: Color depth: 8-bit
[2025-01-05 01:46:19.848]: Info: Color range: JPEG
[2025-01-05 01:46:19.861]: Info: [hevc_videotoolbox @ 0x15719f490] This device does not support the max_ref_frames option. Value ignored.
[2025-01-05 01:46:19.974]: Info: Creating encoder [av1_videotoolbox]
[2025-01-05 01:46:19.974]: Info: Color coding: SDR (Rec. 601)
[2025-01-05 01:46:19.974]: Info: Color depth: 8-bit
[2025-01-05 01:46:19.974]: Info: Color range: JPEG
[2025-01-05 01:46:19.974]: Error: Couldn't open [av1_videotoolbox]
[2025-01-05 01:46:19.975]: Info: Detecting displays
[2025-01-05 01:46:19.975]: Info: Detected display: Essentiel+ (id: 2) connected: true
[2025-01-05 01:46:19.975]: Info: Detected display: Built-in Retina Display (id: 1) connected: true
[2025-01-05 01:46:19.975]: Info: Configuring selected display (2) to stream
[2025-01-05 01:46:19.975]: Info: Creating encoder [hevc_videotoolbox]
[2025-01-05 01:46:19.975]: Info: Color coding: SDR (Rec. 709)
[2025-01-05 01:46:19.975]: Info: Color depth: 10-bit
[2025-01-05 01:46:19.975]: Info: Color range: JPEG
[2025-01-05 01:46:19.985]: Info: [hevc_videotoolbox @ 0x156771a80] This device does not support the max_ref_frames option. Value ignored.
[2025-01-05 01:46:20.091]: Info: 
[2025-01-05 01:46:20.091]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-05 01:46:20.091]: Info: 
[2025-01-05 01:46:20.091]: Info: Found H.264 encoder: h264_videotoolbox [videotoolbox]
[2025-01-05 01:46:20.091]: Info: Found HEVC encoder: hevc_videotoolbox [videotoolbox]
[2025-01-05 01:46:20.094]: Info: Configuration UI available at [https://localhost:47990]
[2025-01-05 01:46:20.812]: Info: Successfully registered DNS service.
[2025-01-05 01:46:40.806]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-05 01:46:40.807]: Info: Trying encoder [videotoolbox]
[2025-01-05 01:46:40.808]: Info: Detecting displays
[2025-01-05 01:46:40.808]: Info: Detected display: Essentiel+ (id: 2) connected: true
[2025-01-05 01:46:40.808]: Info: Detected display: Built-in Retina Display (id: 1) connected: true
[2025-01-05 01:46:40.808]: Info: Configuring selected display (2) to stream
[2025-01-05 01:46:40.808]: Info: Creating encoder [h264_videotoolbox]
[2025-01-05 01:46:40.808]: Info: Color coding: SDR (Rec. 601)
[2025-01-05 01:46:40.808]: Info: Color depth: 8-bit
[2025-01-05 01:46:40.808]: Info: Color range: JPEG
[2025-01-05 01:46:40.813]: Warning: [h264_videotoolbox @ 0x15730c6b0] PrioritizeEncodingSpeedOverQuality property is not supported on this device. Ignoring.
[2025-01-05 01:46:40.816]: Info: [h264_videotoolbox @ 0x15730c6b0] This device does not support the AllowOpenGop option. Value ignored.
[2025-01-05 01:46:40.966]: Info: Creating encoder [hevc_videotoolbox]
[2025-01-05 01:46:40.966]: Info: Color coding: SDR (Rec. 601)
[2025-01-05 01:46:40.966]: Info: Color depth: 8-bit
[2025-01-05 01:46:40.966]: Info: Color range: JPEG
[2025-01-05 01:46:40.980]: Info: [hevc_videotoolbox @ 0x156778c60] This device does not support the max_ref_frames option. Value ignored.
[2025-01-05 01:46:41.106]: Info: Creating encoder [av1_videotoolbox]
[2025-01-05 01:46:41.106]: Info: Color coding: SDR (Rec. 601)
[2025-01-05 01:46:41.106]: Info: Color depth: 8-bit
[2025-01-05 01:46:41.106]: Info: Color range: JPEG
[2025-01-05 01:46:41.106]: Error: Couldn't open [av1_videotoolbox]
[2025-01-05 01:46:41.106]: Info: Detecting displays
[2025-01-05 01:46:41.106]: Info: Detected display: Essentiel+ (id: 2) connected: true
[2025-01-05 01:46:41.106]: Info: Detected display: Built-in Retina Display (id: 1) connected: true
[2025-01-05 01:46:41.106]: Info: Configuring selected display (2) to stream
[2025-01-05 01:46:41.106]: Info: Creating encoder [hevc_videotoolbox]
[2025-01-05 01:46:41.107]: Info: Color coding: SDR (Rec. 709)
[2025-01-05 01:46:41.107]: Info: Color depth: 10-bit
[2025-01-05 01:46:41.107]: Info: Color range: JPEG
[2025-01-05 01:46:41.117]: Info: [hevc_videotoolbox @ 0x156779e30] This device does not support the max_ref_frames option. Value ignored.
[2025-01-05 01:46:41.222]: Info: 
[2025-01-05 01:46:41.222]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-05 01:46:41.222]: Info: 
[2025-01-05 01:46:41.222]: Info: Found H.264 encoder: h264_videotoolbox [videotoolbox]
[2025-01-05 01:46:41.222]: Info: Found HEVC encoder: hevc_videotoolbox [videotoolbox]
[2025-01-05 01:46:41.225]: Info: Executing: [open -a Ryujinx.app] in ["/usr/bin"]
[2025-01-05 01:46:41.433]: Info: New streaming session started [active sessions: 1]
[2025-01-05 01:46:41.456]: Info: CLIENT CONNECTED
[2025-01-05 01:46:41.456]: Info: App exited gracefully within 5 seconds of launch. Treating the app as a detached command.
[2025-01-05 01:46:41.456]: Info: Adjust this behavior in the Applications tab or apps.json if this is not what you want.
[2025-01-05 01:46:41.502]: Info: Detecting displays
[2025-01-05 01:46:41.502]: Info: Detected display: Essentiel+ (id: 2) connected: true
[2025-01-05 01:46:41.502]: Info: Detected display: Built-in Retina Display (id: 1) connected: true
[2025-01-05 01:46:41.502]: Info: Configuring selected display (2) to stream
[2025-01-05 01:46:41.604]: Info: Creating encoder [hevc_videotoolbox]
[2025-01-05 01:46:41.605]: Info: Color coding: SDR (Rec. 709)
[2025-01-05 01:46:41.605]: Info: Color depth: 8-bit
[2025-01-05 01:46:41.605]: Info: Color range: MPEG
[2025-01-05 01:46:41.649]: Info: [hevc_videotoolbox @ 0x1366064a0] This device does not support the max_ref_frames option. Value ignored.
[2025-01-05 01:46:41.903]: Warning: audio_control_t::set_sink() unimplemented: BlackHole 2ch
[2025-01-05 01:46:41.970]: Error: Failed to setup microphone.
[2025-01-05 01:46:41.970]: Error: Unable to initialize audio capture. The stream will not have audio.
[2025-01-05 01:47:07.935]: Info: alloc_gamepad: Gamepad not yet implemented for MacOS.
@Malthasa
Copy link

Malthasa commented Jan 7, 2025

Same Issue on linux

@Tomahawkd
Copy link

Tomahawkd commented Feb 1, 2025

Same issue. I found it is not implemented for now on MacOS.
https://github.com/LizardByte/Sunshine/blob/master/src/platform/macos/microphone.mm#L47

However, I guess it is implemented by using microphone to redirect audio to sunshine. It maybe a misconfiguration but I have't found any config for this.
https://github.com/LizardByte/Sunshine/blob/master/src/platform/macos/av_audio.m#L108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants