The system already selects which packages to install based on the hardware of the user: I don’t have intel-media-driver installed (cause no intel gpu) on my main system, and you likely don’t have mesa installed (if nvidia gpu) - I didn’t do that manually, it’s detected by OS. The feature you’re asking for already exists. As for the specific hardware capabilities it’s up to the packages themselves to detect what is supported, which they also already do (example “vainfo” shows media-driver can detect what your specific hardware supports).
In addition, basically every gpu younger than like 20 years or w/e supports hardware acceleration of all the codecs relevant here except h265.
The point is, the packages can’t use the codecs if they are not included at build time. In this thread we are discussing why they were removed from those packages, and if they can be reintroduced.
For some reason the patented codecs seem to be included in intel-media-driver (as an example you are familiar with) but not in ffmpeg or mesa etc. So it does not matter that both mesa and ffmpeg can detect that the hardware supports decoding for h264, the code for doing the en/de-coding is not present because they are removed from the packages by openSUSE.
The discussion might very well be relevant to take into factory mailing list, but I think its better to start here as both people in the mailing lists might read the forums, and it also allows silly mistakes like me being confused about the legal relationship between openSUSE and SUSE being ironed out before spamming any mailing list.