obsproject / obs-websocket

Remote-control of OBS Studio through WebSocket
GNU General Public License v2.0
3.79k stars 701 forks source link

Bug: OBS Fails to Transition from OBS_WEBSOCKET_OUTPUT_STOPPING to OBS_WEBSOCKET_OUTPUT_STOPPED #1230

Open PauloFavero opened 1 month ago

PauloFavero commented 1 month ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

29.0.x

OBS Studio Version (Other)

30.1.2

obs-websocket Version

5.1.0

OBS Studio Log URL

https://obsproject.com/logs/Rd9pV7TBXkjLIEZ6

OBS Studio Crash Log URL

No response

Expected Behavior

Sending a StopRecord command should stop OBS and save the video file.

Current Behavior

Hey folks,

I'm controlling my OBS via websocket, and sometimes OBS hangs indefinitely when trying to stop. It never completes the transition from OBS_WEBSOCKET_OUTPUT_STOPPING to OBS_WEBSOCKET_OUTPUT_STOPPED. The logs don't show anything unusual.

Here’s how I’m using OBS:

  1. I create a video input of type Window Capture, set the window name, use the Windows 7 capture method, set the cursor to false, and ensure the window title must match.
  2. I apply a scene item transform.
  3. Regarding the output, we set the FilenameFormatting property.
  4. We create an audio source of kind WASAPI_Output_Capture for a Windows audio device.

To stop it, we use the StopRecord command. In rare cases, OBS isn't able to completely stop the video recording and save the file. If I try to stop or pause it manually, nothing happens, and when trying to close the window, it crashes.

I also attached the log file of the last occurrence. The timestamp 19:31:18.666 represents the moment that I manually tried to intervene.

Steps to Reproduce

I'm not sure how to reproduce it since it happens sporadically.

Anything else we should know?

15:52:59.403: Command Line Arguments: -p -m
15:52:59.419: CPU Name: Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz
15:52:59.419: CPU Speed: 2900MHz
15:52:59.419: Physical Cores: 2, Logical Cores: 4
15:52:59.419: Physical Memory: 8047MB Total, 6308MB Free
15:52:59.419: Windows Version: 10.0 Build 20348 (release: 21H2; revision: 524; 64-bit)
15:52:59.419: Running as administrator: false
15:52:59.419: Windows 10/11 Gaming Features:
15:52:59.419:   Game Mode: Probably On (no reg key set)
15:52:59.424: Current Date/Time: 2024-06-07, 15:52:59
15:52:59.425: Browser Hardware Acceleration: true
15:52:59.486: Hide OBS windows from screen capture: false
15:52:59.487: Qt Version: 6.6.2 (runtime), 6.6.2 (compiled)
15:52:59.488: Portable mode: true
15:53:10.639: OBS 30.1.2 (64-bit, windows)
15:53:10.640: ---------------------------------
15:53:11.234: ---------------------------------
15:53:11.295: audio settings reset:
15:53:11.295:   samples per sec: 48000
15:53:11.295:   speakers:        2
15:53:11.295:   max buffering:   960 milliseconds
15:53:11.295:   buffering type:  dynamically increasing
15:53:11.485: ---------------------------------
15:53:11.486: Initializing D3D11...
15:53:11.487: Available Video Adapters: 
15:53:11.491: Loading up D3D11 on adapter Microsoft Basic Render Driver (0)
15:53:11.494: D3D11 loaded successfully, feature level used: b000
15:53:11.495: DXGI increase maximum frame latency success
15:53:11.496: D3D11 GPU priority setup failed (not admin?)
15:53:24.681: ---------------------------------
15:53:24.681: video settings reset:
15:53:24.681:   base resolution:   1280x720
15:53:24.681:   output resolution: 1280x720
15:53:24.681:   downscale filter:  Bicubic
15:53:24.681:   fps:               30/1
15:53:24.681:   format:            NV12
15:53:24.681:   YUV mode:          Rec. 709/Partial
15:53:24.681: NV12 texture support not available
15:53:24.681: P010 texture support not available
15:53:24.682: Audio monitoring device:
15:53:24.682:   name: Default
15:53:24.682:   id: default
15:53:24.682: ---------------------------------
15:53:48.636: No AJA devices found, skipping loading AJA UI plugin
15:53:48.636: Failed to initialize module 'aja-output-ui.dll'
15:53:49.078: No AJA devices found, skipping loading AJA plugin
15:53:49.078: Failed to initialize module 'aja.dll'
15:53:49.144: Skipping module '../../obs-plugins/64bit/chrome_elf.dll', not an OBS plugin
15:53:49.207: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
15:53:49.751: Failed to load 'en-US' text for module: 'decklink-captions.dll'
15:53:50.056: Failed to load 'en-US' text for module: 'decklink-output-ui.dll'
15:53:50.126: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
15:53:50.126: Failed to initialize module 'decklink.dll'
15:53:50.467: [AMF] Unable to load 'amfrt64.dll', error code 126.
15:53:50.493: [AMF] AMF Test failed due to one or more errors.
15:53:50.493: Failed to initialize module 'enc-amf.dll'
15:53:51.962: Skipping module '../../obs-plugins/64bit/libcef.dll', not an OBS plugin
15:53:52.287: Skipping module '../../obs-plugins/64bit/libEGL.dll', not an OBS plugin
15:53:52.363: Skipping module '../../obs-plugins/64bit/libGLESv2.dll', not an OBS plugin
15:54:04.885: [obs-browser]: Version 2.23.4
15:54:04.885: [obs-browser]: CEF Version 103.0.5060.134 (runtime), 103.0.0-5060-shared-textures.2594+gc69ad37+chromium-103.0.5060.134 (compiled)
15:54:04.885: [obs-browser]: Blacklisted device detected, disabling browser source hardware acceleration.
15:54:06.785: [noise suppress]: NVIDIA denoiser disabled, redistributable not found or could not be loaded.
15:54:06.787: Failed to get NVVideoEffects.dll version info size
15:54:06.788: [NVIDIA VIDEO FX]: FX disabled, redistributable not found or could not be loaded.
15:54:08.665: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.4.2 | RPC Version: 1)
15:54:08.665: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.6.2 | Qt version (run-time): 6.6.2
15:54:08.665: [obs-websocket] [obs_module_load] Linked ASIO Version: 102900
15:54:08.886: [obs-websocket] [obs_module_load] Module loaded.
15:54:09.559: [vlc-video]: Couldn't find VLC installation, VLC video source disabled
15:54:09.953: [rtmp-services plugin] Successfully updated file 'services.json' (version 254)
15:54:09.954: [rtmp-services plugin] Successfully updated package (version 254)
15:54:10.252: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
15:54:10.253: No blackmagic support
15:54:10.774: ---------------------------------
15:54:10.774:   Loaded Modules:
15:54:10.774:     win-wasapi.dll
15:54:10.774:     win-dshow.dll
15:54:10.774:     win-decklink.dll
15:54:10.774:     win-capture.dll
15:54:10.774:     vlc-video.dll
15:54:10.774:     text-freetype2.dll
15:54:10.774:     rtmp-services.dll
15:54:10.774:     obs-x264.dll
15:54:10.774:     obs-websocket.dll
15:54:10.774:     obs-webrtc.dll
15:54:10.774:     obs-vst.dll
15:54:10.774:     obs-transitions.dll
15:54:10.774:     obs-text.dll
15:54:10.774:     obs-qsv11.dll
15:54:10.774:     obs-outputs.dll
15:54:10.774:     obs-filters.dll
15:54:10.774:     obs-ffmpeg.dll
15:54:10.774:     obs-browser.dll
15:54:10.774:     image-source.dll
15:54:10.774:     frontend-tools.dll
15:54:10.774:     decklink-output-ui.dll
15:54:10.774:     decklink-captions.dll
15:54:10.774:     coreaudio-encoder.dll
15:54:10.774: ---------------------------------
15:54:10.774: [obs-websocket] [obs_module_post_load] WebSocket server is enabled, starting...
15:54:10.778: [obs-websocket] [WebSocketServer::Start] Not locked to IPv4 bindings
15:54:10.782: [obs-websocket] [WebSocketServer::ServerRunner] IO thread started.
15:54:10.888: [obs-websocket] [WebSocketServer::Start] Server started successfully on port 4444. Possible connect address: 172.31.47.171
15:54:10.889: QWidget::setTabOrder: 'first' and 'second' must be in the same window
15:54:10.891: ==== Startup complete ===============================================
15:54:11.170: All scene data cleared
15:54:11.170: ------------------------------------------------
15:54:11.469: Switched to scene 'scene-0'
15:54:11.482: ------------------------------------------------
15:54:11.482: Loaded scenes:
15:54:11.482: - scene 'scene-0':
15:54:11.482: ------------------------------------------------
15:54:56.667: [obs-websocket] [WebSocketServer::onOpen] New WebSocket client has connected from [::1]:49782
16:01:14.803: User added source 'video-0' (window_capture) to scene 'scene-0'
16:01:15.424: [window-capture: 'video-0'] update settings:
16:01:15.424:   executable: electron.exe
16:01:15.424:   method selected: BitBlt
16:01:15.424:   method chosen: BitBlt
16:01:15.424:   force SDR: false
16:01:16.123: [win-wasapi: 'audio-0'] update settings:
16:01:16.123:   device id: {0.0.0.00000000}.{852a3059-1cc7-4c6f-8219-30c9254928a5}
16:01:16.123:   use device timing: 1
16:01:16.142: User added source 'audio-0' (wasapi_output_capture) to scene 'scene-0'
16:01:16.144: WASAPI: Device 'test-audio-0 (VB-Audio Virtual Cable)' [48000 Hz] initialized (source: audio-0)
16:01:16.241: ---------------------------------
16:01:16.241: [x264 encoder: 'simple_video_recording'] preset: ultrafast
16:01:16.241: [x264 encoder: 'simple_video_recording'] profile: high
16:01:16.243: [x264 encoder: 'simple_video_recording'] settings:
16:01:16.243:   rate_control: CRF
16:01:16.243:   bitrate:      0
16:01:16.243:   buffer size:  0
16:01:16.243:   crf:          19
16:01:16.243:   fps_num:      30
16:01:16.243:   fps_den:      1
16:01:16.243:   width:        1280
16:01:16.243:   height:       720
16:01:16.243:   keyint:       250
16:01:16.243: 
16:01:16.294: ---------------------------------
16:01:16.295: [FFmpeg aac encoder: 'simple_aac_recording0'] bitrate: 192, channels: 2, channel_layout: stereo
16:01:16.295: 
16:01:16.423: ==== Recording Start ===============================================
16:01:16.423: [ffmpeg muxer: 'simple_file_output'] Writing file 'C:/Users/test/Videos/bf3160d7-14cc-4461-b241-b9bbdb795297_2024.06.07-16.01.16.mkv'...
19:31:18.666: Device 'test-audio-0 (VB-Audio Virtual Cable)' invalidated.  Retrying (source: audio-0)
19:31:21.684: WASAPI: Device 'test-audio-0 (VB-Audio Virtual Cable)' [48000 Hz] initialized (source: audio-0)
19:36:33.165: output simple_file_output paused
19:36:36.665: output simple_file_output unpaused
19:41:15.554: Loading branches from file failed: Opening file failed.
19:41:15.688:   OpenType support missing for "Open Sans", script 11
19:41:15.689:   OpenType support missing for "Arial", script 11
19:41:15.693:   OpenType support missing for "Tahoma", script 11
19:41:15.699:   OpenType support missing for "MS UI Gothic", script 11
19:41:16.010:   OpenType support missing for "Gulim", script 11
19:41:16.134:   OpenType support missing for "SimSun", script 11
19:41:16.273:   OpenType support missing for "PMingLiU", script 11
19:41:16.279:   OpenType support missing for "Segoe UI Emoji", script 11
19:41:16.281:   OpenType support missing for "Segoe UI Symbol", script 11
19:41:16.292:   OpenType support missing for "Open Sans", script 12
19:41:16.293:   OpenType support missing for "Arial", script 12
19:41:16.293:   OpenType support missing for "Tahoma", script 12
19:41:16.294:   OpenType support missing for "MS UI Gothic", script 12
19:41:16.294:   OpenType support missing for "Gulim", script 12
19:41:16.295:   OpenType support missing for "SimSun", script 12
19:41:16.295:   OpenType support missing for "PMingLiU", script 12
19:41:16.295:   OpenType support missing for "Segoe UI Emoji", script 12
19:41:16.296:   OpenType support missing for "Segoe UI Symbol", script 12
19:41:16.298:   OpenType support missing for "Open Sans", script 16
19:41:16.299:   OpenType support missing for "Arial", script 16
19:41:16.299:   OpenType support missing for "Tahoma", script 16
19:41:16.300:   OpenType support missing for "MS UI Gothic", script 16
19:41:16.300:   OpenType support missing for "Gulim", script 16
19:41:16.300:   OpenType support missing for "SimSun", script 16
19:41:16.301:   OpenType support missing for "PMingLiU", script 16
19:41:16.301:   OpenType support missing for "Segoe UI Emoji", script 16
19:41:16.302:   OpenType support missing for "Segoe UI Symbol", script 16
19:41:16.424:   OpenType support missing for "Open Sans", script 20
19:41:16.424:   OpenType support missing for "Arial", script 20
19:41:16.425:   OpenType support missing for "Tahoma", script 20
19:41:16.425:   OpenType support missing for "MS UI Gothic", script 20
19:42:32.100: Last log entry repeated for 5 more lines
19:42:32.100: ==== Shutting down ==================================================
19:42:32.135: WASAPI: Device 'test-audio-0 (VB-Audio Virtual Cable)' Terminated