LizardByte / Sunshine

Self-hosted game stream host for Moonlight.
http://app.lizardbyte.dev/Sunshine/
GNU General Public License v3.0
20.01k stars 962 forks source link

Changing output_name doesn't change the streaming display | MacOS Ventura M1 #2352

Closed nenkoru closed 7 months ago

nenkoru commented 7 months ago

Is there an existing issue for this?

Is your issue described in the documentation?

Is your issue present in the nightly release?

Describe the Bug

Changing output_name to another display's name does not change the display the stream is coming from.

Expected Behavior

Either an error should be produced saying a display is not found or the streaming should with a display explicitly defined in output_name config file.

Additional Context

Created a virtual display using another software which works fine. Wanted to stream the display to my tablet but sunshine still uses the default, main display of the laptop.

Host Operating System

macOS

Operating System Version

13.6.3 (22G436)

Architecture

arm

Sunshine commit or version

0.22.2

Package

other (self built)

GPU Type

none (software encoding)

GPU Model

M1 Pro

GPU Driver/Mesa Version

-

Capture Method (Linux Only)

-

Config

restart_supported = false
vt_software = auto
sw_preset = ultrafast
sw_tune = zerolatency
output_name = -999999999999
min_log_level = debug

Apps

No response

Relevant log output

[min_log_level] -- [debug]
[sw_tune] -- [zerolatency]
[sw_preset] -- [ultrafast]
[output_name] -- [-999999999999]
[vt_software] -- [auto]
[restart_supported] -- [false]
Warning: Unrecognized configurable option [restart_supported]
[2024:04:02:15:07:28]: Info: Sunshine version: 0.22.2.bb7c2d5
[2024:04:02:15:07:28]: Debug: Display 1, pixel dimension: 1496x967
[2024:04:02:15:07:28]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:04:02:15:07:28]: Info: Trying encoder [videotoolbox]
[2024:04:02:15:07:28]: Info: SDR color coding [Rec. 601]
[2024:04:02:15:07:28]: Info: Color depth: 8-bit
[2024:04:02:15:07:28]: Info: Color range: [JPEG]
[2024:04:02:15:07:28]: Warning: [h264_videotoolbox @ 0x157f063f0] PrioritizeEncodingSpeedOverQuality property is not supported on this device. Ignoring.
[2024:04:02:15:07:28]: Info: [h264_videotoolbox @ 0x157f063f0] This device does not support the AllowOpenGop option. Value ignored.
[2024:04:02:15:07:28]: Info: SDR color coding [Rec. 601]
[2024:04:02:15:07:28]: Info: Color depth: 8-bit
[2024:04:02:15:07:28]: Info: Color range: [JPEG]
[2024:04:02:15:07:28]: Info: [hevc_videotoolbox @ 0x157f1e440] This device does not support the qmin option. Value ignored.
[2024:04:02:15:07:28]: Info: [hevc_videotoolbox @ 0x157f1e440] This device does not support the qmax option. Value ignored.
[2024:04:02:15:07:28]: Info: SDR color coding [Rec. 601]
[2024:04:02:15:07:28]: Info: Color depth: 8-bit
[2024:04:02:15:07:28]: Info: Color range: [JPEG]
[2024:04:02:15:07:28]: Error: Couldn't open [av1_videotoolbox]
[2024:04:02:15:07:28]: Info: SDR color coding [Rec. 709]
[2024:04:02:15:07:28]: Info: Color depth: 10-bit
[2024:04:02:15:07:28]: Info: Color range: [JPEG]
[2024:04:02:15:07:28]: Info: [hevc_videotoolbox @ 0x15885df60] This device does not support the qmin option. Value ignored.
[2024:04:02:15:07:28]: Info: [hevc_videotoolbox @ 0x15885df60] This device does not support the qmax option. Value ignored.
[2024:04:02:15:07:28]: Info: 
[2024:04:02:15:07:28]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:04:02:15:07:28]: Info: 
[2024:04:02:15:07:28]: Debug: ------  h264 ------
[2024:04:02:15:07:28]: Debug: unknown: supported
[2024:04:02:15:07:28]: Debug: unknown: supported
[2024:04:02:15:07:28]: Debug: unknown: supported
[2024:04:02:15:07:28]: Debug: unknown: unsupported
[2024:04:02:15:07:28]: Debug: unknown: supported
[2024:04:02:15:07:28]: Debug: -------------------
[2024:04:02:15:07:28]: Info: Found H.264 encoder: h264_videotoolbox [videotoolbox]
[2024:04:02:15:07:28]: Debug: ------  hevc ------
[2024:04:02:15:07:28]: Debug: unknown: supported
[2024:04:02:15:07:28]: Debug: unknown: supported
[2024:04:02:15:07:28]: Debug: unknown: supported
[2024:04:02:15:07:28]: Debug: unknown: supported
[2024:04:02:15:07:28]: Debug: unknown: supported
[2024:04:02:15:07:28]: Debug: -------------------
[2024:04:02:15:07:28]: Info: Found HEVC encoder: hevc_videotoolbox [videotoolbox]
[2024:04:02:15:07:28]: Error: Couldn't find any of the following libraries: [libavahi-common.3.dylib, libavahi-common.dylib]
[2024:04:02:15:07:28]: Info: Configuration UI available at [https://localhost:47990]
[2024:04:02:15:07:32]: Debug: TUNNEL :: NONE
[2024:04:02:15:07:32]: Debug: METHOD :: GET
[2024:04:02:15:07:32]: Debug: DESTINATION :: /serverinfo
[2024:04:02:15:07:32]: Debug: Accept-Encoding -- gzip
[2024:04:02:15:07:32]: Debug: User-Agent -- okhttp/3.12.13
[2024:04:02:15:07:32]: Debug: Connection -- Keep-Alive
[2024:04:02:15:07:32]: Debug: Host -- 192.168.1.100:47989
[2024:04:02:15:07:32]: Debug:  [--] 
[2024:04:02:15:07:32]: Debug: uuid -- f12485e2-3596-4cb3-abba-d7d6a527b46b
[2024:04:02:15:07:32]: Debug: uniqueid -- 0123456789ABCDEF
[2024:04:02:15:07:32]: Debug:  [--] 
[2024:04:02:15:07:32]: Debug: /CN=NVIDIA GameStream Client -- verified
[2024:04:02:15:07:32]: Debug: TUNNEL :: HTTPS
[2024:04:02:15:07:32]: Debug: METHOD :: GET
[2024:04:02:15:07:32]: Debug: DESTINATION :: /serverinfo
[2024:04:02:15:07:32]: Debug: Accept-Encoding -- gzip
[2024:04:02:15:07:32]: Debug: User-Agent -- okhttp/3.12.13
[2024:04:02:15:07:32]: Debug: Connection -- Keep-Alive
[2024:04:02:15:07:32]: Debug: Host -- 192.168.1.100:47984
[2024:04:02:15:07:32]: Debug:  [--] 
[2024:04:02:15:07:32]: Debug: uuid -- 972f46e1-4e7e-48c9-9a1f-7c62e4c1d482
[2024:04:02:15:07:32]: Debug: uniqueid -- 0123456789ABCDEF
[2024:04:02:15:07:32]: Debug:  [--] 
[2024:04:02:15:07:33]: Debug: /CN=NVIDIA GameStream Client -- verified
[2024:04:02:15:07:33]: Debug: TUNNEL :: HTTPS
[2024:04:02:15:07:33]: Debug: METHOD :: GET
[2024:04:02:15:07:33]: Debug: DESTINATION :: /serverinfo
[2024:04:02:15:07:33]: Debug: Accept-Encoding -- gzip
[2024:04:02:15:07:33]: Debug: User-Agent -- okhttp/3.12.13
[2024:04:02:15:07:33]: Debug: Connection -- Keep-Alive
[2024:04:02:15:07:33]: Debug: Host -- 192.168.1.100:47984
[2024:04:02:15:07:33]: Debug:  [--] 
[2024:04:02:15:07:33]: Debug: uuid -- 754ff41c-9c41-4dbd-a8e2-cfc21ff445c6
[2024:04:02:15:07:33]: Debug: uniqueid -- 0123456789ABCDEF
[2024:04:02:15:07:33]: Debug:  [--] 
[2024:04:02:15:07:33]: Debug: /CN=NVIDIA GameStream Client -- verified
[2024:04:02:15:07:33]: Debug: TUNNEL :: HTTPS
[2024:04:02:15:07:33]: Debug: METHOD :: GET
[2024:04:02:15:07:33]: Debug: DESTINATION :: /applist
[2024:04:02:15:07:33]: Debug: Accept-Encoding -- gzip
[2024:04:02:15:07:33]: Debug: User-Agent -- okhttp/3.12.13
[2024:04:02:15:07:33]: Debug: Connection -- Keep-Alive
[2024:04:02:15:07:33]: Debug: Host -- 192.168.1.100:47984
[2024:04:02:15:07:33]: Debug:  [--] 
[2024:04:02:15:07:33]: Debug: uuid -- 2370c495-b80d-4da5-9031-9d07e5c91385
[2024:04:02:15:07:33]: Debug: uniqueid -- 0123456789ABCDEF
[2024:04:02:15:07:33]: Debug:  [--] 
[2024:04:02:15:07:34]: Debug: /CN=NVIDIA GameStream Client -- verified
[2024:04:02:15:07:34]: Debug: TUNNEL :: HTTPS
[2024:04:02:15:07:34]: Debug: METHOD :: GET
[2024:04:02:15:07:34]: Debug: DESTINATION :: /serverinfo
[2024:04:02:15:07:34]: Debug: Accept-Encoding -- gzip
[2024:04:02:15:07:34]: Debug: User-Agent -- okhttp/3.12.13
[2024:04:02:15:07:34]: Debug: Connection -- Keep-Alive
[2024:04:02:15:07:34]: Debug: Host -- 192.168.1.100:47984
[2024:04:02:15:07:34]: Debug:  [--] 
[2024:04:02:15:07:34]: Debug: uuid -- 8b7d766a-4e0b-4e04-b8ae-febcacc7a95b
[2024:04:02:15:07:34]: Debug: uniqueid -- 0123456789ABCDEF
[2024:04:02:15:07:34]: Debug:  [--] 
[2024:04:02:15:07:34]: Debug: /CN=NVIDIA GameStream Client -- verified
[2024:04:02:15:07:34]: Debug: TUNNEL :: HTTPS
[2024:04:02:15:07:34]: Debug: METHOD :: GET
[2024:04:02:15:07:34]: Debug: DESTINATION :: /launch
[2024:04:02:15:07:34]: Debug: Accept-Encoding -- gzip
[2024:04:02:15:07:34]: Debug: User-Agent -- okhttp/3.12.13
[2024:04:02:15:07:34]: Debug: Connection -- Keep-Alive
[2024:04:02:15:07:34]: Debug: Host -- 192.168.1.100:47984
[2024:04:02:15:07:34]: Debug:  [--] 
[2024:04:02:15:07:34]: Debug: uuid -- 1c8e2293-80e7-49a6-a7e1-8af8916d82da
[2024:04:02:15:07:34]: Debug: corever -- 1
[2024:04:02:15:07:34]: Debug: sops -- 1
[2024:04:02:15:07:34]: Debug: remoteControllersBitmap -- 0
[2024:04:02:15:07:34]: Debug: gcpersist -- 0
[2024:04:02:15:07:34]: Debug: localAudioPlayMode -- 0
[2024:04:02:15:07:34]: Debug: rikeyid -- 539780875
[2024:04:02:15:07:34]: Debug: additionalStates -- 1
[2024:04:02:15:07:34]: Debug: uniqueid -- 0123456789ABCDEF
[2024:04:02:15:07:34]: Debug: rikey -- 293742323667B3547FB0A398D164BEE1
[2024:04:02:15:07:34]: Debug: appid -- 1577243657
[2024:04:02:15:07:34]: Debug: surroundAudioInfo -- 196610
[2024:04:02:15:07:34]: Debug: gcmap -- 0
[2024:04:02:15:07:34]: Debug: mode -- 2880x1800x30
[2024:04:02:15:07:34]: Debug:  [--] 
[2024:04:02:15:07:34]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:04:02:15:07:34]: Info: Trying encoder [videotoolbox]
[2024:04:02:15:07:34]: Info: SDR color coding [Rec. 601]
[2024:04:02:15:07:34]: Info: Color depth: 8-bit
[2024:04:02:15:07:34]: Info: Color range: [JPEG]
[2024:04:02:15:07:34]: Warning: [h264_videotoolbox @ 0x127f06770] PrioritizeEncodingSpeedOverQuality property is not supported on this device. Ignoring.
[2024:04:02:15:07:34]: Info: [h264_videotoolbox @ 0x127f06770] This device does not support the AllowOpenGop option. Value ignored.
[2024:04:02:15:07:34]: Info: SDR color coding [Rec. 601]
[2024:04:02:15:07:34]: Info: Color depth: 8-bit
[2024:04:02:15:07:34]: Info: Color range: [JPEG]
[2024:04:02:15:07:34]: Info: [hevc_videotoolbox @ 0x137e14700] This device does not support the qmin option. Value ignored.
[2024:04:02:15:07:34]: Info: [hevc_videotoolbox @ 0x137e14700] This device does not support the qmax option. Value ignored.
[2024:04:02:15:07:34]: Info: SDR color coding [Rec. 601]
[2024:04:02:15:07:34]: Info: Color depth: 8-bit
[2024:04:02:15:07:34]: Info: Color range: [JPEG]
[2024:04:02:15:07:34]: Error: Couldn't open [av1_videotoolbox]
[2024:04:02:15:07:34]: Info: SDR color coding [Rec. 709]
[2024:04:02:15:07:34]: Info: Color depth: 10-bit
[2024:04:02:15:07:34]: Info: Color range: [JPEG]
[2024:04:02:15:07:34]: Info: [hevc_videotoolbox @ 0x15885f6e0] This device does not support the qmin option. Value ignored.
[2024:04:02:15:07:34]: Info: [hevc_videotoolbox @ 0x15885f6e0] This device does not support the qmax option. Value ignored.
[2024:04:02:15:07:34]: Info: 
[2024:04:02:15:07:34]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:04:02:15:07:34]: Info: 
[2024:04:02:15:07:34]: Debug: ------  h264 ------
[2024:04:02:15:07:34]: Debug: unknown: supported
[2024:04:02:15:07:34]: Debug: unknown: supported
[2024:04:02:15:07:34]: Debug: unknown: supported
[2024:04:02:15:07:34]: Debug: unknown: unsupported
[2024:04:02:15:07:34]: Debug: unknown: supported
[2024:04:02:15:07:34]: Debug: -------------------
[2024:04:02:15:07:34]: Info: Found H.264 encoder: h264_videotoolbox [videotoolbox]
[2024:04:02:15:07:34]: Debug: ------  hevc ------
[2024:04:02:15:07:34]: Debug: unknown: supported
[2024:04:02:15:07:34]: Debug: unknown: supported
[2024:04:02:15:07:34]: Debug: unknown: supported
[2024:04:02:15:07:34]: Debug: unknown: supported
[2024:04:02:15:07:34]: Debug: unknown: supported
[2024:04:02:15:07:34]: Debug: -------------------
[2024:04:02:15:07:34]: Info: Found HEVC encoder: hevc_videotoolbox [videotoolbox]
[2024:04:02:15:07:34]: Info: Executing [Desktop]
[2024:04:02:15:07:34]: Debug: handle_read_encrypted_header(): Handle read of size: 24 bytes
[2024:04:02:15:07:34]: Debug: handle_read_encrypted(): Handle read of size: 104 bytes
[2024:04:02:15:07:34]: Debug: type [REQUEST]
[2024:04:02:15:07:34]: Debug: sequence number [1]
[2024:04:02:15:07:34]: Debug: protocol :: RTSP/1.0
[2024:04:02:15:07:34]: Debug: payload :: 
[2024:04:02:15:07:34]: Debug: command :: OPTIONS
[2024:04:02:15:07:34]: Debug: target :: rtspenc://192.168.1.100:48010
[2024:04:02:15:07:34]: Debug: CSeq :: 1
[2024:04:02:15:07:34]: Debug: X-GS-ClientVersion :: 14
[2024:04:02:15:07:34]: Debug: Host :: 192.168.1.100
[2024:04:02:15:07:34]: Debug: ---Begin MessageBuffer---
OPTIONS
---End MessageBuffer---
[2024:04:02:15:07:34]: Debug: ---Begin Response---
RTSP/1.0 200 OK
CSeq: 1

---End Response---
[2024:04:02:15:07:34]: Debug: handle_read_encrypted_header(): Handle read of size: 24 bytes
[2024:04:02:15:07:34]: Debug: handle_read_encrypted(): Handle read of size: 180 bytes
[2024:04:02:15:07:34]: Debug: type [REQUEST]
[2024:04:02:15:07:34]: Debug: sequence number [2]
[2024:04:02:15:07:34]: Debug: protocol :: RTSP/1.0
[2024:04:02:15:07:34]: Debug: payload :: 
[2024:04:02:15:07:34]: Debug: command :: DESCRIBE
[2024:04:02:15:07:34]: Debug: target :: rtspenc://192.168.1.100:48010
[2024:04:02:15:07:34]: Debug: CSeq :: 2
[2024:04:02:15:07:34]: Debug: X-GS-ClientVersion :: 14
[2024:04:02:15:07:34]: Debug: Host :: 192.168.1.100
[2024:04:02:15:07:34]: Debug: Accept :: application/sdp
[2024:04:02:15:07:34]: Debug: If-Modified-Since :: Thu, 01 Jan 1970 00:00:00 GMT
[2024:04:02:15:07:34]: Debug: ---Begin MessageBuffer---
DESCRIBE
---End MessageBuffer---
[2024:04:02:15:07:34]: Debug: ---Begin Response---
RTSP/1.0 200 OK
CSeq: 2

a=x-ss-general.featureFlags:0
a=x-ss-general.encryptionSupported:5
a=x-ss-general.encryptionRequested:1
sprop-parameter-sets=AAAAAU
a=fmtp:97 surround-params=21101
a=fmtp:97 surround-params=21101
a=fmtp:97 surround-params=642012453
a=fmtp:97 surround-params=660012345
a=fmtp:97 surround-params=85301245367
a=fmtp:97 surround-params=88001234567

---End Response---
[2024:04:02:15:07:34]: Debug: handle_read_encrypted_header(): Handle read of size: 24 bytes
[2024:04:02:15:07:34]: Debug: handle_read_encrypted(): Handle read of size: 189 bytes
[2024:04:02:15:07:34]: Debug: type [REQUEST]
[2024:04:02:15:07:34]: Debug: sequence number [3]
[2024:04:02:15:07:34]: Debug: protocol :: RTSP/1.0
[2024:04:02:15:07:34]: Debug: payload :: 
[2024:04:02:15:07:34]: Debug: command :: SETUP
[2024:04:02:15:07:34]: Debug: target :: streamid=audio/0/0
[2024:04:02:15:07:34]: Debug: CSeq :: 3
[2024:04:02:15:07:34]: Debug: X-GS-ClientVersion :: 14
[2024:04:02:15:07:34]: Debug: Host :: 192.168.1.100
[2024:04:02:15:07:34]: Debug: Transport :: unicast;X-GS-ClientPort=50000-50001
[2024:04:02:15:07:34]: Debug: If-Modified-Since :: Thu, 01 Jan 1970 00:00:00 GMT
[2024:04:02:15:07:34]: Debug: ---Begin MessageBuffer---
SETUP
---End MessageBuffer---
[2024:04:02:15:07:34]: Debug: ---Begin Response---
RTSP/1.0 200 OK
CSeq: 3
Session: DEADBEEFCAFE;timeout = 90
Transport: server_port=48000
X-SS-Ping-Payload: 403E5E78DFBA82D7

---End Response---
[2024:04:02:15:07:34]: Debug: handle_read_encrypted_header(): Handle read of size: 24 bytes
[2024:04:02:15:07:34]: Debug: handle_read_encrypted(): Handle read of size: 212 bytes
[2024:04:02:15:07:34]: Debug: type [REQUEST]
[2024:04:02:15:07:34]: Debug: sequence number [4]
[2024:04:02:15:07:34]: Debug: protocol :: RTSP/1.0
[2024:04:02:15:07:34]: Debug: payload :: 
[2024:04:02:15:07:34]: Debug: command :: SETUP
[2024:04:02:15:07:34]: Debug: target :: streamid=video/0/0
[2024:04:02:15:07:34]: Debug: CSeq :: 4
[2024:04:02:15:07:34]: Debug: X-GS-ClientVersion :: 14
[2024:04:02:15:07:34]: Debug: Host :: 192.168.1.100
[2024:04:02:15:07:34]: Debug: Session :: DEADBEEFCAFE
[2024:04:02:15:07:34]: Debug: Transport :: unicast;X-GS-ClientPort=50000-50001
[2024:04:02:15:07:34]: Debug: If-Modified-Since :: Thu, 01 Jan 1970 00:00:00 GMT
[2024:04:02:15:07:34]: Debug: ---Begin MessageBuffer---
SETUP
---End MessageBuffer---
[2024:04:02:15:07:34]: Debug: ---Begin Response---
RTSP/1.0 200 OK
CSeq: 4
Session: DEADBEEFCAFE;timeout = 90
Transport: server_port=47998
X-SS-Ping-Payload: 403E5E78DFBA82D7

---End Response---
[2024:04:02:15:07:34]: Debug: handle_read_encrypted_header(): Handle read of size: 24 bytes
[2024:04:02:15:07:34]: Debug: handle_read_encrypted(): Handle read of size: 215 bytes
[2024:04:02:15:07:34]: Debug: type [REQUEST]
[2024:04:02:15:07:34]: Debug: sequence number [5]
[2024:04:02:15:07:34]: Debug: protocol :: RTSP/1.0
[2024:04:02:15:07:34]: Debug: payload :: 
[2024:04:02:15:07:34]: Debug: command :: SETUP
[2024:04:02:15:07:34]: Debug: target :: streamid=control/13/0
[2024:04:02:15:07:34]: Debug: CSeq :: 5
[2024:04:02:15:07:34]: Debug: X-GS-ClientVersion :: 14
[2024:04:02:15:07:34]: Debug: Host :: 192.168.1.100
[2024:04:02:15:07:34]: Debug: Session :: DEADBEEFCAFE
[2024:04:02:15:07:34]: Debug: Transport :: unicast;X-GS-ClientPort=50000-50001
[2024:04:02:15:07:34]: Debug: If-Modified-Since :: Thu, 01 Jan 1970 00:00:00 GMT
[2024:04:02:15:07:34]: Debug: ---Begin MessageBuffer---
SETUP
---End MessageBuffer---
[2024:04:02:15:07:34]: Debug: ---Begin Response---
RTSP/1.0 200 OK
CSeq: 5
Session: DEADBEEFCAFE;timeout = 90
Transport: server_port=47999
X-SS-Connect-Data: 1790144605

---End Response---
[2024:04:02:15:07:34]: Debug: handle_read_encrypted_header(): Handle read of size: 24 bytes
[2024:04:02:15:07:34]: Debug: handle_read_encrypted(): Handle read of size: 1635 bytes
[2024:04:02:15:07:34]: Debug: type [REQUEST]
[2024:04:02:15:07:34]: Debug: sequence number [6]
[2024:04:02:15:07:34]: Debug: protocol :: RTSP/1.0
[2024:04:02:15:07:34]: Debug: payload :: v=0
o=android 0 14 IN IPv4 192.168.1.100
s=NVIDIA Streaming Client
a=x-ml-general.featureFlags:3 
a=x-ss-general.encryptionEnabled:5 
a=x-nv-video[0].clientViewportWd:2880 
a=x-nv-video[0].clientViewportHt:1800 
a=x-nv-video[0].maxFPS:30 
a=x-nv-video[0].packetSize:1392 
a=x-nv-video[0].rateControlMode:4 
a=x-nv-video[0].timeoutLengthMs:7000 
a=x-nv-video[0].framesWithInvalidRefThreshold:0 
a=x-nv-video[0].initialBitrateKbps:21600 
a=x-nv-video[0].initialPeakBitrateKbps:21600 
a=x-nv-vqos[0].bw.minimumBitrateKbps:21600 
a=x-nv-vqos[0].bw.maximumBitrateKbps:21600 
a=x-ml-video.configuredBitrateKbps:27000 
a=x-nv-vqos[0].fec.enable:1 
a=x-nv-vqos[0].videoQualityScoreUpdateTime:5000 
a=x-nv-vqos[0].qosTrafficType:5 
a=x-nv-aqos.qosTrafficType:4 
a=x-nv-general.featureFlags:167 
a=x-nv-general.useReliableUdp:13 
a=x-nv-vqos[0].fec.minRequiredFecPackets:2 
a=x-nv-vqos[0].bllFec.enable:0 
a=x-nv-vqos[0].drc.enable:0 
a=x-nv-general.enableRecoveryMode:0 
a=x-nv-video[0].videoEncoderSlicesPerFrame:1 
a=x-nv-clientSupportHevc:1 
a=x-nv-vqos[0].bitStreamFormat:1 
a=x-nv-video[0].dynamicRangeMode:0 
a=x-nv-video[0].maxNumReferenceFrames:0 
a=x-nv-video[0].clientRefreshRateX100:9000 
a=x-nv-audio.surround.numChannels:2 
a=x-nv-audio.surround.channelMask:3 
a=x-nv-audio.surround.enable:0 
a=x-nv-audio.surround.AudioQuality:0 
a=x-nv-aqos.packetDuration:5 
a=x-nv-video[0].encoderCscMode:2 
t=0 0
m=video 47998  
[2024:04:02:15:07:34]: Debug: command :: ANNOUNCE
[2024:04:02:15:07:34]: Debug: target :: streamid=control/13/0
[2024:04:02:15:07:34]: Debug: CSeq :: 6
[2024:04:02:15:07:34]: Debug: X-GS-ClientVersion :: 14
[2024:04:02:15:07:34]: Debug: Host :: 192.168.1.100
[2024:04:02:15:07:34]: Debug: Session :: DEADBEEFCAFE
[2024:04:02:15:07:34]: Debug: Content-type :: application/sdp
[2024:04:02:15:07:34]: Debug: Content-length :: 1462
[2024:04:02:15:07:34]: Debug: ---Begin MessageBuffer---
ANNOUNCE
---End MessageBuffer---
[2024:04:02:15:07:34]: Debug: Found Host: 192.168.1.100
[2024:04:02:15:07:34]: Debug: Client configured bitrate is 27000 Kbps
[2024:04:02:15:07:34]: Debug: Final adjusted video encoding bitrate is 20588 Kbps
[2024:04:02:15:07:34]: Debug: Expecting incoming session connections from 192.168.1.111
[2024:04:02:15:07:34]: Debug: ---Begin Response---
RTSP/1.0 200 OK
CSeq: 6

---End Response---
[2024:04:02:15:07:34]: Debug: handle_read_encrypted_header(): Handle read of size: 24 bytes
[2024:04:02:15:07:34]: Debug: handle_read_encrypted(): Handle read of size: 96 bytes
[2024:04:02:15:07:34]: Debug: type [REQUEST]
[2024:04:02:15:07:34]: Debug: sequence number [7]
[2024:04:02:15:07:34]: Debug: protocol :: RTSP/1.0
[2024:04:02:15:07:34]: Debug: payload :: 
[2024:04:02:15:07:34]: Debug: command :: PLAY
[2024:04:02:15:07:34]: Debug: target :: /
[2024:04:02:15:07:34]: Debug: CSeq :: 7
[2024:04:02:15:07:34]: Debug: X-GS-ClientVersion :: 14
[2024:04:02:15:07:34]: Debug: Host :: 192.168.1.100
[2024:04:02:15:07:34]: Debug: Session :: DEADBEEFCAFE
[2024:04:02:15:07:34]: Debug: ---Begin MessageBuffer---
PLAY
---End MessageBuffer---
[2024:04:02:15:07:34]: Debug: ---Begin Response---
RTSP/1.0 200 OK
CSeq: 7

---End Response---
[2024:04:02:15:07:34]: Debug: Initialized new control stream session by connect data match [v2]
[2024:04:02:15:07:34]: Debug: Control local address [192.168.1.100]
[2024:04:02:15:07:34]: Debug: Control peer address [192.168.1.111:55707]
[2024:04:02:15:07:34]: Info: CLIENT CONNECTED
[2024:04:02:15:07:34]: Debug: type [IDX_REQUEST_IDR_FRAME]
[2024:04:02:15:07:34]: Debug: type [IDX_START_B]
[2024:04:02:15:07:34]: Debug: RAISE: 192.168.1.111:45307 :: VIDEO
[2024:04:02:15:07:34]: Debug: Received ping [v2] from 192.168.1.111:45307 [0100000037443238414246443837453545333034]
[2024:04:02:15:07:34]: Debug: Start capturing Video
[2024:04:02:15:07:34]: Debug: --begin relative mouse move packet--
deltaX [1]
deltaY [1]
--end relative mouse move packet--
[2024:04:02:15:07:34]: Debug: mouse_event: 0, type: 5, location:660.738:490.598 click_count: 0
[2024:04:02:15:07:34]: Debug: --begin relative mouse move packet--
deltaX [-1]
deltaY [-1]
--end relative mouse move packet--
[2024:04:02:15:07:34]: Debug: mouse_event: 0, type: 5, location:659.738:489.598 click_count: 0
[2024:04:02:15:07:34]: Info: SDR color coding [Rec. 709]
[2024:04:02:15:07:34]: Info: Color depth: 8-bit
[2024:04:02:15:07:34]: Info: Color range: [MPEG]
[2024:04:02:15:07:34]: Debug: mouse_event: 0, type: 5, location:660.738:490.598 click_count: 0
[2024:04:02:15:07:34]: Debug: mouse_event: 0, type: 5, location:659.738:489.598 click_count: 0
[2024:04:02:15:07:34]: Info: [hevc_videotoolbox @ 0x157f1c1b0] This device does not support the qmin option. Value ignored.
[2024:04:02:15:07:34]: Info: [hevc_videotoolbox @ 0x157f1c1b0] This device does not support the qmax option. Value ignored.
[2024:04:02:15:07:34]: Debug: Sent HDR mode: false
[2024:04:02:15:07:35]: Debug: RAISE: 192.168.1.111:60341 :: AUDIO
[2024:04:02:15:07:35]: Debug: Received ping [v2] from 192.168.1.111:60341 [0200000037443238414246443837453545333034]
[2024:04:02:15:07:35]: Debug: Start capturing Audio
[2024:04:02:15:07:35]: Debug: type [Unknown] { 5502 }
---data---
0100C801000000020001000100BB00BC0013000000
---end data---
[2024:04:02:15:07:36]: Error: opening microphone '' failed. Please set a valid input source in the Sunshine config.
[2024:04:02:15:07:36]: Error: Available inputs:
[2024:04:02:15:07:36]: Error:   MacBook Pro Microphone
[2024:04:02:15:07:36]: Error:   Immersed
[2024:04:02:15:07:36]: Error:   Microsoft Teams Audio
[2024:04:02:15:07:36]: Error:   VB-Cable
[2024:04:02:15:07:36]: Error: Unable to initialize audio capture. The stream will not have audio.
[2024:04:02:15:07:37]: Info: Interrupt handler called
[2024:04:02:15:07:38]: Debug: Waiting for video to end...
[2024:04:02:15:07:38]: Debug: Waiting for audio to end...
[2024:04:02:15:07:38]: Debug: Waiting for control to end...
[2024:04:02:15:07:38]: Debug: Resetting Input...
[2024:04:02:15:07:38]: Debug: Session ended
[2024:04:02:15:07:38]: Debug: Waiting for main listening thread to end...
[2024:04:02:15:07:38]: Debug: Waiting for main video thread to end...
[2024:04:02:15:07:38]: Debug: Waiting for main audio thread to end...
[2024:04:02:15:07:38]: Debug: Waiting for main control thread to end...
[2024:04:02:15:07:38]: Debug: All broadcasting threads ended
ReenigneArcher commented 7 months ago

Well, it's listed as a "todo" in our docs.

Any devs who actually use macOS are welcome to submit a PR/fix.

nenkoru commented 7 months ago

Apparently it is already implemented and works as expected. Albeit not making any output to the console. https://github.com/LizardByte/Sunshine/blob/bb7c2d50ef50bf5bca34c2b873c9cf74e0745baa/src/platform/macos/display.mm#L145C5-L156C6

I managed to enumerate all the displays using CGGetOnlineDisplayList by python bindings for the ease of debugging using the following code:

import Quartz
displays = Quartz.CoreGraphics.CGGetOnlineDisplayList(12, None, None)[1]
for display in displays:
    print(display)

It would print the ids of displays. Setting the output_name in a config file to the respective id makes it to work. I am not sure what behaviour should be expected when the requested display does not exist, so I can't make a respective change to the code. But if you(@ReenigneArcher) could point this out -> I would happily make my first contribution to this beautiful project. =)

ReenigneArcher commented 7 months ago

Maybe this will get you started. https://github.com/LizardByte/Sunshine/blob/bb7c2d50ef50bf5bca34c2b873c9cf74e0745baa/src/video.cpp#L984

nenkoru commented 7 months ago

Closing as this does work, but needs to have more verbosity. Will create a PR soon referring to this issue.