Skip to content

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Jan 4, 2023

Description

The NVENC encoder in FFmpeg currently doesn't use the AVCodecContext::profile value that we set to indicate which profile we want to use when encoding. As a result, H.264 default to using Main Profile which is less efficient than High Profile (what GFE and other Sunshine encoders use).

I've fixed this by introducing SDR and HDR specific options fields to encoder_t and populating those with the special "profile" encoder parameter required to set the encoding profile correctly. I removed the now-redundant profile values from encoder_t (which also fixed an issue with amdvce which was missing FF_PROFILE_HEVC_MAIN_10).

Screenshot

Issues Fixed or Closed

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

@cgutman cgutman force-pushed the fix_nvenc_h264_profile branch from 1c50c5f to 7018d6a Compare January 4, 2023 04:15
@ReenigneArcher ReenigneArcher force-pushed the fix_nvenc_h264_profile branch from 7018d6a to b2eadf9 Compare January 4, 2023 15:29
@ReenigneArcher ReenigneArcher merged commit 76896eb into LizardByte:nightly Jan 4, 2023
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

Successfully merging this pull request may close these issues.

2 participants