From 4ac8c5c8ec700a1fb32d7c1d8bd7b5df53e1a236 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:10:40 -0500 Subject: [PATCH] docs: improve examples (#1000) --- docs/source/about/advanced_usage.rst | 13 +- docs/source/about/app_examples.rst | 178 +++++++++++++++++++++++ docs/source/about/usage.rst | 9 +- docs/source/toc.rst | 1 + src_assets/common/assets/web/config.html | 2 +- 5 files changed, 196 insertions(+), 7 deletions(-) create mode 100644 docs/source/about/app_examples.rst diff --git a/docs/source/about/advanced_usage.rst b/docs/source/about/advanced_usage.rst index 1e46bb57..8c0881e5 100644 --- a/docs/source/about/advanced_usage.rst +++ b/docs/source/about/advanced_usage.rst @@ -7,7 +7,7 @@ Performance Tips AMD ^^^ -In Windows, enabling `Enahanced Sync` in AMD's settings may help reduce the latency by an additional frame. This +In Windows, enabling `Enhanced Sync` in AMD's settings may help reduce the latency by an additional frame. This applies to `amfenc` and `libx264`. Nvidia @@ -411,6 +411,8 @@ audio_sink tools\audio-info.exe + .. Tip:: If you want to mute the host speakers, use `virtual_sink`_ instead. + **Default** Sunshine will select the default audio device. @@ -439,8 +441,13 @@ virtual_sink .. Tip:: See `audio_sink`_! -**Default** - .. Todo:: Unknown + .. Tip:: These are some options for virtual sound devices. + + - Stream Streaming Speakers (Linux, macOS, Windows) + + - To use this option, you must have Steam installed and have used Stream remote play at least once. + + - `Virtual Audio Cable `_ (macOS, Windows) **Example** .. code-block:: text diff --git a/docs/source/about/app_examples.rst b/docs/source/about/app_examples.rst new file mode 100644 index 00000000..991af231 --- /dev/null +++ b/docs/source/about/app_examples.rst @@ -0,0 +1,178 @@ +App Examples +============ +Since not all applications behave the same, we decided to create some examples to help you get started adding games +and applications to Sunshine. + +.. Attention:: Throughout these examples, any fields not shown are left blank. You can enhance your experience by + adding an image or a log file (via the ``Output`` field). + +Common Examples +--------------- + +Desktop +^^^^^^^ + ++----------------------+-----------------+ +| **Field** | **Value** | ++----------------------+-----------------+ +| Application Name | ``Desktop`` | ++----------------------+-----------------+ +| Image | ``desktop.png`` | ++----------------------+-----------------+ + +Steam Big Picture +^^^^^^^^^^^^^^^^^ + +.. Note:: Steam is launched as a detached command because Steam starts with a process that self updates itself and the original + process is killed. Since the original process ends it will not work as a regular command. + ++----------------------+------------------------------------------+----------------------------------+-----------------------------------+ +| **Field** | **Linux** | **macOS** | **Windows** | ++----------------------+------------------------------------------+----------------------------------+-----------------------------------+ +| Application Name | ``Steam Big Picture`` | ++----------------------+------------------------------------------+----------------------------------+-----------------------------------+ +| Detached Commands | ``setsid steam steam://open/bigpicture`` | ``open steam://open/bigpicture`` | ``steam steam://open/bigpicture`` | ++----------------------+------------------------------------------+----------------------------------+-----------------------------------+ +| Image | ``steam.png`` | ++----------------------+------------------------------------------+----------------------------------+-----------------------------------+ + +Epic Game Store game +^^^^^^^^^^^^^^^^^^^^ + +.. Note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched + using the "Command" and therefore the stream will not end when the game ends. + +URI (Epic) +"""""""""" + ++----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| **Field** | **Windows** | ++----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Application Name | ``Surviving Mars`` | ++----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Detached Commands | ``cmd /C "start com.epicgames.launcher://apps/d759128018124dcabb1fbee9bb28e178%3A20729b9176c241f0b617c5723e70ec2d%3AOvenbird?action=launch&silent=true"`` | ++----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Binary (Epic w/ working directory) +"""""""""""""""""""""""""""""""""" + ++----------------------+-----------------------------------------------+ +| **Field** | **Windows** | ++----------------------+-----------------------------------------------+ +| Application Name | ``Surviving Mars`` | ++----------------------+-----------------------------------------------+ +| Command | ``cmd /c "MarsEpic.exe"`` | ++----------------------+-----------------------------------------------+ +| Working Directory | ``C:\Program Files\Epic Games\SurvivingMars`` | ++----------------------+-----------------------------------------------+ + +Binary (Epic w/o working directory) +""""""""""""""""""""""""""""""""""" + ++----------------------+--------------------------------------------------------------+ +| **Field** | **Windows** | ++----------------------+--------------------------------------------------------------+ +| Application Name | ``Surviving Mars`` | ++----------------------+--------------------------------------------------------------+ +| Command | ``"C:\Program Files\Epic Games\SurvivingMars\MarsEpic.exe"`` | ++----------------------+--------------------------------------------------------------+ + + +Steam game +^^^^^^^^^^ + +.. Note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched + using the "Command" and therefore the stream will not end when the game ends. + +URI (Steam) +""""""""""" + ++----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+ +| **Field** | **Linux** | **macOS** | **Windows** | ++----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+ +| Application Name | ``Surviving Mars`` | ++----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+ +| Detached Commands | ``setsid steam steam://rungameid/464920`` | ``open steam://rungameid/464920`` | ``cmd /C "start steam://rungameid/464920"`` | ++----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+ + +Binary (Steam w/ working directory) +""""""""""""""""""""""""""""""""""" + ++----------------------+-------------------------+-------------------------+------------------------------------------------------------------+ +| **Field** | **Linux** | **macOS** | **Windows** | ++----------------------+-------------------------+-------------------------+------------------------------------------------------------------+ +| Application Name | ``Surviving Mars`` | ++----------------------+-------------------------+-------------------------+------------------------------------------------------------------+ +| Command | ``MarsSteam`` | ``cmd /c "MarsSteam.exe"`` | ++----------------------+-------------------------+-------------------------+------------------------------------------------------------------+ +| Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` | ``C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars`` | ++----------------------+-------------------------+-------------------------+------------------------------------------------------------------+ + +Binary (Steam w/o working directory) +"""""""""""""""""""""""""""""""""""" + ++----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+ +| **Field** | **Linux** | **macOS** | **Windows** | ++----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+ +| Application Name | ``Surviving Mars`` | ++----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+ +| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` | ``"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars\MarsSteam.exe"`` | ++----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+ + +Linux +----- + +Changing Resolution and Refresh Rate (Linux - X11) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ++----------------------+--------------------------------------------------------------+ +| **Field** | **Value** | ++----------------------+--------------------------------------------------------------+ +| Command Preparations | Do: ``xrandr --output HDMI-1 --mode 1920x1080 --rate 60`` | +| +--------------------------------------------------------------+ +| | Undo: ``xrandr --output HDMI-1 --mode 3840×2160 --rate 120`` | ++----------------------+--------------------------------------------------------------+ + +Flatpak +^^^^^^^ + +.. Attention:: Because Flatpak packages run in a sandboxed environment and do not normally have access to the host, + the Flatpak of Sunshine requires commands to be prefixed with ``flatpak-spawn --host``. + +macOS +----- + +Changing Resolution and Refresh Rate (macOS) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. Note:: This example uses the `displayplacer` tool to change the resolution. + This tool can be installed following instructions in their + `GitHub repository `_. + ++----------------------+-----------------------------------------------------------------------------------------------+ +| **Field** | **Value** | ++----------------------+-----------------------------------------------------------------------------------------------+ +| Command Preparations | Do: ``displayplacer "id: res:1920x1080 hz:60 scaling:on origin:(0,0) degree:0"`` | +| +-----------------------------------------------------------------------------------------------+ +| | Undo: ``displayplacer "id: res:3840x2160 hz:120 scaling:on origin:(0,0) degree:0"`` | ++----------------------+-----------------------------------------------------------------------------------------------+ + +Windows +------- + +Changing Resolution and Refresh Rate (Windows) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. Note:: This example uses the `QRes` tool to change the resolution and refresh rate. + This tool can be downloaded from their `SourceForge repository `_. + ++----------------------+----------------------------------------------------+ +| **Field** | **Value** | ++----------------------+----------------------------------------------------+ +| Command Preparations | Do: ``FullPath\qres.exe /x:1920 /y:1080 /r:60`` | +| +----------------------------------------------------+ +| | Undo: ``FullPath\qres.exe /x:3840 /y:2160 /r:120`` | ++----------------------+----------------------------------------------------+ + +.. Tip:: You can change your host resolution to match the client resolution automatically using the + `Nonary/ResolutionAutomation `_ project. diff --git a/docs/source/about/usage.rst b/docs/source/about/usage.rst index 6422a72e..db7af09e 100644 --- a/docs/source/about/usage.rst +++ b/docs/source/about/usage.rst @@ -206,7 +206,7 @@ Application List - ``"Variable name":"Variable value"`` - ``apps`` - The list of applications - Advanced users may want to edit the application list manually. The format is ``json``. -- Example application: +- Example ``json`` application: .. code-block:: json { @@ -248,6 +248,8 @@ Application List - ``working-dir`` - The working directory to use. If not specified, Sunshine will use the application directory. +- For more examples see :ref:`app examples `. + Considerations -------------- - When an application is started, if there is an application already running, it will be terminated. @@ -256,8 +258,9 @@ Considerations - For example, if you attempt to run ``steam`` as a ``cmd`` instead of ``detached`` the stream will immediately fail. This is due to the method in which the steam process is executed. Other applications may behave similarly. -- In addition to the apps listed, one app "Desktop" is hardcoded into Sunshine. It does not start an application, - instead it simply starts a stream. +- The "Desktop" app works the same as any other application except it has no commands. It does not start an application, + instead it simply starts a stream. If you removed it and would like to get it back, just add a new application with + the name "Desktop" and "desktop.png" as the image path. - For the Linux flatpak you must prepend commands with ``flatpak-spawn --host``. HDR Support diff --git a/docs/source/toc.rst b/docs/source/toc.rst index eff935bb..da8e946f 100644 --- a/docs/source/toc.rst +++ b/docs/source/toc.rst @@ -7,6 +7,7 @@ about/docker about/third_party_packages about/usage + about/app_examples about/advanced_usage .. toctree:: diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index 9fbc0854..6f555e36 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -434,7 +434,7 @@ v-model="config.output_name" />
- You can select the video card you want to stream:
+ You can select the display you want to stream:
The appropriate values can be found using the following command:
tools\dxgi-info.exe