Failure to reconnect to ingest (NV_ENC_ERR_NO_ENCODE_DEVICE)

bensrob

New Member
I had a blip last night while streaming to Twitch/YouTube, where the Twitch ingest failed to restart after failing to send to the ingest server.

The twitch stream is handled by OBS - Enhanced Broadcasting
YouTube - SE.Live Plugin

When the initial issue occurred the multitrack to Twitch was stopped (youtube stream unaffected, and remained streaming)
After 2 seconds the automatic reconnect happened and successfully reconnected, however but hit the issue
23:13:57.718: [obs-nvenc] init_session: nv.nvEncOpenEncodeSessionEx(&params, &enc->session) failed: 1 (NV_ENC_ERR_NO_ENCODE_DEVICE)

It there any reason this may have occurred, and anything that can potentially be done to prevent it in future?
I currently plan to fully remove / reinstall the gfx card driver on the possibility that helps.

I am left with a few questions
  1. Why the device was unavailable
  2. Why the YouTube stream was not affected
  3. Why the re-connection was reported as a success in the logs, whilst not recovering the active stream correctly
  4. Anything that can be done to prevent a occurrence
Thank you for any guidance you can provide.




Initial issue
23:13:55.356: WriteN, RTMP send error 10060 (4097 bytes)
23:13:55.356: WriteN, RTMP send error 10038 (539 bytes)
23:13:55.356: WriteN, RTMP send error 10038 (42 bytes)
23:13:55.356: [rtmp stream: 'rtmp multitrack video'] Disconnected from rtmp://ingest.global-contribute.live-video.net/app
23:13:55.356: Output 'rtmp multitrack video': stopping
23:13:55.356: Output 'rtmp multitrack video': Total frames output: 616188 (617667 attempted)
23:13:55.356: Output 'rtmp multitrack video': Total drawn frames: 247160 (247170 attempted)
23:13:55.356: Output 'rtmp multitrack video': Number of lagged frames due to rendering lag/stalls: 10 (0.0%)
23:13:55.356: Output 'rtmp multitrack video': Number of dropped frames due to insufficient bandwidth/connection stalls: 1479 (0.2%)
23:13:55.357: Output 'rtmp multitrack video': Reconnecting in 2.00 seconds..
23:13:55.357: [rtmp stream: 'rtmp multitrack video'] Freeing 2177 remaining packets
23:13:55.357: Video stopped, number of skipped frames due to encoding lag: 10/247109 (0.0%)
23:13:55.390: Video stopped, number of skipped frames due to encoding lag: 10/247111 (0.0%)
Automatic restart attempt
23:13:57.357: NV12 texture support enabled
23:13:57.357: P010 texture support not available
23:13:57.362: [obs-nvenc] GPU scaling enabled
23:13:57.476: [obs-nvenc] init_session: nv.nvEncOpenEncodeSessionEx(&params, &enc->session) failed: 1 (NV_ENC_ERR_NO_ENCODE_DEVICE)
23:13:57.478: [obs-nvenc] GPU scaling enabled
23:13:57.557: [obs-nvenc: 'multitrack video video encoder 1'] settings:
****SETTINGS*****
23:13:57.711: NV12 texture support enabled
23:13:57.711: P010 texture support not available
23:13:57.713: [obs-nvenc] GPU scaling enabled
23:13:57.718: [obs-nvenc] init_session: nv.nvEncOpenEncodeSessionEx(&params, &enc->session) failed: 1 (NV_ENC_ERR_NO_ENCODE_DEVICE)
23:13:57.719: [obs-nvenc] GPU scaling enabled
23:13:57.789: [obs-nvenc: 'multitrack video video encoder 2'] settings:
****SETTINGS*****
23:13:57.832: [FFmpeg aac encoder: 'multitrack video vod audio 0'] bitrate: 160, channels: 2, channel_layout: stereo, track: 2
23:13:57.832:
23:13:57.833: [rtmp stream: 'rtmp multitrack video'] Connecting to RTMP URL rtmp://ingest.global-contribute.live-video.net/app...
23:13:57.854: [rtmp stream: 'rtmp multitrack video'] Interface: Realtek PCIe GBE Family Controller (ethernet, 1000↓/1000↑ mbps)
23:13:58.819: [rtmp stream: 'rtmp multitrack video'] Connection to rtmp://ingest.global-contribute.live-video.net/app (2600:f0f0:1117:3f6:8ca3:efb4:3666:d9f2) successful
23:13:58.819: [rtmp stream: 'rtmp multitrack video'] Socket send buffer is 65536 bytes
Manual stop streaming attempts (obs hung. Hang potentially as it was stream elements requesting the stop)
23:15:41.100: obs-streamelements-core: streaming stop requested by UI control
23:16:44.328: obs-streamelements-core: streaming stop requested by UI control
Force closing OBS
23:17:17.242: ==== Shutting down ==================================================
23:17:17.439: [rtmp stream: '698e309e4666d41791f534dd-youtube-1'] User stopped the stream
23:17:17.439: [rtmp stream: '698e309e4666d41791f534dd-youtube-1'] Socket send buffer is 1048576 bytes
23:17:17.439: Output '698e309e4666d41791f534dd-youtube-1': stopping
23:17:17.439: Output '698e309e4666d41791f534dd-youtube-1': Total frames output: 259071
23:17:17.439: Output '698e309e4666d41791f534dd-youtube-1': Total drawn frames: 259141 (259236 attempted)
23:17:17.439: Output '698e309e4666d41791f534dd-youtube-1': Number of lagged frames due to rendering lag/stalls: 95 (0.0%)
23:17:17.473: [obs-streamelements-core]: shutting down
23:17:17.934: ------------------------------------------------
23:17:17.935: [rtmp stream: 'rtmp multitrack video'] User stopped the stream
23:17:17.936: [rtmp stream: 'rtmp multitrack video'] Socket send buffer is 65536 bytes
23:17:17.936: Output 'rtmp multitrack video': stopping
23:17:17.936: Output 'rtmp multitrack video': Total frames output: 0
23:17:17.936: Output 'rtmp multitrack video': Total drawn frames: 11922 (12007 attempted)
23:17:17.936: Output 'rtmp multitrack video': Number of lagged frames due to rendering lag/stalls: 85 (0.7%)
23:17:17.936: Video stopped, number of skipped frames due to encoding lag: 105/259264 (0.0%)
 

Attachments

Reading through the log file again I noticed that encoder 0 did not restart, and is not referenced in the log.
As this track is the same one that the youtube stream uses so
  • it may have stayed up as it was in use
  • obs has detected it's already running and not restarted it
  • failure to recover the multitrack as the device is already in use (NV_ENC_ERR_NO_ENCODE_DEVICE)
Either way this should be either reported in the logs, or force restart to recover if this is the case.

Initial startup
22:05:15.599: [obs-nvenc: 'multitrack video video encoder 0'] settings:
22:05:15.700: [obs-nvenc: 'multitrack video video encoder 1'] settings:
22:05:15.794: [obs-nvenc: 'multitrack video video encoder 2'] settings:
Restart
23:13:57.557: [obs-nvenc: 'multitrack video video encoder 1'] settings:
23:13:57.789: [obs-nvenc: 'multitrack video video encoder 2'] settings:
 
Back
Top