Question / Help Game and webcam flash green randomly, also random stutters.

LeaferBag

New Member
My webcam has been flashing green for a split second and then returning, same with the game capture. Also I have chat on-screen, sometimes it randomly disappears and comes back. These things usually happen when i'm dropping in on H1Z1 so I think it has something to do with CPU usage? I've been researching fixes but haven't found anything. Heres a clip from my last stream so you know what i'm talking about : https://www.twitch.tv/leaferbag/v/115172293

Log from last stream:

10:18:28.255: CPU Name: AMD FX(tm)-8320 Eight-Core Processor
10:18:28.255: CPU Speed: 3516MHz
10:18:28.255: Physical Cores: 4, Logical Cores: 8
10:18:28.255: Physical Memory: 8158MB Total, 2721MB Free
10:18:28.255: Windows Version: 10.0 Build 14393 (revision: 693; 64-bit)
10:18:28.255: Running as administrator: false
10:18:28.255: Aero is Enabled (Aero is always on for windows 8 and above)
10:18:28.255: Portable mode: false
10:18:28.282: OBS 17.0.0 (64bit, windows)
10:18:28.282: ---------------------------------
10:18:28.282: ---------------------------------
10:18:28.282: audio settings reset:
10:18:28.282: samples per sec: 44100
10:18:28.282: speakers: 1
10:18:28.283: ---------------------------------
10:18:28.283: Initializing D3D11..
10:18:28.283: Available Video Adapters:
10:18:28.284: Adapter 1: NVIDIA GeForce GTX 1060 3GB
10:18:28.285: Dedicated VRAM: 3183149056
10:18:28.285: Shared VRAM: 4277483520
10:18:28.285: output 1: pos={0, 0}, size={1920, 1080}, attached=true
10:18:28.285: output 2: pos={-1366, 0}, size={1366, 768}, attached=true
10:18:28.287: Loading up D3D11 on adapter NVIDIA GeForce GTX 1060 3GB (0)
10:18:28.312: D3D11 loaded sucessfully, feature level used: 45056
10:18:29.009: ---------------------------------
10:18:29.009: video settings reset:
10:18:29.009: base resolution: 1920x1080
10:18:29.009: output resolution: 1280x720
10:18:29.009: downscale filter: Bicubic
10:18:29.009: fps: 30/1
10:18:29.009: format: NV12
10:18:29.011: ---------------------------------
10:18:29.012: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
10:18:29.013: [AMF Encoder] Unable to load 'amfrt64.dll', error code 126.
10:18:29.013: [AMF Encoder] Unable to load 'amfrt64.dll', error code 126.
10:18:29.021: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libcef.dll' not found, loading of module failed
10:18:29.021: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libEGL.dll' not found, loading of module failed
10:18:29.022: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libGLESv2.dll' not found, loading of module failed
10:18:29.022: Failed to load 'en-US' text for module: 'obs-browser.dll'
10:18:29.022: [browser_source: 'Version: 1.27.0']
10:18:29.023: NVENC supported
10:18:29.083: Couldn't find VLC installation, VLC video source disabled
10:18:29.086: No blackmagic support
10:18:29.145: ---------------------------------
10:18:29.145: Loaded Modules:
10:18:29.145: win-wasapi.dll
10:18:29.145: win-mf.dll
10:18:29.145: win-dshow.dll
10:18:29.145: win-decklink.dll
10:18:29.145: win-capture.dll
10:18:29.145: vlc-video.dll
10:18:29.145: text-freetype2.dll
10:18:29.145: rtmp-services.dll
10:18:29.145: obs-x264.dll
10:18:29.145: obs-transitions.dll
10:18:29.145: obs-text.dll
10:18:29.145: obs-qsv11.dll
10:18:29.145: obs-outputs.dll
10:18:29.145: obs-filters.dll
10:18:29.145: obs-ffmpeg.dll
10:18:29.145: obs-browser.dll
10:18:29.145: image-source.dll
10:18:29.145: frontend-tools.dll
10:18:29.145: enc-amf.dll
10:18:29.145: coreaudio-encoder.dll
10:18:29.145: ==== Startup complete ===============================================
10:18:29.148: All scene data cleared
10:18:29.148: ------------------------------------------------
10:18:29.175: WASAPI: Device 'Speakers (2- High Definition Audio Device)' initialized
10:18:29.186: WASAPI: Device 'Line (4- USB AUDIO CODEC)' initialized
10:18:29.212: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds
10:18:29.241: ---------------------------------
10:18:29.241: [DShow Device: 'Webcam'] settings updated:
10:18:29.241: video device: Logitech HD Pro Webcam C920
10:18:29.241: video path: \\?\usb#vid_046d&pid_082d&mi_00#6&36aae7b7&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083}
10:18:29.241: resolution: 1920x1080
10:18:29.241: fps: 30.00 (interval: 333333)
10:18:29.241: format: I420
10:18:29.258: DShow: Run failed, device already in use (0x8007001F): A device attached to the system is not functioning.
10:18:29.258:
10:18:29.526: Switched to scene 'FULL FACECAM'
10:18:29.527: ------------------------------------------------
10:18:29.527: Loaded scenes:
10:18:29.527: - scene 'NORMAL STREAM':
10:18:29.527: - source: 'H1Z1' (game_capture)
10:18:29.527: - source: 'Chat' (browser_source)
10:18:29.527: - source: 'Alerts' (browser_source)
10:18:29.527: - source: 'Donation Tick' (browser_source)
10:18:29.527: - source: 'Webcam' (dshow_input)
10:18:29.527: - scene 'FULL FACECAM':
10:18:29.527: - source: 'Webcam' (dshow_input)
10:18:29.527: - source: 'Alerts' (browser_source)
10:18:29.527: - source: 'Chat' (browser_source)
10:18:29.527: - scene 'PreStream':
10:18:29.527: - source: 'Leaferbag' (text_gdiplus)
10:18:29.527: - source: 'Chat' (browser_source)
10:18:29.528: ------------------------------------------------
10:18:29.801: Update check: last known remote version is 17.0.0
10:18:34.070: User switched to scene 'NORMAL STREAM'
10:18:34.558: User switched to scene 'FULL FACECAM'
10:18:39.869: adding 23 milliseconds of audio buffering, total audio buffering is now 46 milliseconds
10:18:40.349: ---------------------------------
10:18:40.349: [DShow Device: 'Webcam'] settings updated:
10:18:40.349: video device: Logitech HD Pro Webcam C920
10:18:40.349: video path: \\?\usb#vid_046d&pid_082d&mi_00#6&36aae7b7&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083}
10:18:40.349: resolution: 1920x1080
10:18:40.349: fps: 30.00 (interval: 333333)
10:18:40.349: format: I420
10:18:40.361: DShow: Run failed, device already in use (0x8007001F): A device attached to the system is not functioning.
10:18:40.361:
10:18:47.414: ==== Shutting down ==================================================
10:18:47.426: Switched to scene '(null)'
10:18:47.436: WASAPI: Device 'Speakers (2- High Definition Audio Device)' Terminated
10:18:47.446: WASAPI: Device 'Line (4- USB AUDIO CODEC)' Terminated
10:18:47.450: All scene data cleared
10:18:47.450: ------------------------------------------------
10:18:47.526: Freeing OBS context data
10:18:47.600: == Profiler Results =============================
10:18:47.600: run_program_init: 1357.23 ms
10:18:47.600: ┣OBSApp::AppInit: 1.863 ms
10:18:47.600: ┃ ┗OBSApp::InitLocale: 1.14 ms
10:18:47.600: ┗OBSApp::OBSInit: 1347.02 ms
10:18:47.601: ┣obs_startup: 1.529 ms
10:18:47.601: ┗OBSBasic::OBSInit: 1303.03 ms
10:18:47.601: ┣OBSBasic::InitBasicConfig: 0.4 ms
10:18:47.601: ┣OBSBasic::ResetAudio: 0.311 ms
10:18:47.601: ┣OBSBasic::ResetVideo: 728.086 ms
10:18:47.601: ┣OBSBasic::InitOBSCallbacks: 0.019 ms
10:18:47.601: ┣OBSBasic::InitHotkeys: 0.059 ms
10:18:47.601: ┣obs_load_all_modules: 134.033 ms
10:18:47.601: ┃ ┣obs_init_module(coreaudio-encoder.dll): 0.498 ms
10:18:47.601: ┃ ┣obs_init_module(enc-amf.dll): 0.352 ms
10:18:47.601: ┃ ┣obs_init_module(frontend-tools.dll): 1.492 ms
10:18:47.601: ┃ ┣obs_init_module(image-source.dll): 0.004 ms
10:18:47.601: ┃ ┣obs_init_module(obs-browser.dll): 0.073 ms
10:18:47.601: ┃ ┣obs_init_module(obs-ffmpeg.dll): 0.669 ms
10:18:47.601: ┃ ┣obs_init_module(obs-filters.dll): 0.013 ms
10:18:47.601: ┃ ┣obs_init_module(obs-outputs.dll): 0.003 ms
10:18:47.601: ┃ ┣obs_init_module(obs-qsv11.dll): 51.828 ms
10:18:47.601: ┃ ┣obs_init_module(obs-text.dll): 0.583 ms
10:18:47.601: ┃ ┣obs_init_module(obs-transitions.dll): 0.005 ms
10:18:47.601: ┃ ┣obs_init_module(obs-x264.dll): 0.002 ms
10:18:47.601: ┃ ┣obs_init_module(rtmp-services.dll): 0.417 ms
10:18:47.601: ┃ ┣obs_init_module(text-freetype2.dll): 0.06 ms
10:18:47.601: ┃ ┣obs_init_module(vlc-video.dll): 0.063 ms
10:18:47.601: ┃ ┣obs_init_module(win-capture.dll): 0.07 ms
10:18:47.601: ┃ ┣obs_init_module(win-decklink.dll): 1.061 ms
10:18:47.601: ┃ ┣obs_init_module(win-dshow.dll): 2.111 ms
10:18:47.601: ┃ ┣obs_init_module(win-mf.dll): 52.798 ms
10:18:47.601: ┃ ┣obs_init_module(win-wasapi.dll): 0.008 ms
10:18:47.601: ┃ ┗reset_win32_symbol_paths: 0.305 ms
10:18:47.601: ┣OBSBasic::ResetOutputs: 0.539 ms
10:18:47.601: ┣OBSBasic::CreateHotkeys: 0.036 ms
10:18:47.601: ┣OBSBasic::InitService: 0.17 ms
10:18:47.601: ┣OBSBasic::InitPrimitives: 0.977 ms
10:18:47.601: ┗OBSBasic::Load: 380.362 ms
10:18:47.601: obs_hotkey_thread(25 ms): min=0.001 ms, median=0.006 ms, max=0.345 ms, 99th percentile=0.188 ms, 100% below 25 ms
10:18:47.601: audio_thread(Audio): min=0 ms, median=0.064 ms, max=0.484 ms, 99th percentile=0.206 ms
10:18:47.601: obs_video_thread(33.3333 ms): min=0.25 ms, median=1.222 ms, max=312.581 ms, 99th percentile=3.414 ms, 99.8172% below 33.333 ms
10:18:47.601: ┣tick_sources: min=0 ms, median=0.011 ms, max=310.974 ms, 99th percentile=0.163 ms
10:18:47.601: ┣render_displays: min=0.001 ms, median=0.561 ms, max=2.602 ms, 99th percentile=1.571 ms
10:18:47.601: ┗output_frame: min=0.246 ms, median=0.616 ms, max=1.842 ms, 99th percentile=1.319 ms
10:18:47.601: ┣gs_context(video->graphics): min=0.105 ms, median=0.179 ms, max=0.859 ms, 99th percentile=0.57 ms
10:18:47.601: ┃ ┣render_video: min=0.033 ms, median=0.058 ms, max=0.468 ms, 99th percentile=0.222 ms
10:18:47.601: ┃ ┃ ┣render_main_texture: min=0.003 ms, median=0.025 ms, max=0.306 ms, 99th percentile=0.095 ms
10:18:47.602: ┃ ┃ ┣render_output_texture: min=0.006 ms, median=0.011 ms, max=0.123 ms, 99th percentile=0.056 ms
10:18:47.602: ┃ ┃ ┣render_convert_texture: min=0.001 ms, median=0.012 ms, max=0.429 ms, 99th percentile=0.032 ms
10:18:47.602: ┃ ┃ ┗stage_output_texture: min=0 ms, median=0.003 ms, max=0.013 ms, 99th percentile=0.006 ms
10:18:47.602: ┃ ┣download_frame: min=0 ms, median=0.002 ms, max=0.009 ms, 99th percentile=0.004 ms
10:18:47.602: ┃ ┗gs_flush: min=0.046 ms, median=0.115 ms, max=0.824 ms, 99th percentile=0.371 ms
10:18:47.602: ┗output_video_data: min=0.317 ms, median=0.428 ms, max=1.322 ms, 99th percentile=0.88 ms
10:18:47.602: video_thread(video): min=0.001 ms, median=0.001 ms, max=0.1 ms, 99th percentile=0.003 ms
10:18:47.602: =================================================
10:18:47.602: == Profiler Time Between Calls ==================
10:18:47.602: obs_hotkey_thread(25 ms): min=24.699 ms, median=25.199 ms, max=31.606 ms, 74.8684% within ±2% of 25 ms (0% lower, 25.1316% higher)
10:18:47.602: obs_video_thread(33.3333 ms): min=23.752 ms, median=33.333 ms, max=312.59 ms, 97.4359% within ±2% of 33.333 ms (1.4652% lower, 1.0989% higher)
10:18:47.602: =================================================
10:18:47.621: Number of memory leaks: 25
 

Fenrir

Forum Admin
Code:
10:18:40.361: DShow: Run failed, device already in use (0x8007001F): A device attached to the system is not functioning.

Looks like something else might be trying to use your webcam.
 

Harold

Active Member
What version of the nvidia drivers are you running?

You should be on 376.33 or newer (if newer is available)
 
I noticed you are on 14393 Build, does anyone know if MS ever get the Camera_Frame_Server bug ironed out? If so was it done for that Win build? I used to have to use the reg hack workaround by manually turning off the camera_frame_server by way of the registry, some times I would have to play around with the reg Key here and there because honestly I think they (MS) were working on that particular problem for a bit, I'll have to research what the end results was. This problem was exacerbated when using more than 1 camera definitely, as I had the same issues as the OP mentioned, but it seemed to resolve itself and no longer need the reg hack for some time now. But I digress...

I agree with Fenrir, is it possible something else is utilizing the camera, have you installed any software or apps recently that utilize the camera in anyway? Also you can check the device logs for the camera in Device Manager to see if anything happened to it since when you last remember it was working fine, such as Windows installing new drivers for it, errors, etc. See below for example, it would have been full of interesting events but when I plopped on CreatorsUpdate, everything device log was wiped during the installation.

upload_2017-4-29_2-27-1.png


On another note or point of thought, can you try moving the camera to another USB port? There may be a conflict arising between some devices, or a power issue with the port, one of the connected devices or cam. For me a fix for one of my cams that had a 50/50 shot of turning on when OBS started was to simply move it to another dedicated USB port. USB ports unfortunately can go bad, it's just the nature of being plugged into and out of a lot, sometimes at really electrically not good times but how are we supposed to know that??? Anyway, I've diagnosed more shorted out USB ports for so many people than I'd care to imagine, the ports...not the people...well maybe a lil' of column a and b. IF you are using a Hub, but have isolated ports available, use the direct port, typically I rather put devices that use more power like cams etc. onto powered hubs as it takes the strain off the power supplied by the port, but just don't overload the hub with stuff as you might hit hiccups with realtime type stuff such as cams...for example: I had two cams share one hub, all was good, added mouse and KB, cams went bonkers...bad FPS, no color, you name it. Sometimes the flicker you discuss can occur when the CPU or encoder perhaps is too overloaded at that one point and abandons a frame or conversion resulting in the colored blip.

So to sum up:

1. Try a different USB port, you'll probably want to remove the global source(s) of cams out of OBS first, just delete them all in each scene until you no longer see it available as a video capture source. Then shutdown OBS, unplug your webcam. Give yourself about 30 seconds to reflect on the beauty of the world, plug in the cam to the new port. Allow it to fully install before starting OBS. If no indication of installation is onscreen, simply watch your HDD light flash and for maybe better insight than that...go to device manager and watch as it is installed. Since you are just moving ports, the whole process should be less than 15 seconds if not way less. But some cams take more time. Each time a change is made Device manager will auto refresh itself, just watch the branch of the camera that you've plugged in, once nothing refreshes for a bit, open the properties for the camera and it should say "Device is enabled and is functionally normally" or something to that effect in the "General" tab.

2. Go into OBS and create the new Video Capture Source. Bear in mind that if you had filters or transforms specific to the camera, you'll want to screenshot those paramaters BEFORE you delete the source in step 1, so that way you can easily get it back the way you like it pretty quickly.

Other than that, we'd probably need amore verbose log file and you notating the exact moment when it happens so possibly a correlation could be made with the event time noted and something at that exact time or thereabouts within your log/profiling data. Good luck, hope its just an easy fix like above. :)

-SPIKEYPUP
 
I almost forgot to mention, double check in the drivers for the cam that you turn off most if not all of the "automatic processing" features, at least that you are comfortable with turning off. This helps greatly in terms of latency and computing power, I ended up even adjusting my white balance, bright, contr, sat, etc. instead of leaving those automated and it helped a lot and removed some artifacting or color issues like what you experience. I only allow autofocus now, even exposure I do myself because my studio environment is always the same generally with light etc. all this ensures my cam has its processor ready to handle what I want the most, stable clean focused output. Plus with all that auto stuff on, just the color of my shirt would end up causing a chain reaction of algorithms and filters causing hiccups in my cam display or worse overall output! Anyway, just an additional thought as I was trotting away. Good luck, hope it all works out!
 
Top