sorayuki / obs-multi-rtmp

OBS複数サイト同時配信プラグイン
https://sorayuki.github.io/obs-multi-rtmp/
GNU General Public License v2.0
3.6k stars 495 forks source link

Plugin fails to load on OBS 30.2 Flatpak #436

Open Dekomoro opened 4 months ago

Dekomoro commented 4 months ago

The error I get is error: os_dlopen(/home/deko/.var/app/com.obsproject.Studio/config/obs-studio/plugins/obs-multi-rtmp/bin/64bit/obs-multi-rtmp.so->/home/deko/.var/app/com.obsproject.Studio/config/obs-studio/plugins/obs-multi-rtmp/bin/64bit/obs-multi-rtmp.so): libobs-frontend-api.so.0: cannot open shared object file: No such file or directory

Seemingly related to the new frontend code, or qt version. Consider possibly releasing the plugin on flathub like a few other plugins do(A good example of someone doing this is https://github.com/flathub/com.obsproject.Studio.Plugin.waveform) or figuring out a way to compile with matching qt versions to the flatpak.

pepesan commented 4 months ago

It seams that the main problem is that the flatpak obs studio 30.2.x versions does not allow to load plugins installed manually into the .var/app/com.obsproject.Studio/config/obs-studio/plugins folder.

Reference: https://github.com/obsproject/obs-studio/issues/10981#issuecomment-2227001650

My failure is similar to the @Dekomoro log wit my Ubuntu 24.04.

I've tried to compile the last version in Ubuntu 24.04 without success.

   =>   Configuring obs-multi-rtmp...
Preset CMake variables:

  CMAKE_CXX_STANDARD="20"
  CMAKE_CXX_STANDARD_REQUIRED:BOOL="TRUE"
  ENABLE_FRONTEND_API:BOOL="TRUE"
  ENABLE_QT:BOOL="TRUE"

-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64
   =>   Building obs-multi-rtmp...
[1/5] Building CXX object CMakeFiles/obs-multi-rtmp.dir/src/obs-multi-rtmp.cpp.o
FAILED: CMakeFiles/obs-multi-rtmp.dir/src/obs-multi-rtmp.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DHAVE_OBSCONFIG_H -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DSIMDE_ENABLE_OPENMP -Dobs_multi_rtmp_EXPORTS -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64 -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64/obs-multi-rtmp_autogen/include -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/./dep/nlohmann-json -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/.deps/obs-studio-30.0.0/libobs -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src -isystem /home/pepesan/grive/obs-plugins/obs-build-dependencies/plugin-deps-2022-11-21-qt6-x86_64/include/obs -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt6/QtGui -O2 -g -DNDEBUG -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -fopenmp-simd -fno-strict-aliasing -Wdeprecated-declarations -Wempty-body -Wenum-conversion -Werror=return-type -Wextra -Wformat -Wformat-security -Wno-conversion -Wno-float-conversion -Wno-implicit-fallthrough -Wno-missing-braces -Wno-missing-field-initializers -Wno-shadow -Wno-sign-conversion -Wno-trigraphs -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-label -Wparentheses -Wshadow -Wuninitialized -Wunreachable-code -Wunused-parameter -Wunused-value -Wunused-variable -Wvla -Wconversion -Wfloat-conversion -Winvalid-offsetof -Wno-overloaded-virtual -Wno-error=maybe-uninitialized -Winfinite-recursion -mmmx -msse -msse2 -fPIC -Werror -MD -MT CMakeFiles/obs-multi-rtmp.dir/src/obs-multi-rtmp.cpp.o -MF CMakeFiles/obs-multi-rtmp.dir/src/obs-multi-rtmp.cpp.o.d -o CMakeFiles/obs-multi-rtmp.dir/src/obs-multi-rtmp.cpp.o -c /home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp: In function ‘bool obs_module_load()’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp:273:10: error: ‘obs_frontend_add_dock_by_id’ was not declared in this scope; did you mean ‘obs_frontend_add_dock’?
  273 |     if (!obs_frontend_add_dock_by_id("obs-multi-rtmp-dock", obs_module_text("Title"), dock))
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |          obs_frontend_add_dock
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp: In lambda function:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp:283:18: error: declaration of ‘dock’ shadows a previous local [-Werror=shadow]
  283 |             auto dock = static_cast<MultiOutputWidget*>(private_data);
      |                  ^~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp:271:10: note: shadowed declaration is here
  271 |     auto dock = new MultiOutputWidget();
      |          ^~~~
cc1plus: all warnings being treated as errors
[2/5] Building CXX object CMakeFiles/obs-multi-rtmp.dir/src/push-widget.cpp.o
FAILED: CMakeFiles/obs-multi-rtmp.dir/src/push-widget.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DHAVE_OBSCONFIG_H -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DSIMDE_ENABLE_OPENMP -Dobs_multi_rtmp_EXPORTS -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64 -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64/obs-multi-rtmp_autogen/include -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/./dep/nlohmann-json -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/.deps/obs-studio-30.0.0/libobs -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src -isystem /home/pepesan/grive/obs-plugins/obs-build-dependencies/plugin-deps-2022-11-21-qt6-x86_64/include/obs -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt6/QtGui -O2 -g -DNDEBUG -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -fopenmp-simd -fno-strict-aliasing -Wdeprecated-declarations -Wempty-body -Wenum-conversion -Werror=return-type -Wextra -Wformat -Wformat-security -Wno-conversion -Wno-float-conversion -Wno-implicit-fallthrough -Wno-missing-braces -Wno-missing-field-initializers -Wno-shadow -Wno-sign-conversion -Wno-trigraphs -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-label -Wparentheses -Wshadow -Wuninitialized -Wunreachable-code -Wunused-parameter -Wunused-value -Wunused-variable -Wvla -Wconversion -Wfloat-conversion -Winvalid-offsetof -Wno-overloaded-virtual -Wno-error=maybe-uninitialized -Winfinite-recursion -mmmx -msse -msse2 -fPIC -Werror -MD -MT CMakeFiles/obs-multi-rtmp.dir/src/push-widget.cpp.o -MF CMakeFiles/obs-multi-rtmp.dir/src/push-widget.cpp.o.d -o CMakeFiles/obs-multi-rtmp.dir/src/push-widget.cpp.o -c /home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp: In static member function ‘static void IOBSOutputEventHanlder::OnOutputStopped(void*, calldata_t*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:39:37: error: conversion from ‘long long int’ to ‘int’ may change value [-Werror=conversion]
   39 |         thiz->OnStopped(calldata_int(param, "code"));
      |                         ~~~~~~~~~~~~^~~~~~~~~~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp: In member function ‘bool PushWidgetImpl::PrepareOutputEncoders()’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:283:33: error: ‘obs_encoder_set_gpu_scale_type’ was not declared in this scope; did you mean ‘obs_encoder_set_scaled_size’?
  283 |                                 obs_encoder_set_gpu_scale_type(venc, obs_scale_type::OBS_SCALE_BICUBIC);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 obs_encoder_set_scaled_size
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:287:25: error: ‘obs_encoder_set_frame_rate_divisor’ was not declared in this scope; did you mean ‘obs_encoder_get_frame_size’?
  287 |                         obs_encoder_set_frame_rate_divisor(venc, videoConfig->fpsDenumerator);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         obs_encoder_get_frame_size
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp: In member function ‘void PushWidgetImpl::UpdateStreamStatus()’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:438:79: error: conversion from ‘uint64_t’ {aka ‘long unsigned int’} to ‘double’ may change value [-Werror=conversion]
  438 |             sprintf(strFps, "%d FPS", static_cast<int>(std::round((new_frames - total_frames_) / interval)));
      |                                                                   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:440:51: error: conversion from ‘long unsigned int’ to ‘double’ may change value [-Werror=conversion]
  440 |             auto bps = (new_bytes - total_bytes_) * 8 / interval;
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp: In lambda function:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:507:27: error: declaration of ‘global’ shadows a previous local [-Werror=shadow]
  507 |                     auto& global = GlobalMultiOutputConfig();
      |                           ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:474:15: note: shadowed declaration is here
  474 |         auto& global = GlobalMultiOutputConfig();
      |               ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp: In member function ‘virtual void PushWidgetImpl::StartStreaming()’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:564:46: error: conversion from ‘int64_t’ {aka ‘long int’} to ‘int’ may change value [-Werror=conversion]
  564 |                 int delaySec = config_get_int(profileConfig, "Output", "DelaySec");
      |                                ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
[3/5] Building CXX object CMakeFiles/obs-multi-rtmp.dir/src/obs-properties-widget.cpp.o
FAILED: CMakeFiles/obs-multi-rtmp.dir/src/obs-properties-widget.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DHAVE_OBSCONFIG_H -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DSIMDE_ENABLE_OPENMP -Dobs_multi_rtmp_EXPORTS -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64 -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64/obs-multi-rtmp_autogen/include -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/./dep/nlohmann-json -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/.deps/obs-studio-30.0.0/libobs -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src -isystem /home/pepesan/grive/obs-plugins/obs-build-dependencies/plugin-deps-2022-11-21-qt6-x86_64/include/obs -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt6/QtGui -O2 -g -DNDEBUG -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -fopenmp-simd -fno-strict-aliasing -Wdeprecated-declarations -Wempty-body -Wenum-conversion -Werror=return-type -Wextra -Wformat -Wformat-security -Wno-conversion -Wno-float-conversion -Wno-implicit-fallthrough -Wno-missing-braces -Wno-missing-field-initializers -Wno-shadow -Wno-sign-conversion -Wno-trigraphs -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-label -Wparentheses -Wshadow -Wuninitialized -Wunreachable-code -Wunused-parameter -Wunused-value -Wunused-variable -Wvla -Wconversion -Wfloat-conversion -Winvalid-offsetof -Wno-overloaded-virtual -Wno-error=maybe-uninitialized -Winfinite-recursion -mmmx -msse -msse2 -fPIC -Werror -MD -MT CMakeFiles/obs-multi-rtmp.dir/src/obs-properties-widget.cpp.o -MF CMakeFiles/obs-multi-rtmp.dir/src/obs-properties-widget.cpp.o.d -o CMakeFiles/obs-multi-rtmp.dir/src/obs-properties-widget.cpp.o -c /home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp: In constructor ‘{anonymous}::QLineEditWithFocus::QLineEditWithFocus({anonymous}::UpdateHandler*, QWidget*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:30:43: error: declaration of ‘updater’ shadows a member of ‘{anonymous}::QLineEditWithFocus’ [-Werror=shadow]
   30 |         QLineEditWithFocus(UpdateHandler* updater, QWidget* parent)
      |                            ~~~~~~~~~~~~~~~^~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:27:24: note: shadowed declaration is here
   27 |         UpdateHandler* updater;
      |                        ^~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp: In constructor ‘{anonymous}::PropertyWidget::PropertyWidget(QWidget*, {anonymous}::UpdateHandler*, obs_property*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:83:56: error: declaration of ‘updater’ shadows a member of ‘{anonymous}::PropertyWidget’ [-Werror=shadow]
   83 |         PropertyWidget(QWidget* parent, UpdateHandler* updater, obs_property* p) {
      |                                         ~~~~~~~~~~~~~~~^~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:75:24: note: shadowed declaration is here
   75 |         UpdateHandler* updater;
      |                        ^~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp: In constructor ‘{anonymous}::PropertyWidget::PropertyWidget(QWidget*, {anonymous}::UpdateHandler*, obs_property*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:83:56: error: declaration of ‘updater’ shadows a member of ‘{anonymous}::PropertyWidget’ [-Werror=shadow]
   83 |         PropertyWidget(QWidget* parent, UpdateHandler* updater, obs_property* p) {
      |                                         ~~~~~~~~~~~~~~~^~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:75:24: note: shadowed declaration is here
   75 |         UpdateHandler* updater;
      |                        ^~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp: In constructor ‘{anonymous}::PropertyWidget::PropertyWidget(QWidget*, {anonymous}::UpdateHandler*, obs_property*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:83:56: error: declaration of ‘updater’ shadows a member of ‘{anonymous}::PropertyWidget’ [-Werror=shadow]
   83 |         PropertyWidget(QWidget* parent, UpdateHandler* updater, obs_property* p) {
      |                                         ~~~~~~~~~~~~~~~^~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:75:24: note: shadowed declaration is here
   75 |         UpdateHandler* updater;
      |                        ^~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp: In member function ‘void {anonymous}::PropertyWidget::ReloadProperty(obs_property*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:161:43: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
  161 |                         for(auto i = 0; i < cnt; ++i) {
      |                                         ~~^~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp: In member function ‘void {anonymous}::PropertyWidget::SaveData(obs_data*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:243:67: error: conversion from ‘double’ to ‘long long int’ may change value [-Werror=float-conversion]
  243 |                     obs_data_set_int(data, name.c_str(), std::stod(val));
      |                                                          ~~~~~~~~~^~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp: In constructor ‘{anonymous}::QPropertiesWidgetImpl::QPropertiesWidgetImpl(obs_properties*, obs_data*, QWidget*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:279:47: error: declaration of ‘props’ shadows a member of ‘{anonymous}::QPropertiesWidgetImpl’ [-Werror=shadow]
  279 |         QPropertiesWidgetImpl(obs_properties* props, obs_data* p_settings, QWidget* parent)
      |                               ~~~~~~~~~~~~~~~~^~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:274:25: note: shadowed declaration is here
  274 |         obs_properties* props;
      |                         ^~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp: In constructor ‘{anonymous}::QPropertiesWidgetImpl::QPropertiesWidgetImpl(obs_properties*, obs_data*, QWidget*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:279:47: error: declaration of ‘props’ shadows a member of ‘{anonymous}::QPropertiesWidgetImpl’ [-Werror=shadow]
  279 |         QPropertiesWidgetImpl(obs_properties* props, obs_data* p_settings, QWidget* parent)
      |                               ~~~~~~~~~~~~~~~~^~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:274:25: note: shadowed declaration is here
  274 |         obs_properties* props;
      |                         ^~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp: In constructor ‘{anonymous}::QPropertiesWidgetImpl::QPropertiesWidgetImpl(obs_properties*, obs_data*, QWidget*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:279:47: error: declaration of ‘props’ shadows a member of ‘{anonymous}::QPropertiesWidgetImpl’ [-Werror=shadow]
  279 |         QPropertiesWidgetImpl(obs_properties* props, obs_data* p_settings, QWidget* parent)
      |                               ~~~~~~~~~~~~~~~~^~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-properties-widget.cpp:274:25: note: shadowed declaration is here
  274 |         obs_properties* props;
      |                         ^~~~~
cc1plus: all warnings being treated as errors
[4/5] Building CXX object CMakeFiles/obs-multi-rtmp.dir/src/edit-widget.cpp.o
FAILED: CMakeFiles/obs-multi-rtmp.dir/src/edit-widget.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DHAVE_OBSCONFIG_H -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DSIMDE_ENABLE_OPENMP -Dobs_multi_rtmp_EXPORTS -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64 -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64/obs-multi-rtmp_autogen/include -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/./dep/nlohmann-json -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/.deps/obs-studio-30.0.0/libobs -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src -isystem /home/pepesan/grive/obs-plugins/obs-build-dependencies/plugin-deps-2022-11-21-qt6-x86_64/include/obs -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt6/QtGui -O2 -g -DNDEBUG -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -fopenmp-simd -fno-strict-aliasing -Wdeprecated-declarations -Wempty-body -Wenum-conversion -Werror=return-type -Wextra -Wformat -Wformat-security -Wno-conversion -Wno-float-conversion -Wno-implicit-fallthrough -Wno-missing-braces -Wno-missing-field-initializers -Wno-shadow -Wno-sign-conversion -Wno-trigraphs -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-label -Wparentheses -Wshadow -Wuninitialized -Wunreachable-code -Wunused-parameter -Wunused-value -Wunused-variable -Wvla -Wconversion -Wfloat-conversion -Winvalid-offsetof -Wno-overloaded-virtual -Wno-error=maybe-uninitialized -Winfinite-recursion -mmmx -msse -msse2 -fPIC -Werror -MD -MT CMakeFiles/obs-multi-rtmp.dir/src/edit-widget.cpp.o -MF CMakeFiles/obs-multi-rtmp.dir/src/edit-widget.cpp.o.d -o CMakeFiles/obs-multi-rtmp.dir/src/edit-widget.cpp.o -c /home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp: In lambda function:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp:198:23: error: declaration of ‘global’ shadows a previous local [-Werror=shadow]
  198 |                 auto& global = GlobalMultiOutputConfig();
      |                       ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp:193:15: note: shadowed declaration is here
  193 |         auto& global = GlobalMultiOutputConfig();
      |               ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp: In constructor ‘EditOutputWidgetImpl::EditOutputWidgetImpl(const std::string&, QWidget*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp:389:25: error: declaration of ‘currow’ shadows a previous local [-Werror=shadow]
  389 |                     int currow = 0;
      |                         ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp:362:13: note: shadowed declaration is here
  362 |         int currow = 0;
      |             ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp:442:25: error: declaration of ‘currow’ shadows a previous local [-Werror=shadow]
  442 |                     int currow = 0;
      |                         ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp:362:13: note: shadowed declaration is here
  362 |         int currow = 0;
      |             ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp: In lambda function:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp:496:23: error: declaration of ‘global’ shadows a previous local [-Werror=shadow]
  496 |                 auto& global = GlobalMultiOutputConfig();
      |                       ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp:342:15: note: shadowed declaration is here
  342 |         auto& global = GlobalMultiOutputConfig();
      |               ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp: In lambda function:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp:669:18: error: declaration of ‘scenes’ shadows a previous local [-Werror=shadow]
  669 |             auto scenes = (EnumParam*)p;
      |                  ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/edit-widget.cpp:667:34: note: shadowed declaration is here
  667 |         std::vector<std::string> scenes;
      |                                  ^~~~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.

I found a temporal workaround, downgrading to the 30.1.2 flatpak version and the plugins loads fine. More info (in spanish, sorry): https://cursosdedesarrollo.com/2024/07/solucion-a-los-problemas-con-la-version-30-2-x-de-obs-studio-via-flatpak-y-el-plugin-obs-multi-rtmp/

sorayuki commented 4 months ago

May the right way to install plugin for flatpak version is to make another flatpak which could be mounted into the same container. But I know nothing in flatpak.


From: David Vaquero @.> Sent: Friday, July 26, 2024 5:41:12 PM To: sorayuki/obs-multi-rtmp @.> Cc: Subscribed @.***> Subject: Re: [sorayuki/obs-multi-rtmp] Plugin fails to load on OBS 30.2 Flatpak (Issue #436)

It seams that the main problem is that the flatpak obs studio 30.2.x versions does not allow to load plugins installed manually into the .var/app/com.obsproject.Studio/config/obs-studio/plugins folder.

Reference: obsproject/obs-studio#10981 (comment)https://github.com/obsproject/obs-studio/issues/10981#issuecomment-2227001650

My failure is similar to the @Dekomorohttps://github.com/Dekomoro log.

I found a workaround, downgrading to the 30.1.2 flatpak version and the plugins loads fine. More info (in spanish, sorry): https://cursosdedesarrollo.com/2024/07/solucion-a-los-problemas-con-la-version-30-2-x-de-obs-studio-via-flatpak-y-el-plugin-obs-multi-rtmp/

― Reply to this email directly, view it on GitHubhttps://github.com/sorayuki/obs-multi-rtmp/issues/436#issuecomment-2252362110, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEAUMEYKF3RMPADIJ5MRXADZOIKTRAVCNFSM6AAAAABK3XWH2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJSGM3DEMJRGA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

pepesan commented 4 months ago

@sorayuki I wanna help. But, first, we need to fix the plugin compilation for ubuntu 24.04 my actual so. And later create a flatpak for the plugin.

How I can help you with the first task?

carlosbet commented 3 months ago

@sorayuki I wanna help. But, first, we need to fix the plugin compilation for ubuntu 24.04 my actual so. And later create a flatpak for the plugin.

How I can help you with the first task?

No problem to compile this in Ubuntu 22.04. A simple way to do this is by editing CMakePresets.json and adding the flag "CMAKE_COMPILE WARNING_AS_ERROR: false" in general template presets or in your case in the cacheVariables of linux-x86_64 section.

    {
      "name": "linux-x86_64",
      "displayName": "Linux x86_64",
      "description": "Build for Linux x86_64",
      "inherits": ["template"],
      "binaryDir": "${sourceDir}/build_x86_64",
      "condition": {
        "type": "equals",
        "lhs": "${hostSystemName}",
        "rhs": "Linux"
      },
      "generator": "Ninja",
      "warnings": {"dev": true, "deprecated": true},
      "cacheVariables": {
        "QT_VERSION": "6",
        "CMAKE_BUILD_TYPE": "RelWithDebInfo",
        "CMAKE_COMPILE_WARNING_AS_ERROR": false
      }
    },

Another history is how to create a flatpak of this. I hate Snap and Flatpak and have no idea how to make that...

Of course, ensure to install all necessary dependencies. @see: https://github.com/obsproject/obs-plugintemplate?tab=readme-ov-file#linux

sorayuki commented 3 months ago

I found that fedora is far different from what I have tried when studying in college. The package manager disappeared and replaced by a helpless appstore.

pepesan commented 3 months ago

@sorayuki I wanna help. But, first, we need to fix the plugin compilation for ubuntu 24.04 my actual so. And later create a flatpak for the plugin. How I can help you with the first task?

No problem to compile this in Ubuntu 22.04. A simple way to do this is by editing CMakePresets.json and adding the flag "CMAKE_COMPILE WARNING_AS_ERROR: false" in general template presets or in your case in the cacheVariables of linux-x86_64 section.

    {
      "name": "linux-x86_64",
      "displayName": "Linux x86_64",
      "description": "Build for Linux x86_64",
      "inherits": ["template"],
      "binaryDir": "${sourceDir}/build_x86_64",
      "condition": {
        "type": "equals",
        "lhs": "${hostSystemName}",
        "rhs": "Linux"
      },
      "generator": "Ninja",
      "warnings": {"dev": true, "deprecated": true},
      "cacheVariables": {
        "QT_VERSION": "6",
        "CMAKE_BUILD_TYPE": "RelWithDebInfo",
        "CMAKE_COMPILE_WARNING_AS_ERROR": false
      }
    },

Another history is how to create a flatpak of this. I hate Snap and Flatpak and have no idea how to make that...

Of course, ensure to install all necessary dependencies. @see: https://github.com/obsproject/obs-plugintemplate?tab=readme-ov-file#linux

Done. But with error result:

Preset CMake variables:

  CMAKE_COMPILE_WARNING_AS_ERROR:BOOL="FALSE"
  CMAKE_CXX_STANDARD="20"
  CMAKE_CXX_STANDARD_REQUIRED:BOOL="TRUE"
  ENABLE_FRONTEND_API:BOOL="TRUE"
  ENABLE_QT:BOOL="TRUE"

-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64
   =>   Building obs-multi-rtmp...
[1/3] Building CXX object CMakeFiles/obs-multi-rtmp.dir/src/obs-multi-rtmp.cpp.o
FAILED: CMakeFiles/obs-multi-rtmp.dir/src/obs-multi-rtmp.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DHAVE_OBSCONFIG_H -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DSIMDE_ENABLE_OPENMP -Dobs_multi_rtmp_EXPORTS -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64 -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64/obs-multi-rtmp_autogen/include -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/./dep/nlohmann-json -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/.deps/obs-studio-30.0.0/libobs -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src -isystem /home/pepesan/grive/obs-plugins/obs-build-dependencies/plugin-deps-2022-11-21-qt6-x86_64/include/obs -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt6/QtGui -O2 -g -DNDEBUG -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -fopenmp-simd -fno-strict-aliasing -Wdeprecated-declarations -Wempty-body -Wenum-conversion -Werror=return-type -Wextra -Wformat -Wformat-security -Wno-conversion -Wno-float-conversion -Wno-implicit-fallthrough -Wno-missing-braces -Wno-missing-field-initializers -Wno-shadow -Wno-sign-conversion -Wno-trigraphs -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-label -Wparentheses -Wshadow -Wuninitialized -Wunreachable-code -Wunused-parameter -Wunused-value -Wunused-variable -Wvla -Wconversion -Wfloat-conversion -Winvalid-offsetof -Wno-overloaded-virtual -Wno-error=maybe-uninitialized -Winfinite-recursion -mmmx -msse -msse2 -fPIC -MD -MT CMakeFiles/obs-multi-rtmp.dir/src/obs-multi-rtmp.cpp.o -MF CMakeFiles/obs-multi-rtmp.dir/src/obs-multi-rtmp.cpp.o.d -o CMakeFiles/obs-multi-rtmp.dir/src/obs-multi-rtmp.cpp.o -c /home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp: In function ‘bool obs_module_load()’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp:273:10: error: ‘obs_frontend_add_dock_by_id’ was not declared in this scope; did you mean ‘obs_frontend_add_dock’?
  273 |     if (!obs_frontend_add_dock_by_id("obs-multi-rtmp-dock", obs_module_text("Title"), dock))
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |          obs_frontend_add_dock
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp: In lambda function:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp:283:18: warning: declaration of ‘dock’ shadows a previous local [-Wshadow]
  283 |             auto dock = static_cast<MultiOutputWidget*>(private_data);
      |                  ^~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/obs-multi-rtmp.cpp:271:10: note: shadowed declaration is here
  271 |     auto dock = new MultiOutputWidget();
      |          ^~~~
[2/3] Building CXX object CMakeFiles/obs-multi-rtmp.dir/src/push-widget.cpp.o
FAILED: CMakeFiles/obs-multi-rtmp.dir/src/push-widget.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DHAVE_OBSCONFIG_H -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DSIMDE_ENABLE_OPENMP -Dobs_multi_rtmp_EXPORTS -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64 -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/build_x86_64/obs-multi-rtmp_autogen/include -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/./dep/nlohmann-json -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/.deps/obs-studio-30.0.0/libobs -I/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src -isystem /home/pepesan/grive/obs-plugins/obs-build-dependencies/plugin-deps-2022-11-21-qt6-x86_64/include/obs -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt6/QtGui -O2 -g -DNDEBUG -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -fopenmp-simd -fno-strict-aliasing -Wdeprecated-declarations -Wempty-body -Wenum-conversion -Werror=return-type -Wextra -Wformat -Wformat-security -Wno-conversion -Wno-float-conversion -Wno-implicit-fallthrough -Wno-missing-braces -Wno-missing-field-initializers -Wno-shadow -Wno-sign-conversion -Wno-trigraphs -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-label -Wparentheses -Wshadow -Wuninitialized -Wunreachable-code -Wunused-parameter -Wunused-value -Wunused-variable -Wvla -Wconversion -Wfloat-conversion -Winvalid-offsetof -Wno-overloaded-virtual -Wno-error=maybe-uninitialized -Winfinite-recursion -mmmx -msse -msse2 -fPIC -MD -MT CMakeFiles/obs-multi-rtmp.dir/src/push-widget.cpp.o -MF CMakeFiles/obs-multi-rtmp.dir/src/push-widget.cpp.o.d -o CMakeFiles/obs-multi-rtmp.dir/src/push-widget.cpp.o -c /home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp: In static member function ‘static void IOBSOutputEventHanlder::OnOutputStopped(void*, calldata_t*)’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:39:37: warning: conversion from ‘long long int’ to ‘int’ may change value [-Wconversion]
   39 |         thiz->OnStopped(calldata_int(param, "code"));
      |                         ~~~~~~~~~~~~^~~~~~~~~~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp: In member function ‘bool PushWidgetImpl::PrepareOutputEncoders()’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:283:33: error: ‘obs_encoder_set_gpu_scale_type’ was not declared in this scope; did you mean ‘obs_encoder_set_scaled_size’?
  283 |                                 obs_encoder_set_gpu_scale_type(venc, obs_scale_type::OBS_SCALE_BICUBIC);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 obs_encoder_set_scaled_size
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:287:25: error: ‘obs_encoder_set_frame_rate_divisor’ was not declared in this scope; did you mean ‘obs_encoder_get_frame_size’?
  287 |                         obs_encoder_set_frame_rate_divisor(venc, videoConfig->fpsDenumerator);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         obs_encoder_get_frame_size
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp: In member function ‘void PushWidgetImpl::UpdateStreamStatus()’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:438:79: warning: conversion from ‘uint64_t’ {aka ‘long unsigned int’} to ‘double’ may change value [-Wconversion]
  438 |             sprintf(strFps, "%d FPS", static_cast<int>(std::round((new_frames - total_frames_) / interval)));
      |                                                                   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:440:51: warning: conversion from ‘long unsigned int’ to ‘double’ may change value [-Wconversion]
  440 |             auto bps = (new_bytes - total_bytes_) * 8 / interval;
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp: In lambda function:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:507:27: warning: declaration of ‘global’ shadows a previous local [-Wshadow]
  507 |                     auto& global = GlobalMultiOutputConfig();
      |                           ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:474:15: note: shadowed declaration is here
  474 |         auto& global = GlobalMultiOutputConfig();
      |               ^~~~~~
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp: In member function ‘virtual void PushWidgetImpl::StartStreaming()’:
/home/pepesan/grive/obs-plugins/obs-multi-rtmp/src/push-widget.cpp:564:46: warning: conversion from ‘int64_t’ {aka ‘long int’} to ‘int’ may change value [-Wconversion]
  564 |                 int delaySec = config_get_int(profileConfig, "Output", "DelaySec");
      |                                ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

I´ll search the information to build the flatpak for @sorayuki

pepesan commented 3 months ago

I've created a temporary repository to help @sorayuki with the flatpak version: https://github.com/pepesan/com.obsproject.Studio.Plugin.MultiRtmp

I´ve copy and tried to convert the files from another examples like: https://github.com/flathub/com.obsproject.Studio.Plugin.SceneSwitcher

Basically are three file:

I've created a README.md that should help with the build and install the package.

But shows me some errors during te package process: Error: module obs-multi-rtmp: Can't find ninja file

It seems not to recognize the plugin's code from cmake-ninja

I hope this be helpful.

OmriPH commented 3 months ago

Any progress on this? i want to use multi-rtmp on flatpak but I cant right now..

sorayuki commented 3 months ago

According to the discussion in OBS official discord channel, plugin can't be installed via copy files into its flatpak container since 30.2. I didn't investigate how to make it work for flatpak yet due to a lack of mental energy.


From: OmriOn @.> Sent: Wednesday, August 7, 2024 7:08:00 PM To: sorayuki/obs-multi-rtmp @.> Cc: 雷Q @.>; Mention @.> Subject: Re: [sorayuki/obs-multi-rtmp] Plugin fails to load on OBS 30.2 Flatpak (Issue #436)

Any progress on this? i want to use multi-rtmp on flatpak but I cant right now..

― Reply to this email directly, view it on GitHubhttps://github.com/sorayuki/obs-multi-rtmp/issues/436#issuecomment-2273212867, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEAUME6MC5VWHEN3S5DLHODZQH5ZBAVCNFSM6AAAAABK3XWH2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZTGIYTEOBWG4. You are receiving this because you were mentioned.Message ID: @.***>

carlosbet commented 3 months ago

I just tried it on a fresh install of Ubuntu 24.04 and works fine. Note that the deb version of OBS Studio (30.2.2) will be installed during the build process if it was not already installed. Some warnings will be displayed during the compilation process, but these are not real errors, just warnings. Can follow these steps to reproduce:

sudo apt install git zsh cmake ninja-build pkg-config build-essential libobs-dev qt6-base-dev libqt6svg6-dev qt6-base-private-dev
git clone https://github.com/sorayuki/obs-multi-rtmp
cd obs-multi-rtmp
sed -i '94s/$/,/;94a\        "CMAKE_COMPILE_WARNING_AS_ERROR": false' CMakePresets.json
zsh .github/scripts/build-linux
mkdir -p ~/.config/obs-studio/plugins/
cp -r ./release/RelWithDebInfo/dist/obs-multi-rtmp ~/.config/obs-studio/plugins/
obs

However, I forked and made some minor changes, fixing some details and telling the GCC compiler not to complain about shadowing. Now GCC builds without warnings.

git clone -b minorFixes https://github.com/carlosbet/obs-multi-rtmp.git

Anyway, if your goal is to use the git repo to generate the flatpak package, the build process will take place in the sandbox virtual environment of the flatpak builder. So there's no need to do this build directly on your system.

I've created a small flatpak extension project. The readme contains instructions on how to build, install or even create a flatpak file. I have checked that this works fine with the OBS Studio 30.2.2 flatpak version installed on Ubuntu 24.04 from Flathub.

https://github.com/carlosbet/com.obsproject.Studio.Plugin.obs-multi-rtmp.git

A small issue here is that @sorayuki made some changes to the cmake helper of the obs-plugintemplate for Linux that caused the final files to not be installed in the correct locations. I think SoraYuki's goal here was to create a normalized tree of directories for output when running Github actions or similar. However, I'm not sure that's the best place to do it. Just for that reason, I'm using a branch of my fork with the original obs-plugintemplate code instead of using the @sorayuki repo directly.

On the other hand, about publishing this on Flathub... In theory, anyone can publish a flatpak package, even if they are not the owner of the application they are publishing. Or so I understood. But I think the right person for this is @sorayuki or another person more involved in this project. I am not even a streamer. I just came here after seeing claims help in a Twitch streaming.

If the goal is to have the plugin appear directly in the OBS Studio app (Flathub) plugins section... I saw a guide for this, but now I can't find the link. Sorry.

Hope it helps.

And finally, if you are reading this, you are a streamer and this software helps you. Please consider donating to @sorayuki. We all like to see our work appreciated. Thanks.

sorayuki commented 3 months ago

I intentionally modified the cmake json file to disable warning as error because my code generating a lot of warnings.

I found it installed in different location for different distribution and see into the source code of OBS to find a permanent place to have plugin installed (which you saw in the release page). But it now didn't work with the flatpak system...

By the way it has nothing to do with the donation for "a lack of mental energy". Just because the day job as a programmer in an online video service company takes them all.


From: Carlos Bello @.> Sent: Thursday, August 8, 2024 9:42:46 AM To: sorayuki/obs-multi-rtmp @.> Cc: 雷Q @.>; Mention @.> Subject: Re: [sorayuki/obs-multi-rtmp] Plugin fails to load on OBS 30.2 Flatpak (Issue #436)

I just tried it on a fresh install (Virtualbox) of Ubuntu 24.04 and works fine. Note that the deb version of OBS Studio (30.2.2) will be installed during the build process if it was not already installed. Some warnings will be displayed during the compilation process, but these are not real errors, just warnings. Can follow these steps to reproduce:

sudo apt install git zsh cmake ninja-build pkg-config build-essential libobs-dev qt6-base-dev libqt6svg6-dev qt6-base-private-dev git clone https://github.com/sorayuki/obs-multi-rtmp cd obs-multi-rtmp sed -i '94s/$/,/;94a\ "CMAKE_COMPILE_WARNING_AS_ERROR": false' CMakePresets.json zsh .github/scripts/build-linux mkdir -p ~/.config/obs-studio/plugins/ cp -r ./release/RelWithDebInfo/dist/obs-multi-rtmp ~/.config/obs-studio/plugins/ obs

However, I forked and made some minor changes, fixing some details and telling the GCC compiler not to complain about shadowing. Now GCC builds without warnings.

git clone -b minorFixes https://github.com/carlosbet/obs-multi-rtmp.git

Anyway, if your goal is to use the git repo to generate the flatpak package, the build process will take place in the sandbox virtual environment of the flatpak builder. So there's no need to do this build directly on your system.

I've created a small flatpak extension project. The readme contains instructions on how to build, install or even create a flatpak file. I have checked that this works fine with the OBS Studio 30.2.2 flatpak version installed on Ubuntu 24.04 from Flathub.

https://github.com/carlosbet/com.obsproject.Studio.Plugin.obs-multi-rtmp.git

A small issue here is that @sorayukihttps://github.com/sorayuki made some changes to the cmake helper of the obs-plugintemplate for Linux that caused the final files to not be installed in the correct locations. I think SoraYuki's goal here was to create a normalized tree of directories for output when running Github actions or similar. However, I'm not sure that's the best place to do it. Just for that reason, I'm using a branch of my fork with the original obs-plugintemplate code instead of using the @sorayukihttps://github.com/sorayuki repo directly.

On the other hand, about publishing this on Flathub... In theory, anyone can publish a flatpak package, even if they are not the owner of the application they are publishing. Or so I understood. But I think the right person for this is @sorayukihttps://github.com/sorayuki or another person more involved in this project. I am not even a streamer. I just came here after seeing claims help in a Twitch streaming.

If the goal is to have the plugin appear directly in the OBS Studio app (Flathub) plugins section... I saw a guide for this, but now I can't find the link. Sorry.

Hope it helps.

And finally, if you are reading this, you are a streamer and this software helps you. Please consider donating to @sorayukihttps://github.com/sorayuki. We all like to see our work appreciated. Thanks.

― Reply to this email directly, view it on GitHubhttps://github.com/sorayuki/obs-multi-rtmp/issues/436#issuecomment-2274770527, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEAUME4VBWWOUOAAZHA5UT3ZQLEJNAVCNFSM6AAAAABK3XWH2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZUG43TANJSG4. You are receiving this because you were mentioned.Message ID: @.***>

sorayuki commented 3 months ago

Thank you for the example. I will try to understand how it works. Would you submit a pull request, or I can directly merge your repository.


From: 雷 鸣 @.> Sent: Thursday, August 8, 2024 10:07:47 AM To: sorayuki/obs-multi-rtmp @.>; sorayuki/obs-multi-rtmp @.> Cc: Mention @.> Subject: Re: [sorayuki/obs-multi-rtmp] Plugin fails to load on OBS 30.2 Flatpak (Issue #436)

I intentionally modified the cmake json file to disable warning as error because my code generating a lot of warnings.

I found it installed in different location for different distribution and see into the source code of OBS to find a permanent place to have plugin installed (which you saw in the release page). But it now didn't work with the flatpak system...

By the way it has nothing to do with the donation for "a lack of mental energy". Just because the day job as a programmer in an online video service company takes them all.


From: Carlos Bello @.> Sent: Thursday, August 8, 2024 9:42:46 AM To: sorayuki/obs-multi-rtmp @.> Cc: 雷Q @.>; Mention @.> Subject: Re: [sorayuki/obs-multi-rtmp] Plugin fails to load on OBS 30.2 Flatpak (Issue #436)

I just tried it on a fresh install (Virtualbox) of Ubuntu 24.04 and works fine. Note that the deb version of OBS Studio (30.2.2) will be installed during the build process if it was not already installed. Some warnings will be displayed during the compilation process, but these are not real errors, just warnings. Can follow these steps to reproduce:

sudo apt install git zsh cmake ninja-build pkg-config build-essential libobs-dev qt6-base-dev libqt6svg6-dev qt6-base-private-dev git clone https://github.com/sorayuki/obs-multi-rtmp cd obs-multi-rtmp sed -i '94s/$/,/;94a\ "CMAKE_COMPILE_WARNING_AS_ERROR": false' CMakePresets.json zsh .github/scripts/build-linux mkdir -p ~/.config/obs-studio/plugins/ cp -r ./release/RelWithDebInfo/dist/obs-multi-rtmp ~/.config/obs-studio/plugins/ obs

However, I forked and made some minor changes, fixing some details and telling the GCC compiler not to complain about shadowing. Now GCC builds without warnings.

git clone -b minorFixes https://github.com/carlosbet/obs-multi-rtmp.git

Anyway, if your goal is to use the git repo to generate the flatpak package, the build process will take place in the sandbox virtual environment of the flatpak builder. So there's no need to do this build directly on your system.

I've created a small flatpak extension project. The readme contains instructions on how to build, install or even create a flatpak file. I have checked that this works fine with the OBS Studio 30.2.2 flatpak version installed on Ubuntu 24.04 from Flathub.

https://github.com/carlosbet/com.obsproject.Studio.Plugin.obs-multi-rtmp.git

A small issue here is that @sorayukihttps://github.com/sorayuki made some changes to the cmake helper of the obs-plugintemplate for Linux that caused the final files to not be installed in the correct locations. I think SoraYuki's goal here was to create a normalized tree of directories for output when running Github actions or similar. However, I'm not sure that's the best place to do it. Just for that reason, I'm using a branch of my fork with the original obs-plugintemplate code instead of using the @sorayukihttps://github.com/sorayuki repo directly.

On the other hand, about publishing this on Flathub... In theory, anyone can publish a flatpak package, even if they are not the owner of the application they are publishing. Or so I understood. But I think the right person for this is @sorayukihttps://github.com/sorayuki or another person more involved in this project. I am not even a streamer. I just came here after seeing claims help in a Twitch streaming.

If the goal is to have the plugin appear directly in the OBS Studio app (Flathub) plugins section... I saw a guide for this, but now I can't find the link. Sorry.

Hope it helps.

And finally, if you are reading this, you are a streamer and this software helps you. Please consider donating to @sorayukihttps://github.com/sorayuki. We all like to see our work appreciated. Thanks.

― Reply to this email directly, view it on GitHubhttps://github.com/sorayuki/obs-multi-rtmp/issues/436#issuecomment-2274770527, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEAUME4VBWWOUOAAZHA5UT3ZQLEJNAVCNFSM6AAAAABK3XWH2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZUG43TANJSG4. You are receiving this because you were mentioned.Message ID: @.***>

carlosbet commented 3 months ago

Of course, I understand you @sorayuki. Unfortunately, we all have too much work and not enough free time for our hobbies. But it never hurts to remind people that they can donate. A lot of people just complain and never contribute.

I submitted a pull request with the changes made in the fork. For the flatpak project itself, it is usually a separate project. Do not merge it directly into the plugin project. Of course, you can copy it and add it to your repo as a new project if you wish.

pepesan commented 3 months ago

@carlosbet Great Job. Much better than my failed repo XD

I've tried to compile your flatpak repo in Ubuntu 24.04 without problems. But in my Ubuntu 24.04 does not work the installatin

You plugin repo works like a charm in Ubuntu 24.04.

The next phase is to create the flathub repository to publish it to flathub based in your repo :)

innovate-invent commented 1 week ago

For those with the specific libobs-frontend-api.so.0: cannot open shared object file: No such file or directory error, a workaround is to run flatpak run --env=LD_LIBRARY_PATH=/app/lib/ com.obsproject.Studio. The issue there is that the libobs-frontend-api.so.0 wasn't included when ldconfig is ran.

$ flatpak run --command=bash com.obsproject.Studio
$ ldconfig -p | grep obs
    libobs.so.30 (libc6,x86-64) => /app/lib/libobs.so.30
    libobs.so (libc6,x86-64) => /app/lib/libobs.so
    libobs-scripting.so.30 (libc6,x86-64) => /app/lib/libobs-scripting.so.30
    libobs-scripting.so (libc6,x86-64) => /app/lib/libobs-scripting.so
    libobs-opengl.so.30 (libc6,x86-64) => /app/lib/libobs-opengl.so.30
    libobs-opengl.so (libc6,x86-64) => /app/lib/libobs-opengl.so
    libobs-frontend-api.so.30 (libc6,x86-64) => /app/lib/libobs-frontend-api.so.30
    libobs-frontend-api.so (libc6,x86-64) => /app/lib/libobs-frontend-api.so

I am not sure if this is a problem with flatpack itself or OBS.

Edit: Looking into this further it looks like something in the OBS flatpak is mishandling lib*.so.0 symlinks:

$ ls -l /app/lib/libobs*
lrwxrwxrwx 1 nfsnobody nfsnobody      25 Nov 11 20:42 /app/lib/libobs-frontend-api.so -> libobs-frontend-api.so.30
lrwxrwxrwx 1 nfsnobody nfsnobody      25 Nov 11 20:42 /app/lib/libobs-frontend-api.so.0 -> libobs-frontend-api.so.30
-rwxr-xr-x 2 nfsnobody nfsnobody   39040 Nov 11 20:42 /app/lib/libobs-frontend-api.so.30
lrwxrwxrwx 1 nfsnobody nfsnobody      19 Nov 11 20:42 /app/lib/libobs-opengl.so -> libobs-opengl.so.30
-rwxr-xr-x 2 nfsnobody nfsnobody  276624 Nov 11 20:42 /app/lib/libobs-opengl.so.30
lrwxrwxrwx 1 nfsnobody nfsnobody      22 Nov 11 20:42 /app/lib/libobs-scripting.so -> libobs-scripting.so.30
-rwxr-xr-x 2 nfsnobody nfsnobody  131368 Nov 11 20:42 /app/lib/libobs-scripting.so.30
lrwxrwxrwx 1 nfsnobody nfsnobody      12 Nov 11 20:42 /app/lib/libobs.so -> libobs.so.30
lrwxrwxrwx 1 nfsnobody nfsnobody      12 Nov 11 20:42 /app/lib/libobs.so.0 -> libobs.so.30
-rwxr-xr-x 2 nfsnobody nfsnobody 1146976 Nov 11 20:42 /app/lib/libobs.so.30

libobs-frontend-api.so.0 -> libobs-frontend-api.so.30 is just wrong, you should never have a major version symlink pointing at a lib that is a different major version (0 != 30). /app/lib/libobs-frontend-api.so.0 shouldn't exist and obs-multi-rtmp should not be linking against it. When ldconfig is ran on first run of the OBS package, it sees that libobs-frontend-api.so.0 has the same soname as libobs-frontend-api.so.30 and omits it. obs-multi-rtmp should be linking against libobs-frontend-api.so at build time and allowing the linker to pick up the soname libobs-frontend-api.so.30. Yes, this requires the plugin to be recompiled for each major version of OBS.