Question / Help NVENC and alt tabbing

cvax

Member
Hi,

I know ShadowPlay doesn't really like alt-tabbing and it seems NVENC in OBS doesn't like it much either. Is there some setting I can do to address this or otherwise avoid this problem if I want to alt-tab? Thanks.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
What happens when you alt-tab with nvenc on? This is the first time I've heard of it
 

dodgepong

Administrator
Community Helper
Shadowplay encompasses both capture and encoding, while NVENC is just the encoder. Alt-tabbing shouldn't be affected by NVENC, so it's probably more likely an issue with the way you're using OBS.

Can you post your log? (Here's how)
 

cvax

Member
My game, Titanfall, crashes after I try to alt tab back into it. The screen in the recording also goes black. Log file attached.

Code:
20:33:23: No Intel graphics adapter visible in QSVHelper.exe, Optimus problem?
20:33:23: CUDA loaded successfully
20:33:23: 1 CUDA capable devices found
20:33:23: [ GPU #0 - < GeForce GTX 750 Ti > has Compute SM 5.0, NVENC Available ]
20:35:06: Open Broadcaster Software v0.613b - 32bit (´・ω・`)
20:35:06: -------------------------------
20:35:06: CPU Name: Intel(R) Core(TM) i7 CPU  920  @ 2.67GHz
20:35:06: CPU Speed: 2672MHz
20:35:06: Physical Memory:  4095MB Total, 4095MB Free
20:35:06: stepping id: 4, model 26, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
20:35:06: monitor 1: pos={0, 0}, size={1920, 1200}
20:35:06: Windows Version: 6.1 Build 7601 S
20:35:06: Aero is Disabled
20:35:06: -------------------------------
20:35:06: OBS Modules:
20:35:06: Base Address  Module
20:35:06: 00370000  OBS.exe
20:35:06: 61E40000  OBSApi.dll
20:35:06: 66190000  BWCapture.dll
20:35:06: 66160000  DShowPlugin.dll
20:35:06: 6C0C0000  GraphicsCapture.dll
20:35:06: 6A7D0000  NoiseGate.dll
20:35:06: 66140000  PSVPlugin.dll
20:35:06: 66120000  scenesw.dll
20:35:06: ------------------------------------------
20:35:06: Adapter 1
20:35:06:  Video Adapter: NVIDIA GeForce GTX 750 Ti
20:35:06:  Video Adapter Dedicated Video Memory: 2070609920
20:35:06:  Video Adapter Shared System Memory: 2147807232
20:35:06:  Video Adapter Output 1: pos={0, 0}, size={1920, 1200}, attached=true
20:35:06: =====Stream Start: 2014-03-13, 20:35:06===============================================
20:35:06:  Multithreaded optimizations: On
20:35:06:  Base resolution: 1280x800
20:35:06:  Output resolution: 1280x800
20:35:06: ------------------------------------------
20:35:06: Loading up D3D10 on NVIDIA GeForce GTX 750 Ti (Adapter 1)...
20:35:06: ------------------------------------------
20:35:06: Audio Format: 48000 Hz
20:35:06: ------------------------------------------
20:35:06: Audio Channels: 2 Ch
20:35:06: Playback device Default
20:35:06: ------------------------------------------
20:35:06: Using desktop audio input: Speakers (SoundMAX Integrated Digital HD Audio)
20:35:06: Using quad speaker setup
20:35:07: ------------------------------------------
20:35:07: Using auxilary audio input: Microphone (Pro 9000)
20:35:07: ------------------------------------------
20:35:07: Audio Encoding: AAC
20:35:07:  bitrate: 160
20:35:07: Using graphics capture
20:35:07: Scene buffering time set to 400
20:35:07: NVENC internal init finished successfully
20:35:07: NVENC supports 7 h264 presets
20:35:07: ------------------------------------------
20:35:07: Video Encoding: NVENC
20:35:07:  fps: 60
20:35:07:  width: 1280, height: 800
20:35:07:  preset: bd
20:35:07:  profile: high
20:35:07:  level: autoselect
20:35:07:  keyint: 30
20:35:07:  CBR: yes
20:35:07:  CFR: no
20:35:07:  max bitrate: 10000
20:35:07:  avg bitrate: 10000
20:35:07:  buffer size: 10000
20:35:07: ------------------------------------------
20:35:08: SharedTexCapture hooked
20:35:08: Using RTMP service: Twitch / Justin.tv
20:35:08:  Server selection: rtmp://live.justin.tv/app
20:35:08:  Interface: Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller #2 (ethernet, 100 mbps)
20:35:09: Completed handshake with rtmp://live.justin.tv/app in 71 ms.
20:35:09: SO_SNDBUF was at 8192
20:35:09: SO_SNDBUF is now 65536
20:35:09: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 131072 (buffer: 0 / 1300480)
20:35:10: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 262144 (buffer: 0 / 1300480)
20:39:29: RTMPPublisher::SocketLoop: Stalled for 1566 ms to write 16395 bytes (buffer: 0 / 1300480), unstable connection?
20:47:41: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
20:47:41:  New Scene
20:47:41: Using Monitor Capture
20:47:47: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
20:47:47:  New Scene
20:47:47: Using graphics capture
20:47:52: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
20:47:52:  New Scene
20:47:52: Using Monitor Capture
20:47:56: Total frames encoded: 46106, total frames duplicated: 3265 (7.08%)
20:47:56: Number of frames skipped due to encoder lag: 532 (1.15%)
20:47:56: Total frames rendered: 45157, number of late frames: 348 (0.77%) (it's okay for some frames to be late)
20:47:57: RTMPPublisher::SocketLoop: Graceful loop exit
20:47:57: Average send payload: 12457 bytes, average send interval: 9 ms
20:47:57: Number of times waited to send: 2, Waited for a total of 8194 bytes
20:47:57: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
20:47:57: Number of bytes sent: 975429047
20:47:57: Encoder closed
20:47:57: NVENC deinitialized
20:47:57:
20:47:57: Profiler time results:
20:47:57:
20:47:57: ==============================================================
20:47:57: video thread frame - [100%] [avg time: 2.362 ms] [children: 97%] [unaccounted: 3.01%]
20:47:57: | scene->Preprocess - [4.4%] [avg time: 0.104 ms]
20:47:57: | GPU download and conversion - [92.6%] [avg time: 2.187 ms] [children: 46.7%] [unaccounted: 45.9%]
20:47:57: | | flush - [7.58%] [avg time: 0.179 ms]
20:47:57: | | CopyResource - [3.73%] [avg time: 0.088 ms]
20:47:57: | | conversion to 4:2:0 - [35.4%] [avg time: 0.836 ms]
20:47:57: Convert444Threads - [100%] [avg time: 0.567 ms] [children: 99.1%] [unaccounted: 0.882%]
20:47:57: | Convert444toNV12 - [99.1%] [avg time: 0.562 ms]
20:47:57: encoder thread frame - [100%] [avg time: 6.256 ms] [children: 0.991%] [unaccounted: 99%]
20:47:57: | sending stuff out - [0.991%] [avg time: 0.062 ms]
20:47:57: ==============================================================
20:47:57:
20:47:57:
20:47:57: Profiler CPU results:
20:47:57:
20:47:57: ==============================================================
20:47:57: video thread frame - [cpu time: avg 0.093 ms, total 4227.63 ms] [avg calls per frame: 1]
20:47:57: | scene->Preprocess - [cpu time: avg 0.019 ms, total 889.206 ms] [avg calls per frame: 1]
20:47:57: | GPU download and conversion - [cpu time: avg 0.054 ms, total 2464.82 ms] [avg calls per frame: 1]
20:47:57: | | flush - [cpu time: avg 0.032 ms, total 1450.81 ms] [avg calls per frame: 1]
20:47:57: | | CopyResource - [cpu time: avg 0.004 ms, total 187.203 ms] [avg calls per frame: 1]
20:47:57: | | conversion to 4:2:0 - [cpu time: avg 0.003 ms, total 140.4 ms] [avg calls per frame: 1]
20:47:57: Convert444Threads - [cpu time: avg 0.257 ms, total 23228.5 ms] [avg calls per frame: 2]
20:47:57: | Convert444toNV12 - [cpu time: avg 0.256 ms, total 23150.5 ms] [avg calls per frame: 2]
20:47:57: encoder thread frame - [cpu time: avg 3.361 ms, total 154925 ms] [avg calls per frame: 1]
20:47:57: | sending stuff out - [cpu time: avg 0.041 ms, total 1903.21 ms] [avg calls per frame: 1]
20:47:57: ==============================================================
20:47:57:
20:47:57: =====Stream End: 2014-03-13, 20:47:57=================================================


Last game capture log:
2014-03-13, 20:35:07: we're booting up:
20:35:07: CaptureThread: attached to process TitanFall.exe
20:35:07: DXGI Present
20:35:07: (half life scientist) everything..  seems to be in order
20:35:07: DXGI: Found D3D 11
20:35:07: setting up d3d11 data
20:35:07: ---------------------- Cleared D3D11 Capture ----------------------
20:35:07: found dxgi format (dx11) of: 28, size: {1920, 1200}, multisampled: false
20:35:07: DoD3D11Hook: success
20:35:08: successfully capturing d3d11 frames via GPU
20:47:41: stop requested, terminating d3d11 capture
20:47:41: ---------------------- Cleared D3D11 Capture ----------------------
20:47:46: ---------------------- Cleared D3D11 Capture ----------------------
 

Sapiens

Forum Moderator
Run Titanfall in borderless windowed mode, Source engine games are notoriously finicky about alt-tabbing. Add -window and -noborder to your launch command line.
 

cvax

Member
I did some more testing just now. Seems like the issue is with NVENC + Fraps + alt tab? If any one of those three is not there, no issue. Weird.
 

Floatingthru

Community Helper
Fraps is known to break Game Capture at times. If possible don't use it, or do what Sapiens has said then use Window Capture.
 
Top