Getting errors while streaming on YouTube and Twitch

DJSNKZ

New Member
Encoding error
An encoder error occurred while streaming:

NVENC Error: get_encoded_packet: nv.nvEncLockBitstream(s, &lock) failed: 8 (NV_ENC_ERR_INVALID_PARAM)

I did see a video on YouTube to download an older version of the Nvidia driver, but the video is more than 1 year old. So I am confused about which driver should I download, right now the GPU driver and the OBS are the latest versions.
 

Attachments

  • 4234234.JPG
    4234234.JPG
    13.8 KB · Views: 13

Sejbo8000

New Member
I am having the exact same issue it started happening after I updated to obs 31. No settings are fixing it. It also seems to happen randomly during recording. I will provide a lof file but there wasn't anything I could use to point to the problem (Dont mind the settings, they do work properly even if they are overkill also the encoding lag was after it gave me the error and tried recording again without restarting obs)
 

Attachments

  • 2025-02-05 02-00-09.txt
    32.5 KB · Views: 25

rockbottom

Active Member
This isn't the only issue with your set-up but removing it should eliminate the error. No need to try forcing Constant Frame-rate, it's already constant.

02:51:04.600: [ffmpeg muxer: 'adv_file_output'] Using muxer settings:
force-cfr=1
 

Sejbo8000

New Member
This isn't the only issue with your set-up but removing it should eliminate the error. No need to try forcing Constant Frame-rate, it's already constant.

02:51:04.600: [ffmpeg muxer: 'adv_file_output'] Using muxer settings:
force-cfr=1
I added that after I got the error, but sure I will try recording without it for now and will see if it helps somehow
 

rockbottom

Active Member
The other thing about the encoding settings is the Rate Control CQVBR?

I'm still running OBS 30.2.2 so I'm not familiar with that one as it's new & not in any documentation I've seen. Also can't test it but your CQ setting may be too low for the max bit-rate. Try raising the CQ to something sane like 15 or try using CQP rate control.

02:23:03.283: codec: HEVC
02:23:03.283: rate_control: CQVBR
02:23:03.283: max_bitrate: 400000
02:23:03.283: cq: 1
02:23:03.283: keyint: 120
02:23:03.283: preset: p4
02:23:03.283: tuning: hq
02:23:03.283: multipass: qres
02:23:03.283: profile: main10
02:23:03.283: width: 2560
02:23:03.283: height: 1440
02:23:03.283: b-frames: 1
02:23:03.283: b-ref-mode: 1
02:23:03.283: lookahead: true (8 frames)
02:23:03.283: aq: true
 

Sejbo8000

New Member
The other thing about the encoding settings is the Rate Control CQVBR?

I'm still running OBS 30.2.2 so I'm not familiar with that one as it's new & not in any documentation I've seen. Also can't test it but your CQ setting may be too low for the max bit-rate. Try raising the CQ to something sane like 15 or try using CQP rate control.

02:23:03.283: codec: HEVC
02:23:03.283: rate_control: CQVBR
02:23:03.283: max_bitrate: 400000
02:23:03.283: cq: 1
02:23:03.283: keyint: 120
02:23:03.283: preset: p4
02:23:03.283: tuning: hq
02:23:03.283: multipass: qres
02:23:03.283: profile: main10
02:23:03.283: width: 2560
02:23:03.283: height: 1440
02:23:03.283: b-frames: 1
02:23:03.283: b-ref-mode: 1
02:23:03.283: lookahead: true (8 frames)
02:23:03.283: aq: true
I have tried that and I still got the error I even tried cbr 6000 kbps as a test and it still happened. I used to use CQP but in complex scenes like a bush it shoots all the way up to 1000+ mbps and causes encoding lag until I looked away from it. Foliage in general caused that for me even when using CQP 20. I then sarted using CBR 400000 and used that until update 31 where I read about CQVBR which fixes the issue I was having with CQP. I then started using that instead. It might be the CFR is the error but I can only test that tonight. Thanks for answering and trying to help btw I do appreciate it
 

rockbottom

Active Member
The other things to check:

HAGS is enabled, disable it.

Your video. Monitors are running 10-bit color & you're encoding 10-bit but your running OBS in NV12 that is 8-bit. I would update the Color Format & Color Space. I don't mess around with HDR but P010 & Rec. 2100 (PQ) should do the trick.
 

rockbottom

Active Member
FYI, I just noticed the nasty encoding lag in your 2nd attempt. The settings were the same as the first attempt except B Frames/Ref Mode were zeroed so keep an eye on this.

2:51:10.844: Video stopped, number of skipped frames due to encoding lag: 112/372 (30.1%)

A update is coming for this but, you might want to try a faster Preset.

 

Sejbo8000

New Member
FYI, I just noticed the nasty encoding lag in your 2nd attempt. The settings were the same as the first attempt except B Frames/Ref Mode were zeroed so keep an eye on this.

2:51:10.844: Video stopped, number of skipped frames due to encoding lag: 112/372 (30.1%)

A update is coming for this but, you might want to try a faster Preset.

Yeah that was after I got the get_encoded_packet: nv.nvEncLockBitstream(s, &lock) failed: 8 (NV_ENC_ERR_INVALID_PARAM) error. I didn't restart obs and when i started recording it immediately gave me encoding lag. Everything was fine after I restarted obs and tried recording again with the same settings. Sure, I will try using a faster preset
 

DJSNKZ

New Member
The other things to check:

HAGS is enabled, disable it.

Your video. Monitors are running 10-bit color & you're encoding 10-bit but your running OBS in NV12 that is 8-bit. I would update the Color Format & Color Space. I don't mess around with HDR but P010 & Rec. 2100 (PQ) should do the trick.
It would be nice if you could find a solution for the original post. I started streaming like a year ago, but this issue started like 2 weeks ago.
 

Attachments

  • 2025-02-03 20-57-47.txt
    16.9 KB · Views: 17
  • Crash 2025-01-29 23-05-09.txt
    93.4 KB · Views: 11

rockbottom

Active Member
I am having the exact same issue it started happening after I updated to obs 31. No settings are fixing it. It also seems to happen randomly during recording. I will provide a lof file but there wasn't anything I could use to point to the problem (Dont mind the settings, they do work properly even if they are overkill also the encoding lag was after it gave me the error and tried recording again without restarting obs)

I updated the GPU driver and obs after the issue started, but still having the issue.


Some confusion here OP. I was NOT helping you, I was helping Sejbi8000 as you never posted a log until today.

Anyway, your browser is crashing & you have rendering lag, your GPU is overloaded.

Thread 2398: CrBrowserMain (Crashed)

21:37:35.327: Output 'multi-output': Number of lagged frames due to rendering lag/stalls: 118 (0.1%)

Having more than (1) Display, Game or Window capture in the same Scene can cause interference.
20:57:49.937: - scene 'Scene':
20:57:49.937: - source: 'Games' (game_capture)
20:57:49.937: - source: 'Starting soon' (browser_source)
20:57:49.937: - source: 'BRB' (browser_source)
20:57:49.937: - source: 'Display Capture' (monitor_capture)
20:57:49.937: - source: 'Starting new' (browser_source)
20:57:49.937: - source: 'Brb 1' (browser_source)
20:57:49.937: - source: 'Subs' (browser_source)
20:57:49.937: - source: 'Instagram' (game_capture)
20:57:49.937: - source: 'Game Capture' (game_capture)
20:57:49.937: - source: 'Now Playing' (browser_source)

Encode settings look OK but your bit-rate is way too low for 1080p
20:59:46.945: codec: H264
20:59:46.945: rate_control: CBR
20:59:46.945: bitrate: 2500
20:59:46.945: keyint: 120
20:59:46.945: preset: p5
20:59:46.945: tuning: hq
20:59:46.945: multipass: qres
20:59:46.945: profile: high
20:59:46.945: width: 1920
20:59:46.945: height: 1080
20:59:46.945: b-frames: 2
20:59:46.945: b-ref-mode: 0
20:59:46.945: lookahead: false (0 frames)
20:59:46.945: aq: true

 

DJSNKZ

New Member
Some confusion here OP. I was NOT helping you, I was helping Sejbi8000 as you never posted a log until today.

Anyway, your browser is crashing & you have rendering lag, your GPU is overloaded.

Thread 2398: CrBrowserMain (Crashed)

21:37:35.327: Output 'multi-output': Number of lagged frames due to rendering lag/stalls: 118 (0.1%)

Having more than (1) Display, Game or Window capture in the same Scene can cause interference.
20:57:49.937: - scene 'Scene':
20:57:49.937: - source: 'Games' (game_capture)
20:57:49.937: - source: 'Starting soon' (browser_source)
20:57:49.937: - source: 'BRB' (browser_source)
20:57:49.937: - source: 'Display Capture' (monitor_capture)
20:57:49.937: - source: 'Starting new' (browser_source)
20:57:49.937: - source: 'Brb 1' (browser_source)
20:57:49.937: - source: 'Subs' (browser_source)
20:57:49.937: - source: 'Instagram' (game_capture)
20:57:49.937: - source: 'Game Capture' (game_capture)
20:57:49.937: - source: 'Now Playing' (browser_source)

Encode settings look OK but your bit-rate is way too low for 1080p
20:59:46.945: codec: H264
20:59:46.945: rate_control: CBR
20:59:46.945: bitrate: 2500
20:59:46.945: keyint: 120
20:59:46.945: preset: p5
20:59:46.945: tuning: hq
20:59:46.945: multipass: qres
20:59:46.945: profile: high
20:59:46.945: width: 1920
20:59:46.945: height: 1080
20:59:46.945: b-frames: 2
20:59:46.945: b-ref-mode: 0
20:59:46.945: lookahead: false (0 frames)
20:59:46.945: aq: true

Sorry for that, I am not tech-savvy. I didn't know, we needed to post logs, even the reply you did, I need my friend's help to understand.
 

DJSNKZ

New Member
I've been streaming Once Human, and it ran smoothly last year. However, since 2025, the game has been consuming a lot of RAM, forcing me to lower the settings to play. After that, I started experiencing issues. The only change I made in the past two weeks was adding a browser-based overlay called '6klabs' on OBS to display song names.

Also, I streamed the game called ''it Takes Two'' but didn't show this error. Would be because of the game?
 

Attachments

  • 112.JPG
    112.JPG
    75.8 KB · Views: 10

rockbottom

Active Member
No problem.

You may want to try disabling ESET & enabling Defender if things don't improve after fixing the stuff above. I had that crap on a company owned PC, it slowed everything down to a crawl on that system.

20:57:47.720: ESET Security: enabled (AV)
20:57:47.720: Microsoft Defender Antivirus: disabled (AV)
20:57:47.720: ESET Firewall: enabled (FW)
 

DJSNKZ

New Member
No problem.

You may want to try disabling ESET & enabling Defender if things don't improve after fixing the stuff above. I had that crap on a company owned PC, it slowed everything down to a crawl on that system.

20:57:47.720: ESET Security: enabled (AV)
20:57:47.720: Microsoft Defender Antivirus: disabled (AV)
20:57:47.720: ESET Firewall: enabled (FW)
I was streaming for the entire 2024, and this issue started like 2 weeks ago, but at that time Eset was my antivirus. Anyway, I will check on that. Thanks!
 

rockbottom

Active Member
ESET could have pushed an update that changed the performance of your system. It did change 2 weeks ago. I use Defender for a reason. It never interferes.
 
Top