summershrimp / obs-ssp

Simple Stream Protocol source to OBS
GNU General Public License v2.0
32 stars 10 forks source link

Plugin not loading on OBS source build (29.1.0-beta3-5...) #76

Closed robolivable closed 1 year ago

robolivable commented 1 year ago

Having trouble getting this plugin to load in my OBS build (OBS 29.1.0-beta3-5-g1b708b312-modified (64-bit, windows)):

02:12:42.913: LoadLibrary failed for '../../obs-plugins/64bit/obs-ssp.dll': The specified module could not be found.
02:12:42.913:  (126)
02:12:42.913: Module '../../obs-plugins/64bit/obs-ssp.dll' not loaded

I've tried this workaround with no success.

Is there a way to get a more descriptive log for this?

Thanks.

summershrimp commented 1 year ago

please use the latest version if it still not working, it may caused by dependencies changes on obs 29.1beta. I would migrate plugin after the GA release.

Robert Oliveira @.***> 于 2023年5月6日周六 14:34写道:

Having trouble getting this plugin to load in my OBS build (OBS 29.1.0-beta3-5-g1b708b312-modified (64-bit, windows)):

02:12:42.913: LoadLibrary failed for '../../obs-plugins/64bit/obs-ssp.dll': The specified module could not be found. 02:12:42.913: (126) 02:12:42.913: Module '../../obs-plugins/64bit/obs-ssp.dll' not loaded

I've tried this workaround https://github.com/summershrimp/obs-ssp/issues/60#issuecomment-1049451646 with no success.

Is there a way to get a more descriptive log for this?

Thanks.

— Reply to this email directly, view it on GitHub https://github.com/summershrimp/obs-ssp/issues/76, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOKG7WDY24XUUEQOIJQQXLXEXWJHANCNFSM6AAAAAAXX5CE2A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

robolivable commented 1 year ago

Thanks for your fast response.

Just for the record, I'm currently trying the latest release version 0.11.0.

summershrimp commented 1 year ago

Oh you build your own obs? Maybe you should build obs-ssp with the same dependencies you built your obs.

Robert Oliveira @.***> 于 2023年5月6日周六 14:44写道:

Thanks for your fast response.

Just for the record, I'm currently trying the latest release version 0.11.0 https://github.com/summershrimp/obs-ssp/releases/tag/0.11.0.

— Reply to this email directly, view it on GitHub https://github.com/summershrimp/obs-ssp/issues/76#issuecomment-1537068929, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOKG7WOMJTJUOD5E42KHX3XEXXM5ANCNFSM6AAAAAAXX5CE2A . You are receiving this because you commented.Message ID: @.***>

robolivable commented 1 year ago

Thanks for your advice @summershrimp.

I'm trying to go ahead with building obs-ssp from source, but for some reason I'm running into CMake issues related to missing FFmpeg libraries/includes. My understanding is that these dependencies should be bundled with my OBS build (of which they seem to be), yet the build cannot find them.

It also occurred to me that I'm technically trying to build obs-ssp as a standalone solution, which I'm only assuming is the preferred approach. I've also tried building it "bundled" by placing it inside my OBS frontend-plugins path but that doesn't seem to help either (getting errors finding libobs).

Is there a preferred way to build this project that I may be missing?

Thanks again for your help with this, I don't have much experience around OBS plugin development so your advice has been super helpful/valuable.

robolivable commented 1 year ago

For the record, this is the error I'm stuck on:

CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find FFmpeg (missing: FFMPEG_AVCODEC_LIBRARIES
  FFMPEG_AVCODEC_INCLUDE_DIRS avcodec avutil)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindFFmpeg.cmake:168 (find_package_handle_standard_args)
  CMakeLists.txt:67 (find_package)
robolivable commented 1 year ago

Quick update: figured out the issue, I was simply missing the CMAKE_PREFIX_PATH build flag 😆

robolivable commented 1 year ago

Last update: was able to get a build of the plugin working locally against my version of OBS.

One note for anyone else who may face it, FFmpeg 6 pushed an update that deprecated some flags used by this project causing the following compiler errors:

Error (active)    E0020    identifier "CODEC_CAP_TRUNC" is undefined    obs-ssp    <relative_project_path>\obs-ssp\src\ffmpeg-decode.c    129    
Error (active)    E0020    identifier "CODEC_FLAG_TRUNC" is undefined    obs-ssp    <relative_project_path>\obs-ssp\src\ffmpeg-decode.c    130    

The fix I applied was similar to the changes in that issue PR, basically wrap the deprecated flags in a FFmpeg version check:

#if LIBAVCODEC_VERSION_MAJOR < 60
if (decode->codec->capabilities & CODEC_CAP_TRUNC)
    decode->decoder->flags |= CODEC_FLAG_TRUNC;
#endif

Thanks again.