Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add com.obsproject.Studio.Plugin.StreamFX #3159

Draft
wants to merge 1 commit into
base: new-pr
Choose a base branch
from

Conversation

rmnvgr
Copy link

@rmnvgr rmnvgr commented May 18, 2022

Please confirm your submission meets all the criteria

  • I have read the App Requirements and App Maintenance pages.
  • My pull request follows the instructions at App Submission.
  • I am using only the minimal set of permissions. (If not, please explain each non-standard permission.)
  • All assets referenced in the manifest are redistributable by any party. If not, the unredistributable parts are using an extra-data source type.
  • I am an upstream contributor to the project. If not, I contacted upstream developers about submitting their software to Flathub. Link: [Request] Flatpak version of StreamFX for OBS Xaymar/obs-StreamFX#781 (comment)
  • I own the domain used in the application ID or the domain has a policy for delegating subdomains (e.g. GitHub, SourceForge). (OBS plugin)
  • Any additional patches or files have been submitted to the upstream projects concerned. (If not, explain why.)
    We agreed with the developer to ship the patches to the build system downstream.

@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch is necessary to enable the front-end. The build system checks for the presence of ${libobs_SOURCE_DIR}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake, which apparently isn't shipped in the Flatpak of OBS.

@GeorgesStavracas do you know if something can be done about it in OBS?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to ship this file (and any other files like this) by default. This should be fixed upstream, in the OBS Studio repository itself.

Copy link

@Xaymar Xaymar May 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more of an artifact of two conflicting PRs sent to upstream, one which only added the header file and the other which turned obs-frontend-api into its own module separate from libobs/obs. Unfortunately the former was merged and the latter was rejected.

There was/is also a separate PR that completely redesigns the CMake file for obs-studio, which is what I am waiting for before I redesign the CMake file for StreamFX again. I'm currently failing at finding the link for the CMake rework PR.

Edit: Found it

@barthalion
Copy link
Member

@GeorgesStavracas Let me know when it can be merged.

@GeorgesStavracas
Copy link

I'll review it properly next week


# Minimum Dependencies
-list(APPEND PROJECT_LIBRARIES libobs)
+list(APPEND PROJECT_LIBRARIES obs)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still fairly sure this link target is incorrect and targets the UI instead of the libobs library. StreamFX's build system requires the presence of LibObsConfig.cmake, which defines libobs not obs. The future 27.2.4+ CMakeLists build script also entirely revolves around the existence of libobs, as well as the necessary cmake files.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this patch before setting the libobs_SOURCE_DIR option, and didn't try to build without it afterwards. Indeed, it is not necessary, I removed it.

@rmnvgr
Copy link
Author

rmnvgr commented May 27, 2022

bot, build com.obsproject.Studio.Plugin.StreamFX

@flathubbot
Copy link

Queued test build for com.obsproject.Studio.Plugin.StreamFX.

@flathubbot
Copy link

Started test build 93469

@flathubbot
Copy link

Build 93469 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/91194/com.obsproject.Studio.Plugin.StreamFX.flatpakref

@Xaymar
Copy link

Xaymar commented May 27, 2022

For your information, there is a work-in-progress upstream PR which changes the CMake build system slightly. It will now allow specifying lookup paths for all three dependencies (if the platform needs them), so you can specify -DOBS_DOWNLOAD=OFF and then specify the path to libOBS+obs-frontend-api with -DOBS_PATH=.... This will apply to all necessary dependencies in the future, such as libaom and svt-av1.

@rmnvgr
Copy link
Author

rmnvgr commented May 27, 2022

For your information, there is a work-in-progress upstream PR which changes the CMake build system slightly. It will now allow specifying lookup paths for all three dependencies (if the platform needs them), so you can specify -DOBS_DOWNLOAD=OFF and then specify the path to libOBS+obs-frontend-api with -DOBS_PATH=....

Nice! Unfortunately I can't test it now due to the OBS Flatpak not having the obs-frontend-apiConfig.cmake file.

More worrisome, the Flatpak from OBS master branch doesn't appear to ship any CMake file. @GeorgesStavracas do you know more about that?

@Xaymar
Copy link

Xaymar commented May 27, 2022

Nice! Unfortunately I can't test it now due to the OBS Flatpak not having the obs-frontend-apiConfig.cmake file. More worrisome, the Flatpak from OBS master branch doesn't appear to ship any CMake file.

See this comment, it is an artifact from two conflicting PRs. The build system will be enhanced to also check for obs-frontend-api.lib and obs-frontend-api.h if that cmake file is missing.

@rmnvgr
Copy link
Author

rmnvgr commented May 28, 2022

The build system will be enhanced to also check for obs-frontend-api.lib and obs-frontend-api.h if that cmake file is missing.

That'd be great, as we have the libraries and headers in the Flatpak.

@rmnvgr
Copy link
Author

rmnvgr commented Jun 2, 2022

@Xaymar Since both OBS and StreamFX will have major changes in their build system, I think it'll be better to wait for their next respective release before publishing the StreamFX Flatpak, to avoid any disruption in the updates while the manifest is adapted. Is that fine with you?

@Xaymar
Copy link

Xaymar commented Jun 3, 2022

@rmnvgr v0.12 has no set release date, so it might release before or after OBS Studio 28.0 is out. So I don't mind, since I already release non-flatpak packages anyway.

@Xaymar
Copy link

Xaymar commented Aug 19, 2022

It's been a few months, here's the status from my end:

  • OBS Studio 28.0 is supported on Windows and Linux, MacOS is still failing with amissing INTERFACE_INCLUDE_DIRECTORIES entry. Due to requiring Qt6 and the changed build system for OBS Studio 28.0, support for OBS Studio 27.2 and below is entirely dropped.
  • The Auto-Dependency system was trashed, as it became more and more fragile over time. With recent CMake versions, it would outright fail at times with no known solution for it. Developers are urged to adopt the newer build process instead, which relies on building obs_libraries and obs-frontend-api directly.
  • Packages which have a FindModule now always use it, instead of conditionally opting to manually specify link targets. This resolves some platform-dependent link issues entirely.
  • Most of the important parts of the build system was either removed with no easy alternative, or is now/will soon handled by scripts.

As I don't plan to make any other massive changes to the build system for now, this should be as stable as it gets until there's another massive change necessary.

Edit: Due to the above changes, it is now required to provide the proper OBS Libraries as a CMakeConfig module.

@barthalion
Copy link
Member

@GeorgesStavracas @Xaymar Can you please give me simple yes or no whether it's good to be merged?

@rmnvgr
Copy link
Author

rmnvgr commented Aug 29, 2022

@barthalion No, I will rework it when OBS 28 releases. I'll put the MR in draft until then.

@Xaymar Thank you for the update!

@rmnvgr rmnvgr marked this pull request as draft August 29, 2022 21:25
@rmnvgr
Copy link
Author

rmnvgr commented Sep 2, 2022

bot, build com.obsproject.Studio.Plugin.StreamFX

@flathubbot
Copy link

Queued test build for com.obsproject.Studio.Plugin.StreamFX.

@rmnvgr
Copy link
Author

rmnvgr commented Sep 2, 2022

bot, build com.obsproject.Studio.Plugin.StreamFX

@flathubbot
Copy link

Queued test build for com.obsproject.Studio.Plugin.StreamFX.

@rmnvgr
Copy link
Author

rmnvgr commented Sep 2, 2022

Now that OBS 28 is out, I did a test build with the latest StreamFX alpha, it builds without any patches, which is nice. (I built it locally, I don't know why the bot doesn't start the build).

I only needed to force the REQUIRE_JSON option, as I had pointed out, since nlohmann-json is needed for the frontend (in the about dialog) but the option is only set to true when the updater is enabled.

Copy link

@GeorgesStavracas GeorgesStavracas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manifest and the metainfo files look good to me. Unless @Xaymar has any objection to landing this, I think it's ready to go!

@Xaymar
Copy link

Xaymar commented Sep 2, 2022

LGTM if Flathub has multiple update channels like StreamFX does. Alpha, Beta and Candidate versions shouldn't be used by end-users without explicitly opting into them

@GeorgesStavracas
Copy link

LGTM if Flathub has multiple update channels like StreamFX does. Alpha, Beta and Candidate versions shouldn't be used by end-users without explicitly opting into them

There is Flathub Beta, which could hold Beta and RC releases, but not alpha. I'll leave the decision to use Flathub Beta or not to you and @rmnvgr's discretion 🙂

@rmnvgr
Copy link
Author

rmnvgr commented Sep 2, 2022

I'd prefer to avoid maintaining the beta channel and stick to releases. I'll update the manifest and mark the PR as ready when StreamFX 0.12 releases.

@flathubbot
Copy link

Queued test build for com.obsproject.Studio.Plugin.StreamFX.

@flathubbot
Copy link

Started test build 25378

@flathubbot
Copy link

Build 25378 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/8028/com.obsproject.Studio.Plugin.StreamFX.flatpakref

@rmnvgr
Copy link
Author

rmnvgr commented Feb 28, 2023

@hfiguiere Thanks, that appears to fix it.

@kohrias
Copy link

kohrias commented Mar 9, 2023

bot, build com.obsproject.Studio.Plugin.StreamFX

@flathubbot
Copy link

Queued test build for com.obsproject.Studio.Plugin.StreamFX.

@flathubbot
Copy link

Started test build 27386

@flathubbot
Copy link

Build 27386 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/10055/com.obsproject.Studio.Plugin.StreamFX.flatpakref

@kohrias
Copy link

kohrias commented Mar 9, 2023

The plugin is loading. Nonetheless there is an error about a missing library in the startup messages:

warning: [StreamFX] <encoder::aom::av1> Loading of '/app/plugins/share/obs/obs-plugins/StreamFX/libaom.so' failed.
warning: [StreamFX] <encoder::aom::av1> Loading of 'libaom' failed.
error: [StreamFX] <encoder::aom::av1> Failed to initialize AOM AV1 encoder: Unable to load AOM library.

@orowith2os
Copy link

The library needed might be here: https://aomedia.googlesource.com/aom/. Though, it might not be too much of a worry, since not many platforms support AV1 yet.

@Xaymar
Copy link

Xaymar commented Mar 10, 2023

AOM encoder in StreamFX is deprecated and scheduled to be removed in a future revision. Even if you provide the library, it will just stay hidden.

@kohrias
Copy link

kohrias commented Mar 10, 2023

AOM encoder in StreamFX is deprecated and scheduled to be removed in a future revision. Even if you provide the library, it will just stay hidden.

Ok, I am going to ignore the message then. Thanks for letting me know.

@blusewill
Copy link

bot, build com.obsproject.Studio.Plugin.StreamFX

@flathubbot
Copy link

Queued test build for com.obsproject.Studio.Plugin.StreamFX.

@flathubbot
Copy link

Started test build 29261

@flathubbot
Copy link

Build 29261 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/11926/com.obsproject.Studio.Plugin.StreamFX.flatpakref

@Xaymar
Copy link

Xaymar commented Mar 28, 2023

Just a heads-up, in case things break, the reason is that I had to remove a few GPLv2 "or later" incompatible submissions to the plugin retroactively. I've mostly restored the content of the repository to the best of my ability, but still have to do a lot of work to fix up the remaining branches, and then rebuild binaries without the unwanted code.

@penyuan
Copy link

penyuan commented Aug 2, 2023

Sorry I might be missing something, but when I tried to install this via @flathubbot's comment above, I get a 404 error.

Is there a Flatpak of the StreamFX plugin that I can install and test now @Xaymar?

@hfiguiere
Copy link
Contributor

bot, build com.obsproject.Studio.Plugin.StreamFX

@flathubbot
Copy link

Queued test build for com.obsproject.Studio.Plugin.StreamFX.

@flathubbot
Copy link

Started test build 56480

@flathubbot
Copy link

Build 56480 failed

@hfiguiere
Copy link
Contributor

the test build expired, and the current PR must be updated as the upstream source repository doesn't carry the revisions that is expected.

@penyuan
Copy link

penyuan commented Aug 2, 2023

Thanks @hfiguiere, sounds like we need OP @rmnvgr to update this pull request?

@Xaymar
Copy link

Xaymar commented Aug 2, 2023

Is there a Flatpak of the StreamFX plugin that I can install and test now @Xaymar?

At the current time, I do not maintain a flatpak package however in the future official packages for various Linux distributions may be considered. However due to the CEF and Wayland incompatibility that causes OBS Studio to crash, it is also likely that Linux support is dropped entirely unless someone has a known way to fix it.

@hfiguiere hfiguiere changed the title Add StreamFX OBS plugin Add com.obsproject.Studio.Plugin.StreamFX Aug 9, 2023
@hfiguiere hfiguiere added the awaiting-changes Pull request waiting for changes from author label Aug 9, 2023
@Sid127
Copy link

Sid127 commented Sep 27, 2023

Is this still being worked on?

@kir68k
Copy link

kir68k commented Dec 24, 2023

diff --git a/com.obsproject.Studio.Plugin.StreamFX.yml b/com.obsproject.Studio.Plugin.StreamFX.yml
index 269ad8f..c040e58 100644
--- a/com.obsproject.Studio.Plugin.StreamFX.yml
+++ b/com.obsproject.Studio.Plugin.StreamFX.yml
@@ -21,8 +21,8 @@ modules:
     sources:
       - type: git
         url: https://github.com/Xaymar/obs-StreamFX.git
-        tag: 0.12.0a173
-        commit: fcb441bdf6e5c70d5eb5ebf6795f2ddd43f70a23
+        tag: 0.12.0b299
+        commit: 8b97c2b23ddd931eee538e6feec71d76d42e494d
         disable-shallow-clone: true
         x-checker-data:
           type: json

After changing this I was able to run flatpak-builder on the YAML file, install and run OBS Studio with StreamFX.

@bbhtt bbhtt added the work-in-progress Draft PRs label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-changes Pull request waiting for changes from author work-in-progress Draft PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet