Question / Help OBS crashes with NVEnc when switching HDMI Output

MDZ jimmY

New Member
So whenever I stream with NVEnc instead of x264 OBS crashes when I attempt to plug in a HDMI cable to the HDMI out of the GPU.

I have 2 monitors and 1 is connected to the DVI port of the GPU and the other one is usually connected to my PCIe capture card through HDMI to capture from consoles. So when I attempt to switch to a PC game while already streaming, I usually just need to disconnect the HDMI cable from the capture card and connect it to the HDMI port of the GPU.

This problem has been there for a long time know but I couldn't find a solution so far.


Here's the part of the log file that is interesting:


Code:
20:16:53.306: error:   Failed locking nvenc input buffer: invalid version (15)
20:16:53.306: [NVENC encoder: 'simple_h264_stream'] nvenc_encode: Error encoding: Invalid argument
20:16:53.306: error:   EncodePicture failed!: invalid version (15)
20:16:53.479: Error encoding with encoder 'simple_h264_stream'
 

Attachments

  • 2016-12-25 16-28-57.txt
    15.2 KB · Views: 11

Fenrir

Forum Admin
It looks like those errors are coming from the NVENC encoder itself. I'm not sure there's much that can be done on the OBS side of things. Plugging and unplugging monitors during a stream seems like a really bad idea in general. Have you looked into getting an HDMI switch instead?
 

MDZ jimmY

New Member
yeah I already thought it was not a good way to handle the situation. gonna buy an HDMI switch and hope I don't get the same problem with that. thanks for the response
 

MDZ jimmY

New Member
I'm using an HDMI Switch now and still have the same problem :/

Kinda sucks when your streaming with around 500 people on twitch and lose alot of them because I have to restart my PC everytime this happens :/

Here's the log file from todays streaming session:
 

Attachments

  • 2017-01-04 16-16-16.txt
    26.3 KB · Views: 16
I'm using an HDMI Switch now and still have the same problem :/

Kinda sucks when your streaming with around 500 people on twitch and lose alot of them because I have to restart my PC everytime this happens :/

Here's the log file from todays streaming session:


I have the same problem as this. I also purchased a HDMI switcher so both HDMI are plugged in at the same time. But it still crashes. I have both my Game console HDMI and also the PC HDMI plugged in to the switcher. but when switching from either, OBS studio always crashes and i have to shut it down and reboot it. I dont supposed you have found any fix for this at all? as that would be a god send.
 

Fenrir

Forum Admin
If you're looking for a fix on the OBS side, you are probably not going to find it. We can't do anything about nvenc failing (it's managed by the driver) when you disconnect monitors.

I know this is not what you want to hear, but there's not a lot we can do.
 

MDZ jimmY

New Member
I have the same problem as this. I also purchased a HDMI switcher so both HDMI are plugged in at the same time. But it still crashes. I have both my Game console HDMI and also the PC HDMI plugged in to the switcher. but when switching from either, OBS studio always crashes and i have to shut it down and reboot it. I dont supposed you have found any fix for this at all? as that would be a god send.

just as fenrir already said, there doesn't seem to be anything OBS can do about it as it is a problem with NVEnc. I even asked for a fix in an nvidia forum, but all I got there was "you shouldn't change your HDMI output while streaming" which still kinda blows my mind to hear tbh. Eventually I'm going to get a stronger CPU (AMD Ryzen chips seem to be pretty good for streaming purposes) that can handle streaming (with the x264 encoder) and playing games at the same time.

You could also buy a third monitor to prevent this problem from occuring or have a second PC dedicated for streaming.
 
Top