Vhonowslend / StreamFX-Public

StreamFX is a plugin for OBS® Studio which adds many new effects, filters, sources, transitions and encoders! Be it 3D Transform, Blur, complex Masking, or even custom shaders, you'll find it all here.
https://s.xaymar.com/streamfx-dc
GNU General Public License v2.0
3.93k stars 2.96k forks source link

Removing the Video Super Resolution filter from a source causes OBS to freeze #605

Closed HunterAP23 closed 3 years ago

HunterAP23 commented 3 years ago

Operating System

Windows 10 1903 and higher

OBS Studio Version?

27.0

StreamFX Version

0.11.0a3

OBS Studio Log

2021-08-04 04-08-13.txt

OBS Studio Crash Log

04:08:13.007: Command Line Arguments: --remote-debugging-port=1234
04:08:13.007: CPU Name: AMD Ryzen 7 3700X 8-Core Processor             
04:08:13.007: CPU Speed: 3600MHz
04:08:13.007: Physical Cores: 8, Logical Cores: 16
04:08:13.007: Physical Memory: 65460MB Total, 42760MB Free
04:08:13.007: Windows Version: 10.0 Build 19043 (release: 2009; revision: 1110; 64-bit)
04:08:13.007: Running as administrator: true
04:08:13.007: Aero is Enabled (Aero is always on for windows 8 and above)
04:08:13.007: Windows 10 Gaming Features:
04:08:13.007:   Game Bar: Off
04:08:13.007:   Game DVR: Off
04:08:13.007:   Game DVR Background Recording: Off
04:08:13.007:   Game Mode: On
04:08:13.007:   Hardware GPU Scheduler: Off
04:08:13.009: Sec. Software Status:
04:08:13.009:   Microsoft Defender Antivirus: enabled (AV)
04:08:13.010:   Windows Firewall: enabled (FW)
04:08:13.010: Current Date/Time: 2021-08-04, 04:08:13
04:08:13.010: Browser Hardware Acceleration: true
04:08:13.010: Portable mode: false
04:08:13.229: OBS 27.0.1 (64-bit, windows)
04:08:13.229: ---------------------------------
04:08:13.283: ---------------------------------
04:08:13.283: audio settings reset:
04:08:13.283:   samples per sec: 48000
04:08:13.283:   speakers:        2
04:08:13.284: ---------------------------------
04:08:13.284: Initializing D3D11...
04:08:13.284: Available Video Adapters: 
04:08:13.285:   Adapter 0: NVIDIA GeForce RTX 3060 Ti
04:08:13.286:     Dedicated VRAM: 4146069504
04:08:13.286:     Shared VRAM:    4255555584
04:08:13.286:     PCI ID:         10de:2486
04:08:13.286:     Driver Version: 27.21.14.6627
04:08:13.286:     output 0: pos={0, 0}, size={2560, 1440}, attached=true, refresh=59, name=DELL P2418D
04:08:13.290: Loading up D3D11 on adapter NVIDIA GeForce RTX 3060 Ti (0)
04:08:13.353: D3D11 loaded successfully, feature level used: b000
04:08:13.353: DXGI increase maximum frame latency success
04:08:13.353: D3D11 GPU priority setup success
04:08:13.714: ---------------------------------
04:08:13.714: video settings reset:
04:08:13.714:   base resolution:   2560x1440
04:08:13.714:   output resolution: 2560x1440
04:08:13.714:   downscale filter:  Bicubic
04:08:13.714:   fps:               60/1
04:08:13.714:   format:            I444
04:08:13.714:   YUV mode:          709/Partial
04:08:13.714: NV12 texture support not available
04:08:13.715: Audio monitoring device:
04:08:13.715:   name: Headphones (2- Arctis Pro Wireless Game)
04:08:13.715:   id: {0.0.0.00000000}.{6eaf708d-b323-471b-9107-095b16ee0111}
04:08:13.717: ---------------------------------
04:08:13.717: Skipping module '../../obs-plugins/64bit/chrome_elf.dll', not an OBS plugin
04:08:13.718: Skipping module '../../obs-plugins/64bit/concrt140.dll', not an OBS plugin
04:08:13.723: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
04:08:13.724: Failed to load 'en-US' text for module: 'decklink-captions.dll'
04:08:13.725: Failed to load 'en-US' text for module: 'decklink-ouput-ui.dll'
04:08:13.726: Skipping module '../../obs-plugins/64bit/DirectML.dll', not an OBS plugin
04:08:13.756: [AMF] Unable to load 'amfrt64.dll', error code 126.
04:08:13.758: [AMF] AMF Test failed due to one or more errors.
04:08:13.758: Failed to initialize module 'enc-amf.dll'
04:08:13.765: Skipping module '../../obs-plugins/64bit/libcef.dll', not an OBS plugin
04:08:13.774: Skipping module '../../obs-plugins/64bit/libEGL.dll', not an OBS plugin
04:08:13.775: Skipping module '../../obs-plugins/64bit/libfftw3-3.dll', not an OBS plugin
04:08:13.776: Skipping module '../../obs-plugins/64bit/libGLESv2.dll', not an OBS plugin
04:08:13.782: Skipping module '../../obs-plugins/64bit/msvcp140.dll', not an OBS plugin
04:08:13.785: Failed to load 'en-US' text for module: 'obs-backgroundremoval.dll'
04:08:13.785: [obs-backgroundremoval] plugin loaded successfully (version 0.3.0)
04:08:13.786: [obs-browser]: Version 2.14.3
04:08:13.786: [obs-browser]: CEF Version 75.1.16+g16a67c4+chromium-75.0.3770.100
04:08:13.787: Failed to load 'en-US' text for module: 'obs-face-tracker.dll'
04:08:13.787: [obs-face-tracker] registering face_tracker_filter_info (version 0.2.2)
04:08:13.790: NVENC supported
04:08:13.828: [noise suppress: Nvidia RTX denoiser enabled]
04:08:13.829: [obs-ndi] hello ! (version 4.9.0)
04:08:13.829: [obs-ndi] Trying 'C:\Program Files\NewTek\NDI 4 Tools\Runtime'
04:08:13.829: [obs-ndi] Found NDI library at 'C:/Program Files/NewTek/NDI 4 Tools/Runtime/Processing.NDI.Lib.x64.dll'
04:08:13.831: [obs-ndi] NDI runtime loaded successfully
04:08:13.838: [obs-ndi] NDI library initialized successfully (NDI SDK WIN64 05:29:55 Jan 29 2021 4.6.1.0)
04:08:13.917: Skipping module '../../obs-plugins/64bit/onnxruntime.dll', not an OBS plugin
04:08:13.917: Skipping module '../../obs-plugins/64bit/Qt5Network.dll', not an OBS plugin
04:08:13.918: Module '../../obs-plugins/64bit/Qt5Network.dll' not loaded
04:08:13.922: [Source Record] loaded version 0.2.3
04:08:13.923: [spectralizer] Loading v1.3.4 build time 2021.01.28 20:03
04:08:13.924: Failed to load 'en-US' text for module: 'StreamDeckPlugin.dll'
04:08:13.928: [StreamFX] Loading Version 0.11.0.0a3-g23207d04
04:08:13.930: [StreamFX] <nvidia::cuda::cuda> Driver reported CUDA version: 11.3.0
04:08:14.003: [StreamFX] <nvidia::cuda::context> Initialized CUDA on device 'NVIDIA GeForce RTX 3060 Ti' (669b97d1-f9bc-d21b-3c0e-deb7b4e8a961, 000140c7, 1).
04:08:14.009: [StreamFX] <NVIDIA Face Tracking Filter> Failed to load NVIDIA AR SDK runtime.
04:08:14.070: [StreamFX] Loaded Version 0.11.0.0a3-g23207d04
04:08:14.072: [Transition Table] loaded version 0.2.1
04:08:14.073: Skipping module '../../obs-plugins/64bit/ucrtbase.dll', not an OBS plugin
04:08:14.073: Skipping module '../../obs-plugins/64bit/vccorlib140.dll', not an OBS plugin
04:08:14.074: Skipping module '../../obs-plugins/64bit/vcruntime140.dll', not an OBS plugin
04:08:14.076: VLC found, VLC video source enabled
04:08:14.081: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
04:08:14.082: No blackmagic support
04:08:14.086: ---------------------------------
04:08:14.086:   Loaded Modules:
04:08:14.086:     win-wasapi.dll
04:08:14.086:     win-mf.dll
04:08:14.086:     win-dshow.dll
04:08:14.086:     win-decklink.dll
04:08:14.086:     win-capture.dll
04:08:14.086:     vlc-video.dll
04:08:14.086:     transition-table.dll
04:08:14.086:     text-freetype2.dll
04:08:14.086:     StreamFX.dll
04:08:14.086:     StreamDeckPlugin.dll
04:08:14.086:     spectralizer.dll
04:08:14.086:     source-record.dll
04:08:14.086:     rtmp-services.dll
04:08:14.086:     replay-source.dll
04:08:14.086:     obs-x264.dll
04:08:14.086:     obs-vst.dll
04:08:14.086:     obs-transitions.dll
04:08:14.086:     obs-text.dll
04:08:14.086:     obs-qsv11.dll
04:08:14.086:     obs-outputs.dll
04:08:14.086:     obs-ndi.dll
04:08:14.086:     obs-filters.dll
04:08:14.086:     obs-ffmpeg.dll
04:08:14.086:     obs-face-tracker.dll
04:08:14.086:     obs-browser.dll
04:08:14.086:     obs-backgroundremoval.dll
04:08:14.086:     move-transition.dll
04:08:14.086:     logi_obs_plugin_x64.dll
04:08:14.086:     image-source.dll
04:08:14.086:     frontend-tools.dll
04:08:14.086:     enc-amf.dll
04:08:14.086:     droidcam-obs.dll
04:08:14.086:     decklink-ouput-ui.dll
04:08:14.086:     decklink-captions.dll
04:08:14.086:     coreaudio-encoder.dll
04:08:14.086: ---------------------------------
04:08:15.086: ==== Startup complete ===============================================
04:08:15.092: All scene data cleared
04:08:15.092: ------------------------------------------------
04:08:15.147: WASAPI: Device 'Chat (2- TC-Helicon GoXLR)' [48000 Hz] initialized
04:08:15.148: [Loaded global audio device]: 'Discord'
04:08:15.170: WASAPI: Device 'Microphone (NVIDIA Broadcast)' [48000 Hz] initialized
04:08:15.170: [Loaded global audio device]: 'Microphone'
04:08:15.171: [DroidCamOBS] create(source=00000219ACE7A040) r130
04:08:15.209: adding 42 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: Microphone)
04:08:15.209: 
04:08:15.230: [DroidCamOBS] activated=0, deactivateWNS=1, is_showing=0, enable_audio=0
04:08:15.230: [DroidCamOBS] video_format=avc video_resolution=640x480
04:08:15.231: [DroidCamOBS] video_decode_thread start
04:08:15.231: [DroidCamOBS] video_thread start
04:08:15.231: [DroidCamOBS] audio_thread start
04:08:15.234: [Media Source 'Webcam Overlay']: settings:
04:08:15.234:   input:                   D:/Downloads/CompTools/Streaming/Overlays/Dark Souls Animated/Overlay/CAM_upscaled.mov
04:08:15.234:   input_format:            (null)
04:08:15.234:   speed:                   100
04:08:15.234:   is_looping:              yes
04:08:15.234:   is_linear_alpha:         no
04:08:15.234:   is_hw_decoding:          yes
04:08:15.234:   is_clear_on_media_end:   yes
04:08:15.234:   restart_on_activate:     yes
04:08:15.234:   close_when_inactive:     yes
04:08:15.438: Switched to scene 'Camera'
04:08:15.446: [Media Source 'Stinger (Stinger)']: settings:
04:08:15.446:   input:                   D:/Downloads/CompTools/Streaming/Overlays/Dark Souls Animated/Transition/Transition_4k.mov
04:08:15.446:   input_format:            (null)
04:08:15.446:   speed:                   100
04:08:15.446:   is_looping:              no
04:08:15.446:   is_linear_alpha:         no
04:08:15.446:   is_hw_decoding:          yes
04:08:15.446:   is_clear_on_media_end:   yes
04:08:15.446:   restart_on_activate:     yes
04:08:15.446:   close_when_inactive:     no
04:08:15.455: ------------------------------------------------
04:08:15.455: Loaded scenes:
04:08:15.455: - scene 'Scene - Main':
04:08:15.455:     - source: 'Games' (scene)
04:08:15.455:     - source: 'Camera' (scene)
04:08:15.455:         - filter: 'Move Source' (move_source_filter)
04:08:15.455:     - source: 'Events' (scene)
04:08:15.455:     - source: 'Alerts' (scene)
04:08:15.455: - scene 'Scene - Starting':
04:08:15.455: - scene 'Scene - BRB':
04:08:15.455: - scene 'Scene - Intermission':
04:08:15.455: - scene 'Scene - Ending':
04:08:15.455: - scene 'Games':
04:08:15.455:     - source: 'Gaming PC (Capture Card)' (dshow_input)
04:08:15.455:         - filter: 'HDR LUT' (clut_filter)
04:08:15.455:         - filter: 'Source Record' (source_record_filter)
04:08:15.455: - scene 'Camera':
04:08:15.455:     - source: 'Camera Group' (group)
04:08:15.455:         - filter: 'Source Record' (source_record_filter)
04:08:15.455:         - source: 'OP6T' (droidcam_obs)
04:08:15.455:             - filter: 'Source Record' (source_record_filter)
04:08:15.455:         - source: 'AVerMedia Webcam' (dshow_input)
04:08:15.455:         - source: 'Pi Webcam' (dshow_input)
04:08:15.455:     - source: 'Group' (group)
04:08:15.455:         - source: 'Webcam Overlay' (ffmpeg_source)
04:08:15.455:     - filter: 'Move Source' (move_source_filter)
04:08:15.455: - scene 'Chat':
04:08:15.455:     - source: 'Chat Source' (browser_source)
04:08:15.455: - scene 'Events':
04:08:15.455:     - source: 'Events Browser' (browser_source)
04:08:15.455: - scene 'Alerts':
04:08:15.455:     - source: 'Alerts Browser' (browser_source)
04:08:15.455: ------------------------------------------------
04:08:16.083: [StreamFX] <updater> Automatic checks at launch are now enabled.
04:08:16.090: ---------------------------------
04:08:16.091: [DShow Device: 'Gaming PC (Capture Card)'] settings updated: 
04:08:16.091:   video device: AVerMedia HD Capture GC573 1
04:08:16.091:   video path: \\?\pci#ven_1461&dev_0054&subsys_57301461&rev_00#0000000101000a3500#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{adef4cb5-1401-4177-84ee-fe8b26c13a5b}
04:08:16.091:   resolution: 2560x1440
04:08:16.091:   flip: 0
04:08:16.091:   fps: 144.00 (interval: 69444)
04:08:16.091:   format: YUY2
04:08:16.104: ---------------------------------
04:08:16.104: [DShow Device: 'AVerMedia Webcam'] settings updated: 
04:08:16.104:   video device: Live Streamer CAM 513
04:08:16.104:   video path: \\?\usb#vid_07ca&pid_513a&mi_00#8&1e5c1766&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
04:08:16.104:   resolution: 3840x2160
04:08:16.104:   flip: 0
04:08:16.104:   fps: 30.00 (interval: 333333)
04:08:16.104:   format: MJPEG
04:08:16.109: ---------------------------------
04:08:16.109: [DShow Device: 'Pi Webcam'] settings updated: 
04:08:16.109:   video device: UVC Camera
04:08:16.109:   video path: \\?\usb#vid_1d6b&pid_0104&mi_00#8&1699a243&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
04:08:16.109:   resolution: 1920x1080
04:08:16.109:   flip: 0
04:08:16.109:   fps: 30.00 (interval: 333333)
04:08:16.109:   format: MJPEG
04:08:16.302:   using video device audio: no
04:08:16.302:   audio device: Broadcast Stream Mix (2- TC-Helicon GoXLR)
04:08:16.302:   sample rate: 44100
04:08:16.302:   channels: 2
04:08:16.302:   audio type: Capture
04:08:16.694: obs-browser: Refused to apply style from 'https://fonts.googleapis.com/css?family={font_family}:300,400,600,700,800&display=swap' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. (source: https://streamlabs.com/widgets/event-list/v1/6ED94DD3D5486E44AB52:0)
04:08:16.696: obs-browser: Refused to apply style from 'https://fonts.googleapis.com/css?family={fontFamily}:400,500,700,900' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. (source: https://streamlabs.com/widgets/chat-box/v1/6ED94DD3D5486E44AB52:0)
04:08:16.728: obs-browser: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('https://streamlabs.com'). (source: https://www.youtube.com/s/player/2840754e/www-widgetapi.vflset/www-widgetapi.js:761)
04:10:32.577: A sprite cannot be drawn without a width/height
04:11:25.762: [Media Source 'Webcam Overlay']: settings:
04:11:25.762:   input:                   D:/Downloads/CompTools/Streaming/Overlays/Dark Souls Animated/Overlay/CAM_upscaled.avi
04:11:25.762:   input_format:            (null)
04:11:25.762:   speed:                   100
04:11:25.762:   is_looping:              yes
04:11:25.762:   is_linear_alpha:         no
04:11:25.762:   is_hw_decoding:          yes
04:11:25.762:   is_clear_on_media_end:   yes
04:11:25.762:   restart_on_activate:     yes
04:11:25.762:   close_when_inactive:     yes
04:11:40.108: User removed filter 'Move Source' (move_source_filter) from source 'Camera'
04:11:44.565: [StreamFX] <filter::video_superresolution> Instance 'Video Super-Resolution' is switching provider from 'N/A' to 'NVIDIA Video Super-Resolution, powered by NVIDIA Broadcast'.
04:11:44.565: User added filter 'Video Super-Resolution' (streamfx-filter-video-superresolution) to source 'Camera'
04:11:45.567: [StreamFX] <filter::video_superresolution> Instance 'Video Super-Resolution' switched provider from 'N/A' to 'NVIDIA Video Super-Resolution, powered by NVIDIA Broadcast'.
04:11:45.619: [StreamFX] <nvidia::vfx::superresolution::superresolution> Failed to initialize effect due to error: The GPU is not supported
04:11:45.620: [StreamFX] <nvidia::vfx::superresolution::superresolution> Failed to initialize effect due to error: The GPU is not supported
04:12:11.627: User switched to scene 'Scene - Main'
04:12:18.368: User switched to scene 'Camera'
04:12:23.168: User removed filter 'Video Super-Resolution' (streamfx-filter-video-superresolution) from source 'Camera'
04:12:37.338: [StreamFX] <filter::video_superresolution> Instance 'Video Super-Resolution' is switching provider from 'N/A' to 'NVIDIA Video Super-Resolution, powered by NVIDIA Broadcast'.
04:12:37.338: User added filter 'Video Super-Resolution' (streamfx-filter-video-superresolution) to source 'AVerMedia Webcam'
04:12:37.545: [StreamFX] <filter::video_superresolution> Instance 'Video Super-Resolution' switched provider from 'N/A' to 'NVIDIA Video Super-Resolution, powered by NVIDIA Broadcast'.
04:12:37.604: [StreamFX] <nvidia::vfx::superresolution::superresolution> Failed to initialize effect due to error: The GPU is not supported
04:12:37.607: [StreamFX] <nvidia::vfx::superresolution::superresolution> Failed to initialize effect due to error: The GPU is not supported
04:12:37.608: [StreamFX] <nvidia::vfx::superresolution::superresolution> Failed to initialize effect due to error: The GPU is not supported
04:13:17.133: User removed filter 'Video Super-Resolution' (streamfx-filter-video-superresolution) from source 'AVerMedia Webcam'

Current Behavior

When removing a Video Super resolution filter from a media source (in this case a Video Capture Device source), OBS will freeze and requires being force-closed through Task Manager.

Expected Behavior

Removing the Video Super Resolution filter should not crash OBS.

Steps to Reproduce the Bug

  1. Add the Video Super Resolution filter to an existing video source.
  2. Attempt to remove the filter by either:
    • Clicking the minus symbol in the filter window
    • Right-clicking on the Video Super Resolution and selecting "remove"
  3. Crash occurs

Any additional Information we need to know?

The NVIDIA Video Effects SDK Redistributable for Ampere cards (this PC is using an RTX 3060ti) was installed prior to running OBS with this test version of StreamFX.

There are no other applications running that are utilizing the GPU - at most there are a few Chrome tabs open but not doing anything intensive.

Xaymar commented 3 years ago

Is there a crash log from this? You put the normal log inside the crash log field, which is not what it's for.

HunterAP23 commented 3 years ago

My bad - there is no actual crash log, as OBS will just lock up indefinitely until force closed and it does not generate a crash log.

Xaymar commented 3 years ago

That's a vastly different thing then, that's a freeze. If it was a crash it would have been a few seconds of work only, but freezes take much longer to figure out. :(

Xaymar commented 3 years ago

I so far failed to reproduce this freeze at all on any of my systems that can run the effect.

HunterAP23 commented 3 years ago

I think I can confirm the cause. It comes down to the fact that I was using the filter on a webcam that was running a native 2160p. By default, Nvidia Broadcast will refuse to run on a webcam running at that resolution since it would be extremely detrimental to performance. Testing using the same camera source, but trying 1080p, did not have any issues when removing the filter.

So this would be more of a limitation of the Video Super Resolution part of the Video Effects SDK and NOT the filter itself.

ALETTERR commented 3 years ago

我想我可以证实原因。 归根结底,我使用的是运行原生2160p的摄像头上的过滤器。 默认情况下,Nvidia 广播将拒绝在以该分辨率运行的网络摄像头上运行,因为这将对性能极为不利。 使用相同的相机源进行测试,但尝试 1080p 时,在删除滤镜时没有任何问题。

因此,这将更多的是视频效果 SDK 的视频超级分辨率部分的限制,而不是过滤器本身。

How to solve this problem

Xaymar commented 3 years ago

Unfortunately I do not have a 4k capable input right now, so this will be difficult to test in the given test case.

HunterAP23 commented 3 years ago

Not sure which of these fixed the issue, but updating OBS to version 27.1.1 and using StreamFX 0.11 Alpha 3 (0.11.0.6a3-g104d0528) fixed this issue. My guess is that the there were a number of bugfixes in OBS 27.1.1, although I can't identify which of those bug fixes could've been related to this issue.

Closing this issue since it's been resolved.