# NVENC Error: Too many concurrent sessions



## Crash (Nov 17, 2020)

I've been trying to fix this all day and I have found no solution, OBS seems to tell me the issue of NVENC using too many sessions but I have no idea what else is using NVENC. I've tried to record not using NVENC but the output ends up being really blurry. If anyone knows how to fix this or find what else is using NVENC please do let me know!


----------



## rockbottom (Nov 17, 2020)

Depending on the driver you have installed, there could be 2 or 3 concurrent sessions running.  If you want to see how many are running, Open a command prompt and type:  nvidia-smi.exe encodersessions

To clear them, just re-start your PC.


----------



## Crash (Nov 17, 2020)

I'll try that, using the command prompt I get an issue saying the exe isn't recognized, gonna try restarting my computer now


----------



## koala (Nov 17, 2020)

Some VR headsets use up 1 nvenc session, even if not in use. The windows internal recording (accessible from the Windows Game Bar or from Windows settings->Game->Recording) as well, but only if you activated background recording.


----------



## Crash (Nov 17, 2020)

I used to have a PSVR connected to my PC but got uninstalled everything for it since i never used it, restarted my pc and still no luck. Does command prompt need to be open in a specific filepath to test the exe thing?


----------



## rockbottom (Nov 17, 2020)

Only if you changed the default location as far as I know.

What driver do you have installed?


----------



## Crash (Nov 17, 2020)

I'm gonna be honest I'm not entirely sure, I have the GeForce experience and usually that handles driver updates. how would I check?


----------



## rockbottom (Nov 17, 2020)

Really?

Look at your installed apps

or 

Nvidia Control Panel > System Information

or

GeForce Experience


----------



## Crash (Nov 17, 2020)

Sorry heh I've never really delved too deep into this side of things, gimme a minute or 2 looks like there's a driver update rn I missed. I'll reply once that's done


----------



## Crash (Nov 17, 2020)

GeForce Game ready driver version 457.30


----------



## Crash (Nov 17, 2020)

Recording now works but everything seems super blurry


----------



## rockbottom (Nov 17, 2020)

Good, at least it's working now.  Post the log from the recording session you just did, there may be some adjustments needed.






						Please post a log with your issue! Here's how...
					

OBS Studio creates a log file each time you run it which contains very useful diagnostic information. Without a log file, it's much harder for any support volunteers to figure out problems and your post may be ignored.  To upload a log file, go to the Help menu > Log Files > Upload Last Log...




					obsproject.com


----------



## Crash (Nov 17, 2020)

Will do, give me just a few moments!


----------



## Crash (Nov 17, 2020)

For the  Log file, seems like thevideo itself is too large to post it was just mescrolling up and down this page anyway


----------



## rockbottom (Nov 17, 2020)

I don't need the video.

While I go through your log, update OBS, you're still running v25.0.8.


----------



## Crash (Nov 17, 2020)

Oh that may be helpful lol


----------



## Crash (Nov 17, 2020)

updated, still no luck but looks somewhat better


----------



## rockbottom (Nov 17, 2020)

Do you have SLI enabled?  Your log shows OBS loading up on the 1060 & it also shows these errors.

08:05:02.965: [jim-nvenc] init_session: nv.nvEncOpenEncodeSessionEx(&params, &enc->session) failed: 10 (NV_ENC_ERR_OUT_OF_MEMORY)
08:05:02.971: ---------------------------------
08:05:02.971: [NVENC encoder: 'recording_h264'] settings:
08:05:02.971:     rate_control: CBR
08:05:02.971:     bitrate:      15000
08:05:02.971:     cqp:          0
08:05:02.971:     keyint:       250
08:05:02.971:     preset:       hq
08:05:02.971:     profile:      high
08:05:02.971:     width:        1280
08:05:02.971:     height:       720
08:05:02.971:     2-pass:       false
08:05:02.971:     b-frames:     2
08:05:02.971:     GPU:          0
08:05:02.971: 
08:05:03.072: error:   OpenEncodeSessionEx failed: out of memory (10)
08:05:03.088: fatal:   No NVENC capable devices found
08:05:03.088: [NVENC encoder: 'recording_h264'] Failed to open NVENC codec: Generic error in an external library


----------



## Crash (Nov 17, 2020)

How would I go about enabling SLI, or checking to see if it is?


----------



## rockbottom (Nov 17, 2020)

I believe you can find it in the Nvidia Control Panel > Configure Surround,PhysX


----------



## Crash (Nov 17, 2020)

Not 100% sure what I'm looking for but is everything in that tab


----------



## rockbottom (Nov 17, 2020)

I have no experience with multiple GPU's but when I look at that, I see you're monitors are plugged into your 1060 but since you have PhysX set to Auto Select your 1070 has been selected.


----------



## Crash (Nov 17, 2020)

Should I also be dedicating to physX? I swapped over to that yet still looks blurry


----------



## Crash (Nov 17, 2020)

guess I never did post this 


My recording settings btw


----------



## rockbottom (Nov 17, 2020)

These settings are different, you were using CBR in the log you posted.  CQP is the way to go.  Set your Keyframe Interval to 2.  Preset to Quality, uncheck Psycho Visual Tuning & you can set Max B-frames to 0 as neither of your GPU's will encode B Frames.

This is from your log:
07:57:58.142: [jim-nvenc: 'recording_h264'] settings:
07:57:58.142:     rate_control: CBR
07:57:58.142:     bitrate:      15000
07:57:58.142:     cqp:          20
07:57:58.142:     keyint:       250
07:57:58.142:     preset:       hq
07:57:58.142:     profile:      high
07:57:58.142:     width:        1280
07:57:58.142:     height:       720
07:57:58.142:     2-pass:       false
07:57:58.142:     b-frames:     2
07:57:58.142:     lookahead:    false
07:57:58.142:     psycho_aq:    true
07:57:58.142: 
07:57:58.153: [CoreAudio AAC: 'Track1']: settings:
07:57:58.153:     mode:          AAC
07:57:58.153:     bitrate:       160
07:57:58.153:     sample rate:   44100
07:57:58.153:     cbr:           on
07:57:58.153:     output buffer: 1536
07:57:58.308: ==== Recording Start ===============================================
07:57:58.308: [ffmpeg muxer: 'adv_file_output'] Writing file 'C:/Users/AngryBlackCat/Videos/2020-11-17 07-57-58.mp4'...
07:58:38.652: [ffmpeg muxer: 'adv_file_output'] Output of file 'C:/Users/AngryBlackCat/Videos/2020-11-17 07-57-58.mp4' stopped
07:58:38.652: Output 'adv_file_output': stopping
07:58:38.652: Output 'adv_file_output': Total frames output: 1202
07:58:38.652: Output 'adv_file_output': Total drawn frames: 1200 (1210 attempted)
07:58:38.652: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 10 (0.8%)
07:58:38.652: ==== Recording Stop ================================================
08:04:46.378: Output 'VirtualOutput': stopping
08:04:46.378: Output 'VirtualOutput': Total frames output: 13042
08:04:46.378: Output 'VirtualOutput': Total drawn frames: 13012 (13043 attempted)
08:04:46.378: Output 'VirtualOutput': Number of lagged frames due to rendering lag/stalls: 31 (0.2%)
08:04:46.378: Video stopped, number of skipped frames due to encoding lag: 18/14255 (0.1%)


----------



## rockbottom (Nov 17, 2020)

OBS works best on a single GPU.  If you have selected the 1070 as primary, plug both of your monitors into it.


----------



## Crash (Nov 17, 2020)

both use the 1060 though I should probably swap over to 1070, changed all the settings to what you said still no changes... I'll get a new video and post log


----------



## Crash (Nov 17, 2020)

New Log (I think)


----------



## rockbottom (Nov 17, 2020)

The log you just posted shows you're still running OBS v25.0.8, you still have your monitors plugged into the 1060 & after multiple recording attempts you still have errors.


----------



## Crash (Nov 17, 2020)

I updated weird, lemme try restarting my pc...
My monitors are plugged into the 1060 still since I can't be arsed to rearrange the wires atm so I just have the PhysX use 1060 aswell


----------



## TryHD (Nov 17, 2020)

beside that the settings are 720p 30 fps and you record with cbr. Set it to your monitor resolution (1920x1080) or (1920x1200) depending on which monitor you play and under output your rate control to CQP


----------



## Crash (Nov 17, 2020)

AH THAT FIXED IT, must have been the screen resolution being different? I didn't mind the 30 fps because moft of this is for a video project I'm working on where the videos are going to be heavily edited but the quality still needed to be readable. Thank you so much!


----------



## rockbottom (Nov 17, 2020)

Cool

Some additional suggestions going forward

Update Windows soon

Run OBS as ADMIN

Disable these & if you're recording games, Enable Game Mode
08:43:24.145: Windows 10 Gaming Features:
08:43:24.145:     Game Bar: On
08:43:24.145:     Game DVR: On

Match your Sample Rates:
08:43:24.656: audio settings reset:
08:43:24.656:     samples per sec: 44100
08:43:24.656:     speakers:        2
08:43:25.682: WASAPI: Device 'Speakers (Realtek High Definition Audio)' [48000 Hz] initialized
08:43:25.682: [Loaded global audio device]: 'Desktop Audio'
08:43:25.734: adding 46 milliseconds of audio buffering, total audio buffering is now 46 milliseconds (source: Desktop Audio)
08:43:25.734: 
08:43:25.743: WASAPI: Device 'Microphone (Realtek High Definition Audio)' [192000 Hz] initialized
08:43:25.743: [Loaded global audio device]: 'Mic/Aux'

Clean up these errors:
08:43:25.898: [Media Source 'Media Source']: settings:
08:43:25.898:     input:                   C:/Users/AngryBlackCat/Desktop/The_Twilight_Bell_is_this_way.gif
08:43:25.898:     input_format:            (null)
08:43:25.898:     speed:                   100
08:43:25.898:     is_looping:              yes
08:43:25.898:     is_hw_decoding:          no
08:43:25.898:     is_clear_on_media_end:   yes
08:43:25.898:     restart_on_activate:     yes
08:43:25.898:     close_when_inactive:     no
08:43:25.898: MP: Failed to open media: 'C:/Users/AngryBlackCat/Desktop/The_Twilight_Bell_is_this_way.gif'
08:43:25.983: warning: deprecated pixel format used, make sure you did set range correctly
08:43:25.985: [Media Source 'Media Source 2']: settings:
08:43:25.985:     input:                   C:/Users/AngryBlackCat/Desktop/Quehaceestoaqui.gif
08:43:25.985:     input_format:            (null)
08:43:25.985:     speed:                   100
08:43:25.985:     is_looping:              yes
08:43:25.985:     is_hw_decoding:          no
08:43:25.985:     is_clear_on_media_end:   yes
08:43:25.985:     restart_on_activate:     yes
08:43:25.985:     close_when_inactive:     no
08:43:25.986: MP: Failed to open media: 'C:/Users/AngryBlackCat/Desktop/Quehaceestoaqui.gif'
08:43:25.986: [Media Source 'Media Source 3']: settings:
08:43:25.986:     input:                   E:/IMAGES (TYLERCOUGHCOUGH)/Shitty Memes folder/a1.mp4
08:43:25.986:     input_format:            (null)
08:43:25.986:     speed:                   100
08:43:25.986:     is_looping:              yes
08:43:25.986:     is_hw_decoding:          no
08:43:25.986:     is_clear_on_media_end:   yes
08:43:25.986:     restart_on_activate:     yes
08:43:25.986:     close_when_inactive:     no
08:43:26.925: Failed to open file 'C:/Users/AngryBlackCat/Desktop/PMTOK_Bobby.png': No such file or directory
08:43:26.925: gs_image_file_init_internal: Failed to load file 'C:/Users/AngryBlackCat/Desktop/PMTOK_Bobby.png'
08:43:26.925: [image_source: 'Image 2'] failed to load texture 'C:/Users/AngryBlackCat/Desktop/PMTOK_Bobby.png'
08:43:27.009: warning: deprecated pixel format used, make sure you did set range correctly
08:43:27.010: warning: Warning: data is not aligned! This can lead to a speed loss


----------



## Crash (Nov 18, 2020)

Late reply, I'll def try to fix some of the above errors, the ones on the bottom look like some of the meme stuff I use when I talk with friends so I'm not all to worried about those errors, p just images not being able to get the right refrences since I moved the file paths. Thanks for the suggestions!


----------



## JPW (Feb 5, 2021)

seeing the same issue when launching stream.   have to be careful with driver versions as current driver versions are causing severe frame drops in VR. even on the 30 series. NVIDIA has been made aware of the issue months ago but still no solution other than rolling back the driver version. posting link for reference.   https://www.nvidia.com/en-us/geforc...-index-missing-dropped-frames-since-nvidia-d/


----------

