#1035902 obs-studio: NVENC codec fails unless I use ffmpeg to encode a video first

Package:
obs-studio
Source:
obs-studio
Description:
recorder and streamer for live video content
Submitter:
Rishi Cutchin
Date:
2024-01-11 09:51:02 UTC
Severity:
normal
#1035902#5
Date:
2023-05-10 21:11:18 UTC
From:
To:
Dear Maintainer,


   Run obs-studio, and attempted to record a video with NVENC selected as
   the encoder.

   Fails with this error:
   rishi@tripodhost:~$ [h264_nvenc @ 0x56294719dfc0] dl_fn->cuda_dl->cuInit(0) failed -> CUDA_ERROR_U_SNKNOWN: unknown error
warning: [NVENC encoder] nvenc_create_internal failed, trying again without Psycho Visual Tuning
info: ---------------------------------
info: [FFmpeg NVENC encoder: 'advanced_video_recording'] settings:
        encoder:      NVIDIA NVENC H.264 (FFmpeg)
        rate_control: CBR
        bitrate:      2500
        cqp:          0
        keyint:       250
        preset:       p5
        tuning:       hq
        multipass:    qres
        profile:      high
        width:        1920
        height:       1080
        b-frames:     2
        psycho-aq:    0
        GPU:          0

[h264_nvenc @ 0x5629471a2c80] dl_fn->cuda_dl->cuInit(0) failed -> CUDA_ERROR_UNKNOWN: unknown error

But after encoding a video with ffmpeg on the command line with nvenc:
 $ffmpeg -i output.mp4 -c:v h264_nvenc -b:v 1M outputtwo.mp4
Subsequent attempts to use NVENC on obs succeed.

#1035902#10
Date:
2024-01-11 09:13:41 UTC
From:
To:
Hi,

i cannot reproduce this problem.

i'm using ffmpeg_7:6.1.1-1 and nvidia-driver_535.43.02-1 (from
experimental, as the version in stable currently cannot be used by
ffmpeg to run nvenc).

Does the problem still exist on your side?

#1035902#15
Date:
2024-01-11 09:47:44 UTC
From:
To:
Current ffmpeg requires nvidia-driver from experimental for nvenc. This
issue will be fixed once nvidia-driver from experimental is uploaded to
unstable.

Cheers