My laptop has two GPUs, an integrated intel GPU and a dedicated Nvidia GPU, which provides support for external monitors.
I have been facing a video card related issue for a while, but never bothered to check for a solution since a simple restart always solves it. I use OBS studio and Kdenlive for recording and video editing. To make things faster, I use the nvec codec, which uses the Nvidia GPU. This works fine, except that sometimes after my laptop hasn’t been rebooted for a couple of days, I get “failed to open nvec codec” when trying to record my screen, for example. Kdenlive also fails to use the nvec codec to export files. I thought at first that maybe the nvidia drivers have crashed, but my external monitors, which are connected to the GPU, are running. So, the problem is likely somewhre else. The only way I know of resolving this issue at the moment is through a system restart. I wonder if there’s a way to fix this issue without restarting the system as I sometimes have a lot of things running.
It would be good to rule it out, since if ffmpeg continues to work using the h264_nvenc encoder, then it hints to an issue higher up (such as Kdenlive and OBS, or something shared between the two.)
If ffmpeg fails, then it points to a more lower-level issue (hardware? driver?), and perhaps an issue interrelated to ffmpeg itself, since it’s usually used as a backend for other software. (It could even be an issue with FFmpeg version 4 vs version 5).