nvenc plugin initialization should be optional
Use case: we're running a video decoder which needs to "instantly" start up to 16 video decoding pipelines (with NVIDIA HW-acceleration) at once.
Problem: We're seeing quite a delay (10 seconds and more) to start up all players. One issue we found was the nvdec
plugin creating a large amount of CUDA contexts (#1130 (closed)), which got solved and got the delay closer to ≅ 5 seconds. However, this is still quite a lot.
Upon closer investigation, we found that nvenc
is also loading its own CUDA contexts (to know which caps it supports). Given the fact that we don't really need HW-accelerating encoding, we need a way to either disable the nvenc
plugin, or to somehow avoid loading the contexts.