Nvcodec/nvenc: Nvidia deprecates support for old VideoCodec SDK H.264+HEVC encoder presets with driver R550 in Q1'24

Just received an information email from Nvidia that they will deprecate support for the old encoding presets as well as RC modes for the H.264 and HEVC HW encoders available in older versions of their Video Codec SDK. As far as I know, the current ‘nvcodec’ H.264 and HEVC encoders in the associated ‘-bad’ plugin do not yet support the new presets and RC modes introduced in Video Codec SDK v. 10.0 (June 2020). As Nvidia plans to entirely remove the backwards compatible support for the old presets and RC modes in their upcoming driver release R550 due in Q1 '24, it will mean that these GStreamer plugin encoders will not be able to work on top of those forthcoming drivers (except maybe if only using default values).

We are using currently using these encoders on Linux and will likely be able to delay the upgrade of the drivers but at some point we will hit the issue where other things force us to upgrade the drivers. Unfortunately, I will not have time/opportunity to work on fixes for the GST plugin (nor any real experience with it) but posting here in the hope that someone else can pick it up.

Introducing actual support for the new presets and RC modes should happen in a major version release of GStreamer, but maybe some sort of backwards compatible handling of the old presets could be useful to get backported into the previous release. Nvidia do have a preset migration guide that could be used for that purpose.

I’m going to add the new preset support into nv{cuda,d3d11,autogpu} encoder elements

3 Likes

That sounds great, Seungha. Looking forward to that.

May I also suggest to at least consider adding some backwards compatible handling into the previous release to ensure that it’ll also work for the new drivers. E.g. bring in the new preset feature in next major release (1.24?) and then add some backwards compatible handling into the current one (1.22) assuming that there is another minor release of it. Not everyone may be prepared to update the full version of GStreamer to “just” get these fixes in. Unless the new version of the plugin can function properly with the previous version of GStreamer (although sounds like a dangerous path).
We’re not even at 1.22 for the use of these plugins, btw., but we should be able to handle the upgrade to either 1.22 or 1.24 within the time period before the Nvidia R550 drivers are out and we also hit the need to update to that.

I’ll merge nvencoder: Add support for new preset/tune/multi-pass options (!5428) · Merge requests · GStreamer / gstreamer · GitLab soon but not sure I would backport it into the 1.22 stable branch or not.

Just wondering if you can share the mail from nvidia that announcing the backward compatibility break (or some kind of post/announce from nvidia). That sounds quite unexpected decision to me.

Hi @seungha,

Fantastic. Was not expecting such a fast reaction to this. :+1: Have not looked at the changes yet, but will take a look later.

Sure, I can share the email. I should have done that in my post. The email seems to be a general mailing-list one and does not have any “confidential” stickers on it, so I think I can safely share it here:


[NVIDIA Logo109x20

Video Codec SDK Introducing Changes to Older Preset and RC Mode Support

Planned rollout in 2024.

What to Know About This Update

The NVIDIA Video Codec SDK is working towards updates regarding preset support. In this update support for older presets will be removed.

Background:

  • Video Codec SDK introduced new presets (p1-p7) and RC modes for H264 and HEVC in Video Codec SDK 10.0 in June 2020. This was done to simplify the usage of NVENC presets.
  • Older presets and RC modes are currently supported in four SDK versions (10.0, 11.0, 11.1, 12.0).
  • The older presets and RC modes support only HEVC and H.264. ‌AV1 or new features such as split encode, encode quality improvements done post v10.0 are not supported.
  • In SDK 12.1, the older presets and RC modes were removed from the Video SDK C header.
  • Video Codec SDK supports backward compatibility. Applications compiled with SDK versions < 10.0 using older presets and older RC modes are supported in the driver.

Future steps:

  • The plan is to remove ‌driver support in R550 (Q1’24). Therefore, all applications compiled with older presets/RC modes will stop working if upgraded to R550 drivers.
  • The R545 will be the last driver release which will support the older presets and RC modes. The R545 release notes will have the final warning included.

Migration guide:

  • NVIDIA has provided a migration guide (NVENC Preset Migration Guide - NVIDIA Docs) to enable a seamless transition to the new NVENC API preset architecture.
  • Please refer to the link below for details regarding HEVC, H.264 migration tables.

Learn More

Hi @seungha,

Took at brief look at the changes, and they seem good to me (although I’m also not too familiar with the GStreamer innards around this area). It seems that you’ve kept the old presets and marked them deprecated and then translate them internally to the new presets. That seems like a good choice. Then these deprecated presets can be removed in the next major release. Maybe put in a comment in code on this translation of the old presets to new ones with a link to the guide from Nvidia.

For the backporting considerations, I think it could be good to have continued functionality in at least one previous (current) release so that it can continue to function after the driver update. It could be handled with similar internal conversion from old presets to new ones, although I’m aware that the suggested changes will not be able to be backported 1:1. This would allow the transition boundary for some to be lower not requiring a full update to a new major release just to get by Nvidia’s choice and driver updates. However, not sure how many will hit this issue and thus benefit from such a backporting. For what I’m working on; we should likely be able to just upgrade to the new full major release when we need it.

Thanks.

Hi @seungha,

just walked through the release notes of 1.24 and did not notice this being mentioned. So, I suppose these changes did not make it into 1.24 ?
(Although I can see it mentioned on official documentation page here nvd3d11h265enc but that is perhaps due to being based on main branch).

I think it would be good that these changes come in as part of next minor release in the 1.24.x-series to be sure to be ready for the Nvidia driver release that removes the old presets.

new encoders nv{cuda,d3d11,autogpu}{h264,h265}enc in 1.24 release contain the new preset support

1 Like

That sounds great. Then apparently it just did not get mentioned in the release notes (which is a bit of shame for such a change, imho).

Thanks. Will look forward to test/using this at some point then.