Skip to content

nvenc, amdvce: rework all user presets/options#623

Merged
ReenigneArcher merged 2 commits intoLizardByte:nightlyfrom
psyke83:nvidia_new_presets
Dec 28, 2022
Merged

nvenc, amdvce: rework all user presets/options#623
ReenigneArcher merged 2 commits intoLizardByte:nightlyfrom
psyke83:nvidia_new_presets

Conversation

@psyke83
Copy link
Contributor

@psyke83 psyke83 commented Dec 26, 2022

Description

nvenc: rework all user presets/options

  • Presets: remove deprecated presets; add new p1-p7 presets; set "p4" as default.
  • Tuning: add new tuning options; set "ull" as default.
  • Rate control: remove deprecated options; set "cbr" as default.
  • Web UI: keep case consistency (NVEnc -> NVENC, all drop-down options as lowercase);
    ensure all default options are clearly indicated.
  • Coder: clarify H264-only status; keep default to "auto".
  • Ensure all default presets are correctly identical between C++ and HTML code.
  • To improve future compatibility, refer to all possible options via same
    definitions used in ffmpeg code via nvenc headers.
  • Docs: update with new profile and tuning options.

amdvce: rework all user presets/options

  • Quality - fix different values used between codecs; set "balanced" as default.
  • Rate control: remove "auto"; set "vbr_latency" as default.
  • Web UI: keep consistency (AMD AMF -> AMF, all drop-down options as lowercase);
    ensure all default options are clearly indicated.
  • Coder: clarify H264-only status; keep default to "auto".
  • Ensure all default presets are correctly identical between C++ and HTML code.
  • To improve future compatibility, refer to all possible options via same
    definitions used in ffmpeg code via AMF headers.
  • Docs: update with new options and descriptions.

Screenshot

Screenshot from 2022-12-27 19-50-19

Screenshot from 2022-12-27 19-50-29

Issues Fixed or Closed

Closes #211

TODO

  • Requires new FFMPEG binaries + NVIDIA headers present for Sunshine to build
  • Verify if build breaks on platforms that don't distribute NVENC headers
  • Fix merge conflicts after FFmpeg 5 and pre-built CBS #509 is merged

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@psyke83 psyke83 force-pushed the nvidia_new_presets branch 6 times, most recently from da3fc6d to 04e9618 Compare December 26, 2022 01:02
@psyke83 psyke83 marked this pull request as draft December 26, 2022 01:29
@psyke83 psyke83 force-pushed the nvidia_new_presets branch 3 times, most recently from 650da32 to 225a6e5 Compare December 26, 2022 02:05
@psyke83 psyke83 mentioned this pull request Dec 26, 2022
10 tasks
@KuleRucket
Copy link
Contributor

KuleRucket commented Dec 26, 2022

What is the reason for VBR as default? Nvidia recommends CBR for cloud gaming/streaming.

https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-video-encoder-api-prog-guide/#recommended-nvenc-settings

EDIT: wrong link to recommendations section

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just have a minor suggestion to docs

@psyke83 psyke83 force-pushed the nvidia_new_presets branch 2 times, most recently from a8db6d0 to 7195b4d Compare December 27, 2022 17:33
@psyke83
Copy link
Contributor Author

psyke83 commented Dec 27, 2022

@ReenigneArcher:

I've also updated the AMF encoder, as I noticed that the "Quality" setting differs between codecs and therefore requires special handling.

An outstanding issue with this PR is that it may break macos due to the nv/amf headers not being available. Would you prefer that I hardcode the definitions that needs these headers (and thus lose future-proofing compatibility), or exclude the sections via something like #ifndef __APPLE__?

If opting for the first option seems best, future-proofing could be improved if we make <libavcodec/nvenc.h> available to Sunshine's build include path as well.

@psyke83 psyke83 force-pushed the nvidia_new_presets branch 2 times, most recently from 172b294 to 0131257 Compare December 27, 2022 19:04
@psyke83 psyke83 marked this pull request as ready for review December 27, 2022 19:05
@psyke83 psyke83 force-pushed the nvidia_new_presets branch 3 times, most recently from 3556a87 to ab0c100 Compare December 27, 2022 20:52
@psyke83 psyke83 changed the title nvenc: rework all user presets/options nvenc, amdvce: rework all user presets/options Dec 27, 2022
* Presets: remove deprecated presets; add new p1-p7 presets; set "p4" as default.
* Tuning: add new tuning options; set "ull" as default.
* Rate control: remove deprecated options; set "cbr" as default.
* Web UI: keep case consistency (NVEnc -> NVENC, all drop-down options as lowercase);
  ensure all default options are clearly indicated.
* Coder: clarify H264-only status; keep default to "auto".
* Ensure all default presets are correctly identical between C++ and HTML code.
* To improve future compatibility, refer to all possible options via same
  definitions used in ffmpeg code via nvenc headers.
* Docs: update with new profile and tuning options.
* Quality - fix different values used between codecs; set "balanced" as default.
* Rate control: remove "auto"; set "vbr_latency" as default.
* Web UI: keep consistency (AMD AMF -> AMF, all drop-down options as lowercase);
  ensure all default options are clearly indicated.
* Coder: clarify H264-only status; keep default to "auto".
* Ensure all default presets are correctly identical between C++ and HTML code.
* To improve future compatibility, refer to all possible options via same
  definitions used in ffmpeg code via AMF headers.
* Docs: update with new options and descriptions.
@ReenigneArcher ReenigneArcher merged commit 215c864 into LizardByte:nightly Dec 28, 2022
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Dec 28, 2022
@psyke83 psyke83 deleted the nvidia_new_presets branch February 15, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants