Skip to content

Commit

Permalink
Update docs for new nvenc options
Browse files Browse the repository at this point in the history
  • Loading branch information
ns6089 committed Oct 29, 2023
1 parent 90ad87c commit 0435847
Showing 1 changed file with 143 additions and 0 deletions.
143 changes: 143 additions & 0 deletions docs/source/about/advanced_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,59 @@ nvenc_twopass
nvenc_twopass = quarter_res
nvenc_spatial_aq
^^^^^^^^^^^^^^^^

**Description**
Assign higher QP values to flat regions of the video.
Recommended to enable when streaming at lower bitrates.

.. Note:: This option only applies when using NVENC `encoder`_.

**Choices**

.. table::
:widths: auto

========== ===========
Value Description
========== ===========
disabled Don't enable Spatial AQ (faster)
enabled Enable Spatial AQ (slower)
========== ===========

**Default**
``disabled``

**Example**
.. code-block:: text
nvenc_spatial_aq = disabled
nvenc_vbv_increase
^^^^^^^^^^^^^^^^^^

**Description**
Single-frame VBV/HRD percentage increase.
By default sunshine uses single-frame VBV/HRD, which means any encoded video frame size is not expected to exceed requested bitrate divided by requested frame rate.
Relaxing this restriction can be beneficial and act as low-latency variable bitrate, but may also lead to packet loss if the network doesn't have buffer headroom to handle bitrate spikes.
Maximum accepted value is 400, which corresponds to 5x increased encoded video frame upper size limit.

.. Note:: This option only applies when using NVENC `encoder`_.

.. Warning:: Can lead to network packet loss.

**Default**
``0``

**Range**
``0-400``

**Example**
.. code-block:: text
nvenc_vbv_increase = 0
nvenc_realtime_hags
^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -1077,6 +1130,96 @@ nvenc_realtime_hags
nvenc_realtime_hags = enabled
nvenc_h264_hevc_ref_frames
^^^^^^^^^^^^^^^^^^^^^^^^^^

**Description**
Default value for H.264 and HEVC reference frames in DPB (decoder picture buffer).
Override default sunshine value in situations when moonlight doesn't request one explicitly.
Higher values can provide larger pool for reference frame invalidation on unstable networks, but specific decoders may not handle it well depending on video resolution.

.. Note:: This option only applies when using NVENC `encoder`_.

.. Note:: Doesn't apply to AV1 since it uses predetermined value as part of specification.

.. Warning:: Can lead to (or remedy) decoding artifacts.

.. Caution:: Applies to Windows only.

**Default**
Variable is unset and sunshine will pick whatever it thinks is the best.

**Range**
``1-15``

**Example**
.. code-block:: text
nvenc_h264_hevc_ref_frames = 5
nvenc_latency_over_power
^^^^^^^^^^^^^^^^^^^^^^^^

**Description**
Adaptive P-State algorithm which NVIDIA drivers employ doesn't work well with low latency streaming, so sunshine requests high power mode explicitly.

.. Note:: This option only applies when using NVENC `encoder`_.

.. Warning:: Disabling it is not recommended since this can lead to significantly increased encoding latency.

.. Caution:: Applies to Windows only.

**Choices**

.. table::
:widths: auto

========== ===========
Value Description
========== ===========
disabled Sunshine doesn't change GPU power preferences (not recommended)
enabled Sunshine requests high power mode explicitly
========== ===========

**Default**
``enabled``

**Example**
.. code-block:: text
nvenc_latency_over_power = enabled
nvenc_opengl_vulkan_on_dxgi
^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Description**
Sunshine can't capture fullscreen OpenGL and Vulkan programs at full frame rate unless they present on top of DXGI.
This is system-wide setting that is reverted on sunshine program exit.

.. Note:: This option only applies when using NVENC `encoder`_.

.. Caution:: Applies to Windows only.

**Choices**

.. table::
:widths: auto

========== ===========
Value Description
========== ===========
disabled Sunshine leaves global Vulkan/OpenGL present method unchanged
enabled Sunshine changes global Vulkan/OpenGL present method to "Prefer layered on DXGI Swapchain"
========== ===========

**Default**
``enabled``

**Example**
.. code-block:: text
nvenc_opengl_vulkan_on_dxgi = enabled
nvenc_h264_cavlc
^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 0435847

Please sign in to comment.