PYTHONPATHを設定するとOBSが起動しなくなる問題の一時回避策

目的

今日(2023/10/29)の23時くらいに,急にOBS(正確にはOBS 29.1.3)が起動しなくなってしまった.起動しなくなった度合いは,1秒程度マウスが読み込み中になる,かつタスクマネージャに1秒程度表示されたのちに消える状態.Googleで検索して見つけた

  • Windowsの再起動
  • Windowsのシャットダウン→電源断(ACケーブルを抜く)→Windowsの再起動
  • 再インストール
  • アンインストール→再インストール

のいずれでも解決しなかったが,あることが問題で解決できた(根本対策はできていない)ので備忘録として残しておく.

☞何か解決策をお持ちの方,いらっしゃいましたらコメントお願いします!

名称 規格 製造会社 備考
オペレーティングシステム Windows 10 Pro 64ビット,バージョン22H2 マイクロソフト インターナショナル版
グラフィックボード AMD Radeon RX 6650 XT AMD
配信ソフト OBS Studio 29.1.3 OBSプロジェクト 2023/10/29時点最新版
統合開発環境 e2studio 2023-07 (23.7.0) ルネサスエレクトロニクス 2023/10/29時点最新版
Python2 Python 2.7.12 --- (e2studio 2023-07にバンドル)

結論

環境変数PYTHONPATHを新規に追加して設定したことが原因で,起動しなくなっていた:

PYTHONPATHの設定

この環境変数PYTHONPATHを削除すると,問題なくOBSが起動できた.

詳細

ふだんOBSは,管理者権限で起動しているため,権限の設定ではないことは明確だった.OBSの動作ログは%APPDATA%\obs-studio\logsYYY-MM-DD HH-MM-SS.txtのファイル名書式のテキストファイルで格納されている.

それぞれ起動に失敗していたログおよび正常に起動するようになったときのログを以下に示す(一番左のコロン区切りの数字は,コンピューターの時刻を表す)が,明示的な差分がなかった(2023/10/30追記).確かにFailedが複数存在するが,起動成功時(後述)との違いはパッと見わからない.

起動失敗ログ

23:20:32.964: CPU Name: AMD Ryzen 7 3700X 8-Core Processor             
23:20:32.964: CPU Speed: 3593MHz
23:20:32.964: Physical Cores: 8, Logical Cores: 16
23:20:32.964: Physical Memory: 32694MB Total, 25618MB Free
23:20:32.964: Windows Version: 10.0 Build 19045 (release: 22H2; revision: 3570; 64-bit)
23:20:32.964: Running as administrator: true
23:20:32.964: Windows 10/11 Gaming Features:
23:20:32.964:   Game Bar: Off
23:20:32.964:   Game DVR: Off
23:20:32.964:   Game DVR Background Recording: Off
23:20:32.964:   Game Mode: Probably On (no reg key set)
23:20:32.966: Sec. Software Status:
23:20:32.967:   Microsoft Defender Antivirus: disabled (AV)
23:20:32.967:   ウイルスバスター クラウド: enabled (AV)
23:20:32.967:   Windows Firewall: enabled (FW)
23:20:32.967: Current Date/Time: 2023-10-29, 23:20:32
23:20:32.967: Browser Hardware Acceleration: true
23:20:32.967: Hide OBS windows from screen capture: false
23:20:32.967: Qt Version: 6.4.3 (runtime), 6.4.3 (compiled)
23:20:32.967: Portable mode: false
23:20:33.804: OBS 29.1.3 (64-bit, windows)
23:20:33.804: ---------------------------------
23:20:33.805: ---------------------------------
23:20:33.805: audio settings reset:
23:20:33.805:   samples per sec: 48000
23:20:33.805:   speakers:        2
23:20:33.805:   max buffering:   960 milliseconds
23:20:33.805:   buffering type:  dynamically increasing
23:20:33.806: ---------------------------------
23:20:33.806: Initializing D3D11...
23:20:33.806: Available Video Adapters: 
23:20:33.808:   Adapter 0: AMD Radeon RX 6650 XT
23:20:33.808:     Dedicated VRAM: 8541921280
23:20:33.808:     Shared VRAM:    17141098496
23:20:33.808:     PCI ID:         1002:73ef
23:20:33.809:     Driver Version: 31.0.22017.3004
23:20:33.811:     output 0:
23:20:33.811:       name=EV2450
23:20:33.811:       pos={0, 0}
23:20:33.811:       size={1920, 1080}
23:20:33.811:       attached=true
23:20:33.811:       refresh=60
23:20:33.811:       bits_per_color=8
23:20:33.811:       space=RGB_FULL_G22_NONE_P709
23:20:33.811:       sdr_white_nits=80
23:20:33.811:       nit_range=[min=0.500000, max=270.000000, max_full_frame=270.000000]
23:20:33.811:       dpi=96 (100%)
23:20:33.811:       id=\\?\DISPLAY#ENC2530#7&120d150d&1&UID256#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
23:20:33.811:       alt_id=\\.\DISPLAY1
23:20:33.813:     output 1:
23:20:33.813:       name=EV2450
23:20:33.813:       pos={1920, 0}
23:20:33.813:       size={1920, 1080}
23:20:33.813:       attached=true
23:20:33.813:       refresh=60
23:20:33.813:       bits_per_color=8
23:20:33.813:       space=RGB_FULL_G22_NONE_P709
23:20:33.813:       sdr_white_nits=80
23:20:33.813:       nit_range=[min=0.500000, max=270.000000, max_full_frame=270.000000]
23:20:33.813:       dpi=96 (100%)
23:20:33.813:       id=\\?\DISPLAY#ENC2530#7&120d150d&1&UID260#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
23:20:33.813:       alt_id=\\.\DISPLAY2
23:20:33.814:     output 2:
23:20:33.814:       name=K3818U
23:20:33.814:       pos={0, 1080}
23:20:33.814:       size={3840, 1100}
23:20:33.814:       attached=true
23:20:33.814:       refresh=60
23:20:33.814:       bits_per_color=10
23:20:33.814:       space=RGB_FULL_G2084_NONE_P2020
23:20:33.814:       sdr_white_nits=240
23:20:33.814:       nit_range=[min=0.000000, max=400.000000, max_full_frame=282.000000]
23:20:33.814:       dpi=96 (100%)
23:20:33.814:       id=\\?\DISPLAY#QJF3750#7&120d150d&1&UID268#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
23:20:33.814:       alt_id=\\.\DISPLAY3
23:20:33.831: Loading up D3D11 on adapter AMD Radeon RX 6650 XT (0)
23:20:33.892: D3D11 loaded successfully, feature level used: b000
23:20:33.892: DXGI increase maximum frame latency success
23:20:33.892: D3D11 GPU priority setup success
23:20:35.259: ---------------------------------
23:20:35.259: video settings reset:
23:20:35.259:   base resolution:   1920x1080
23:20:35.259:   output resolution: 1920x1080
23:20:35.259:   downscale filter:  Lanczos
23:20:35.259:   fps:               60/1
23:20:35.259:   format:            NV12
23:20:35.259:   YUV mode:          Rec. 709/Partial
23:20:35.259: NV12 texture support enabled
23:20:35.259: P010 texture support not available
23:20:35.260: Audio monitoring device:
23:20:35.260:   name: Speakers (Realtek(R) Audio)
23:20:35.260:   id: {0.0.0.00000000}.{bf2e86d4-01b9-438e-b832-6e8088daaf62}
23:20:35.260: ---------------------------------
23:20:35.263: Failed to load 'en-GB' text for module: 'aja-output-ui.dll'
23:20:35.264: No AJA devices found, skipping loading AJA UI plugin
23:20:35.264: Failed to initialize module 'aja-output-ui.dll'
23:20:35.265: Failed to load 'en-GB' text for module: 'aja.dll'
23:20:35.266: No AJA devices found, skipping loading AJA plugin
23:20:35.266: Failed to initialize module 'aja.dll'
23:20:35.266: Skipping module '../../obs-plugins/64bit/chrome_elf.dll', not an OBS plugin
23:20:35.267: Failed to load 'en-GB' text for module: 'coreaudio-encoder.dll'
23:20:35.298: [CoreAudio encoder]: Adding CoreAudio AAC encoder
23:20:35.299: Failed to load 'en-US' text for module: 'decklink-captions.dll'
23:20:35.300: Failed to load 'en-US' text for module: 'decklink-output-ui.dll'
23:20:35.303: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
23:20:35.303: Failed to initialize module 'decklink.dll'
23:20:35.503: [AMF] Version 2.8.0 loaded (Compiled: 1.4.14.0, Runtime: 1.4.31.0, Library: 1;4;31;0;23.20.11.01;202309112318;AMD-Radeon-Driver/drivers:5e3e684246a316aa078d698f83c84101f5bce7eb).
23:20:35.559: [AMF] <Id: 1> Unable to set converter transfer characteristic, error AMF_NOT_FOUND (code 11)
23:20:35.616: [AMF] <Id: 2> Unable to set converter transfer characteristic, error AMF_NOT_FOUND (code 11)
23:20:35.617: [AMF] [Capability Manager] Testing Direct3D 11 Adapter 'AMD Radeon RX 6650 XT (VEN_1002/DEV_73ef/SUB_452e1da2/REV_00c1)':
23:20:35.617:   H264/AVC: Supported
23:20:35.617:   H265/HEVC: Supported
23:20:35.617: 
23:20:35.620: Failed to load 'en-GB' text for module: 'frontend-tools.dll'

起動成功ログ

起動成功時は具体的にStartup completeが表示される

23:24:06.913: CPU Name: AMD Ryzen 7 3700X 8-Core Processor             
23:24:06.913: CPU Speed: 3593MHz
23:24:06.913: Physical Cores: 8, Logical Cores: 16
23:24:06.913: Physical Memory: 32694MB Total, 25603MB Free
23:24:06.913: Windows Version: 10.0 Build 19045 (release: 22H2; revision: 3570; 64-bit)
23:24:06.913: Running as administrator: true
23:24:06.913: Windows 10/11 Gaming Features:
23:24:06.913:   Game Bar: Off
23:24:06.913:   Game DVR: Off
23:24:06.913:   Game DVR Background Recording: Off
23:24:06.913:   Game Mode: Probably On (no reg key set)
23:24:06.914: Sec. Software Status:
23:24:06.916:   Microsoft Defender Antivirus: disabled (AV)
23:24:06.916:   ウイルスバスター クラウド: enabled (AV)
23:24:06.916:   Windows Firewall: enabled (FW)
23:24:06.916: Current Date/Time: 2023-10-29, 23:24:06
23:24:06.916: Browser Hardware Acceleration: true
23:24:06.916: Hide OBS windows from screen capture: false
23:24:06.916: Qt Version: 6.4.3 (runtime), 6.4.3 (compiled)
23:24:06.916: Portable mode: false
23:24:07.749: OBS 29.1.3 (64-bit, windows)
23:24:07.749: ---------------------------------
23:24:07.750: ---------------------------------
23:24:07.750: audio settings reset:
23:24:07.750:   samples per sec: 48000
23:24:07.750:   speakers:        2
23:24:07.750:   max buffering:   960 milliseconds
23:24:07.750:   buffering type:  dynamically increasing
23:24:07.751: ---------------------------------
23:24:07.751: Initializing D3D11...
23:24:07.751: Available Video Adapters: 
23:24:07.753:   Adapter 0: AMD Radeon RX 6650 XT
23:24:07.753:     Dedicated VRAM: 8541921280
23:24:07.753:     Shared VRAM:    17141098496
23:24:07.753:     PCI ID:         1002:73ef
23:24:07.754:     Driver Version: 31.0.22017.3004
23:24:07.755:     output 0:
23:24:07.755:       name=EV2450
23:24:07.755:       pos={0, 0}
23:24:07.755:       size={1920, 1080}
23:24:07.755:       attached=true
23:24:07.755:       refresh=60
23:24:07.755:       bits_per_color=8
23:24:07.755:       space=RGB_FULL_G22_NONE_P709
23:24:07.755:       sdr_white_nits=80
23:24:07.755:       nit_range=[min=0.500000, max=270.000000, max_full_frame=270.000000]
23:24:07.755:       dpi=96 (100%)
23:24:07.755:       id=\\?\DISPLAY#ENC2530#7&120d150d&1&UID256#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
23:24:07.755:       alt_id=\\.\DISPLAY1
23:24:07.757:     output 1:
23:24:07.757:       name=EV2450
23:24:07.757:       pos={1920, 0}
23:24:07.757:       size={1920, 1080}
23:24:07.757:       attached=true
23:24:07.757:       refresh=60
23:24:07.757:       bits_per_color=8
23:24:07.757:       space=RGB_FULL_G22_NONE_P709
23:24:07.757:       sdr_white_nits=80
23:24:07.757:       nit_range=[min=0.500000, max=270.000000, max_full_frame=270.000000]
23:24:07.757:       dpi=96 (100%)
23:24:07.757:       id=\\?\DISPLAY#ENC2530#7&120d150d&1&UID260#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
23:24:07.757:       alt_id=\\.\DISPLAY2
23:24:07.759:     output 2:
23:24:07.759:       name=K3818U
23:24:07.759:       pos={0, 1080}
23:24:07.759:       size={3840, 1100}
23:24:07.759:       attached=true
23:24:07.759:       refresh=60
23:24:07.759:       bits_per_color=10
23:24:07.759:       space=RGB_FULL_G2084_NONE_P2020
23:24:07.759:       sdr_white_nits=240
23:24:07.759:       nit_range=[min=0.000000, max=400.000000, max_full_frame=282.000000]
23:24:07.759:       dpi=96 (100%)
23:24:07.759:       id=\\?\DISPLAY#QJF3750#7&120d150d&1&UID268#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
23:24:07.759:       alt_id=\\.\DISPLAY3
23:24:07.762: Loading up D3D11 on adapter AMD Radeon RX 6650 XT (0)
23:24:07.823: D3D11 loaded successfully, feature level used: b000
23:24:07.823: DXGI increase maximum frame latency success
23:24:07.823: D3D11 GPU priority setup success
23:24:09.186: ---------------------------------
23:24:09.186: video settings reset:
23:24:09.186:   base resolution:   1920x1080
23:24:09.186:   output resolution: 1920x1080
23:24:09.186:   downscale filter:  Lanczos
23:24:09.186:   fps:               60/1
23:24:09.186:   format:            NV12
23:24:09.186:   YUV mode:          Rec. 709/Partial
23:24:09.186: NV12 texture support enabled
23:24:09.186: P010 texture support not available
23:24:09.187: Audio monitoring device:
23:24:09.187:   name: Speakers (Realtek(R) Audio)
23:24:09.187:   id: {0.0.0.00000000}.{bf2e86d4-01b9-438e-b832-6e8088daaf62}
23:24:09.187: ---------------------------------
23:24:09.189: Failed to load 'en-GB' text for module: 'aja-output-ui.dll'
23:24:09.191: No AJA devices found, skipping loading AJA UI plugin
23:24:09.191: Failed to initialize module 'aja-output-ui.dll'
23:24:09.192: Failed to load 'en-GB' text for module: 'aja.dll'
23:24:09.192: No AJA devices found, skipping loading AJA plugin
23:24:09.192: Failed to initialize module 'aja.dll'
23:24:09.193: Skipping module '../../obs-plugins/64bit/chrome_elf.dll', not an OBS plugin
23:24:09.194: Failed to load 'en-GB' text for module: 'coreaudio-encoder.dll'
23:24:09.203: [CoreAudio encoder]: Adding CoreAudio AAC encoder
23:24:09.204: Failed to load 'en-US' text for module: 'decklink-captions.dll'
23:24:09.205: Failed to load 'en-US' text for module: 'decklink-output-ui.dll'
23:24:09.208: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
23:24:09.208: Failed to initialize module 'decklink.dll'
23:24:09.402: [AMF] Version 2.8.0 loaded (Compiled: 1.4.14.0, Runtime: 1.4.31.0, Library: 1;4;31;0;23.20.11.01;202309112318;AMD-Radeon-Driver/drivers:5e3e684246a316aa078d698f83c84101f5bce7eb).
23:24:09.455: [AMF] <Id: 1> Unable to set converter transfer characteristic, error AMF_NOT_FOUND (code 11)
23:24:09.510: [AMF] <Id: 2> Unable to set converter transfer characteristic, error AMF_NOT_FOUND (code 11)
23:24:09.511: [AMF] [Capability Manager] Testing Direct3D 11 Adapter 'AMD Radeon RX 6650 XT (VEN_1002/DEV_73ef/SUB_452e1da2/REV_00c1)':
23:24:09.511:   H264/AVC: Supported
23:24:09.511:   H265/HEVC: Supported
23:24:09.511: 
23:24:09.514: Failed to load 'en-GB' text for module: 'frontend-tools.dll'
23:24:09.542: Skipping module '../../obs-plugins/64bit/libcef.dll', not an OBS plugin
23:24:09.542: Skipping module '../../obs-plugins/64bit/libEGL.dll', not an OBS plugin
23:24:09.542: Skipping module '../../obs-plugins/64bit/libGLESv2.dll', not an OBS plugin
23:24:09.558: [obs-browser]: Version 2.21.1
23:24:09.558: [obs-browser]: CEF Version 103.0.5060.134 (runtime), 103.0.0-5060-shared-textures.2591+g4204d54+chromium-103.0.5060.134 (compiled)
23:24:09.664: [noise suppress]: NVIDIA denoiser disabled, redistributable not found or could not be loaded.
23:24:09.664: Failed to get NVVideoEffects.dll version info size
23:24:09.666: [NVIDIA VIDEO FX]: FX disabled, redistributable not found or could not be loaded.
23:24:09.670: Failed to load 'en-GB' text for module: 'obs-qsv11.dll'
23:24:09.710: Failed to load 'en-GB' text for module: 'obs-vst.dll'
23:24:09.712: Failed to load 'en-GB' text for module: 'obs-websocket.dll'
23:24:09.712: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.2.3 | RPC Version: 1)
23:24:09.712: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.4.3 | Qt version (run-time): 6.4.3
23:24:09.712: [obs-websocket] [obs_module_load] Linked ASIO Version: 101201
23:24:09.719: [obs-websocket] [obs_module_load] Module loaded.
23:24:09.722: Failed to load 'en-GB' text for module: 'rtmp-services.dll'
23:24:09.728: [vlc-video]: VLC 3.0.16 Vetinari found, VLC video source enabled
23:24:09.739: Failed to load 'en-GB' text for module: 'win-wasapi.dll'
23:24:09.739: ---------------------------------
23:24:09.739:   Loaded Modules:
23:24:09.739:     win-wasapi.dll
23:24:09.739:     win-dshow.dll
23:24:09.739:     win-capture.dll
23:24:09.739:     vlc-video.dll
23:24:09.739:     text-freetype2.dll
23:24:09.739:     rtmp-services.dll
23:24:09.739:     obs-x264.dll
23:24:09.739:     obs-websocket.dll
23:24:09.739:     obs-vst.dll
23:24:09.739:     obs-transitions.dll
23:24:09.739:     obs-text.dll
23:24:09.739:     obs-qsv11.dll
23:24:09.739:     obs-outputs.dll
23:24:09.739:     obs-filters.dll
23:24:09.739:     obs-ffmpeg.dll
23:24:09.739:     obs-browser.dll
23:24:09.739:     image-source.dll
23:24:09.739:     frontend-tools.dll
23:24:09.739:     enc-amf.dll
23:24:09.739:     decklink-output-ui.dll
23:24:09.739:     decklink-captions.dll
23:24:09.739:     coreaudio-encoder.dll
23:24:09.739: ---------------------------------
23:24:09.740: ==== Startup complete ===============================================

その他

環境変数PYTHONPATH設定の経緯は,Renesas Extensions for Visual Studio Codeの設定のひとつに存在したから.CMakeやMinGWを疑ったが,この環境変数だった.この設定手順ではPython2.7を具体的にインストールする指示だが,今回はe2studioにバンドルされているものを使用していたため,正しくPython2.7をインストールしてPYTHONPATHを設定した場合は,この問題に陥らないかもしれない.

改訂履歴

# 日付 内容
1 2023/10/30 動作ログを具体的に追記