Merge pull request #200639 from fpletz/pkgs/obs-28.1.2

obs-studio: 28.0.3 -> 28.1.2, plugins fixes
This commit is contained in:
Franz Pletz 2022-11-11 16:26:59 +01:00 committed by GitHub
commit 3c446ee4e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 174 additions and 109 deletions

View file

@ -950,6 +950,14 @@
<literal>mariadb</literal> if possible.
</para>
</listitem>
<listitem>
<para>
<literal>obs-studio</literal> hase been updated to version 28.
If you have packaged custom plugins, check if they are
compatible. <literal>obs-websocket</literal> has been
integrated into <literal>obs-studio</literal>.
</para>
</listitem>
<listitem>
<para>
<literal>signald</literal> has been bumped to

View file

@ -288,6 +288,8 @@ Available as [services.patroni](options.html#opt-services.patroni.enable).
- `percona-server56` has been removed. Please migrate to `mysql` or `mariadb` if possible.
- `obs-studio` hase been updated to version 28. If you have packaged custom plugins, check if they are compatible. `obs-websocket` has been integrated into `obs-studio`.
- `signald` has been bumped to `0.23.0`. For the upgrade, a migration process is necessary. It can be
done by running a command like this before starting `signald.service`:

View file

@ -1,7 +0,0 @@
{ callPackage, qtx11extras, ... } @ args:
callPackage ./generic.nix (args // {
version = "27.2.4";
sha256 = "sha256-OiSejQovSmhItrnrQlcVp9PCDRgAhuxTinSpXbH8bo0=";
extraBuildInputs = [ qtx11extras ];
})

View file

@ -1,22 +0,0 @@
{ callPackage
, libajantv2
, librist
, srt
, qtwayland
, ...
} @ args:
callPackage ./generic.nix (args // {
version = "28.0.3";
sha256 = "sha256-+4H1BjEgxqkAEvRyr2Tg3wXutnMvlYQEdT5jz644fMA=";
extraPatches = [ ./Provide-runtime-plugin-destination-as-relative-path.patch ];
extraBuildInputs = [
libajantv2
librist
srt
qtwayland
];
extraCMakeFlags = [
"-DENABLE_JACK=ON"
];
})

View file

@ -1,9 +1,4 @@
{ version
, sha256
, extraPatches ? [ ]
, extraBuildInputs ? [ ]
, extraCMakeFlags ? [ ]
, config
{ config
, lib
, stdenv
, fetchFromGitHub
@ -41,6 +36,10 @@
, pipewireSupport ? stdenv.isLinux
, pipewire
, libdrm
, libajantv2
, librist
, srt
, qtwayland
, wrapQtAppsHook
, ...
}:
@ -51,20 +50,21 @@ let
in
stdenv.mkDerivation rec {
pname = "obs-studio";
inherit version;
version = "28.1.2";
src = fetchFromGitHub {
owner = "obsproject";
repo = "obs-studio";
rev = version;
inherit sha256;
sha256 = "sha256-M5UEOtdzXBVY0UGfwWx3MsM28bJ1EcVPl8acWXWV0lg=";
fetchSubmodules = true;
};
patches = [
# Lets obs-browser build against CEF 90.1.0+
./Enable-file-access-and-universal-access-for-file-URL.patch
] ++ extraPatches;
./Provide-runtime-plugin-destination-as-relative-path.patch
];
nativeBuildInputs = [
addOpenGLRunpath
@ -94,8 +94,11 @@ stdenv.mkDerivation rec {
libvlc
mbedtls
pciutils
libajantv2
librist
srt
qtwayland
]
++ extraBuildInputs
++ optionals scriptingSupport [ luajit python3 ]
++ optional alsaSupport alsa-lib
++ optional pulseaudioSupport libpulseaudio
@ -123,7 +126,8 @@ stdenv.mkDerivation rec {
# Add support for browser source
"-DBUILD_BROWSER=ON"
"-DCEF_ROOT_DIR=../../cef"
] ++ extraCMakeFlags;
"-DENABLE_JACK=ON"
];
dontWrapGApps = true;
preFixup = ''

View file

@ -1,4 +1,4 @@
{ callPackage, libsForQt5, pkgsi686Linux }:
{ callPackage, qt6Packages, pkgsi686Linux }:
# When adding new plugins:
# - Respect alphabetical order. On diversion, file a PR.
@ -8,17 +8,17 @@
{
looking-glass-obs = callPackage ./looking-glass-obs.nix { };
obs-backgroundremoval = callPackage ./obs-backgroundremoval.nix { };
obs-backgroundremoval = callPackage ./obs-backgroundremoval { };
obs-gstreamer = callPackage ./obs-gstreamer.nix { };
obs-hyperion = libsForQt5.callPackage ./obs-hyperion/default.nix { };
obs-hyperion = qt6Packages.callPackage ./obs-hyperion/default.nix { };
obs-move-transition = callPackage ./obs-move-transition.nix { };
obs-multi-rtmp = libsForQt5.callPackage ./obs-multi-rtmp.nix { };
obs-multi-rtmp = qt6Packages.callPackage ./obs-multi-rtmp { };
obs-ndi = libsForQt5.callPackage ./obs-ndi.nix { };
obs-ndi = qt6Packages.callPackage ./obs-ndi.nix { };
obs-nvfbc = callPackage ./obs-nvfbc.nix { };

View file

@ -1,13 +0,0 @@
diff --git a/external/FindLibObs.cmake b/external/FindLibObs.cmake
index ab0a3de..19c63ee 100644
--- a/external/FindLibObs.cmake
+++ b/external/FindLibObs.cmake
@@ -95,7 +95,7 @@ if(LIBOBS_FOUND)
set(LIBOBS_INCLUDE_DIRS ${LIBOBS_INCLUDE_DIR} ${W32_PTHREADS_INCLUDE_DIR})
set(LIBOBS_LIBRARIES ${LIBOBS_LIB} ${W32_PTHREADS_LIB})
- include(${LIBOBS_INCLUDE_DIR}/../cmake/external/ObsPluginHelpers.cmake)
+ include(external/ObsPluginHelpers.cmake)
# allows external plugins to easily use/share common dependencies that are often included with libobs (such as FFmpeg)
if(NOT DEFINED INCLUDED_LIBOBS_CMAKE_MODULES)

View file

@ -1,17 +1,19 @@
diff --git a/src/obs-ndi.cpp b/src/obs-ndi.cpp
index 493831c..7b0f8db 100644
index 1a8aeb3..9a36ea9 100644
--- a/src/obs-ndi.cpp
+++ b/src/obs-ndi.cpp
@@ -197,11 +197,7 @@ const char* obs_module_description()
const NDIlib_v4* load_ndilib()
{
QStringList locations;
- locations << QString(qgetenv(NDILIB_REDIST_FOLDER));
@@ -132,13 +132,7 @@ const NDIlib_v5 *load_ndilib()
const char *redistFolder = std::getenv(NDILIB_REDIST_FOLDER);
if (redistFolder)
libraryLocations.push_back(redistFolder);
-#if defined(__linux__) || defined(__APPLE__)
- locations << "/usr/lib";
- locations << "/usr/local/lib";
- libraryLocations.push_back("/usr/lib");
- libraryLocations.push_back("/usr/lib64");
- libraryLocations.push_back("/usr/lib/x86_64-linux-gnu");
- libraryLocations.push_back("/usr/local/lib");
- libraryLocations.push_back("/usr/local/lib64");
-#endif
+ locations << "@NDI@/lib";
+ libraryLocations.push_back("@NDI@/lib");
for (QString path : locations) {
blog(LOG_INFO, "Trying '%s'", path.toUtf8().constData());
for (std::string path : libraryLocations) {
blog(LOG_DEBUG, "[load_ndilib] Trying library path: '%s'", path.c_str());

View file

@ -1,7 +1,6 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, obs-studio
, onnxruntime
@ -10,15 +9,23 @@
stdenv.mkDerivation rec {
pname = "obs-backgroundremoval";
version = "0.4.0";
version = "unstable-2022-05-02";
src = fetchFromGitHub {
owner = "royshil";
repo = "obs-backgroundremoval";
rev = "v${version}";
sha256 = "sha256-TI1FlhE0+JL50gAZCSsI+g8savX8GRQkH3jYli/66hQ=";
rev = "cc9d4a5711f9388ed110230f9f793bb071577a23";
hash = "sha256-xkVZ4cB642p4DvZAPwI2EVhkfVl5lJhgOQobjNMqpec=";
};
patches = [
# Fix c++ include directives
./includes.patch
# Use CPU backend instead of CUDA/DirectML
./use-cpu-backend.patch
];
nativeBuildInputs = [ cmake ];
buildInputs = [ obs-studio onnxruntime opencv ];
@ -29,10 +36,9 @@ stdenv.mkDerivation rec {
"-DOnnxruntime_INCLUDE_DIRS=${onnxruntime.dev}/include/onnxruntime/core/session"
];
patches = [ ./obs-backgroundremoval-includes.patch ];
prePatch = ''
sed -i 's/version_from_git()/set(VERSION "${version}")/' CMakeLists.txt
sed -i 's/version_from_git()/set(VERSION "0.4.0")/' CMakeLists.txt
'';
meta = with lib; {

View file

@ -1,5 +1,5 @@
diff --git a/src/Model.h b/src/Model.h
index 5c21eae..74b8078 100644
index 6a73745..6bb8a7d 100644
--- a/src/Model.h
+++ b/src/Model.h
@@ -1,13 +1,8 @@
@ -13,11 +13,11 @@ index 5c21eae..74b8078 100644
-#include <onnxruntime_cxx_api.h>
-#include <cpu_provider_factory.h>
-#endif
#ifdef _WIN32
#ifdef WITH_CUDA
#include <cuda_provider_factory.h>
diff --git a/src/background-filter.cpp b/src/background-filter.cpp
index 9fa5794..5d66aee 100644
index 0853818..32c6483 100644
--- a/src/background-filter.cpp
+++ b/src/background-filter.cpp
@@ -1,13 +1,8 @@
@ -31,6 +31,6 @@ index 9fa5794..5d66aee 100644
-#include <onnxruntime_cxx_api.h>
-#include <cpu_provider_factory.h>
-#endif
#ifdef _WIN32
#ifdef WITH_CUDA
#include <cuda_provider_factory.h>
#endif

View file

@ -0,0 +1,32 @@
From d04e167f9081a3ec8c49f0967b5b0cec79e40e4d Mon Sep 17 00:00:00 2001
From: Raphael Robatsch <raphael-git@tapesoftware.net>
Date: Fri, 14 Oct 2022 16:55:36 +0200
Subject: [PATCH] unix: use CPU backend instead of DirectML
---
src/background-filter.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/background-filter.cpp b/src/background-filter.cpp
index 32c6483..55e838f 100644
--- a/src/background-filter.cpp
+++ b/src/background-filter.cpp
@@ -205,10 +205,14 @@ static void createOrtSession(struct background_removal_filter *tf) {
if (tf->useGPU == USEGPU_CUDA) {
Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_CUDA(sessionOptions, 0));
}
-#else
+#elseif _WIN32
if (tf->useGPU == USEGPU_DML) {
Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_DML(sessionOptions, 0));
}
+#else
+ if (tf->useGPU == USEGPU_CPU) {
+ Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_CPU(sessionOptions, 0));
+ }
#endif
tf->session.reset(new Ort::Session(*tf->env, tf->modelFilepath, sessionOptions));
} catch (const std::exception& e) {
--
2.37.3

View file

@ -29,11 +29,17 @@ stdenv.mkDerivation rec {
chmod -R a+w external
'';
postInstall = ''
# Remove flatbuffers install
rm -rf $out/bin $out/lib/{libflatbuffers.a,cmake,pkgconfig} $out/include
'';
meta = with lib; {
description = "OBS Studio plugin to connect to a Hyperion.ng server";
homepage = "https://github.com/hyperion-project/hyperion-obs-plugin";
license = licenses.mit;
maintainers = with maintainers; [ algram ];
platforms = [ "x86_64-linux" ];
broken = true; # Not compatible with qt6 yet but required by OBS28
};
}

View file

@ -7,27 +7,22 @@
stdenv.mkDerivation rec {
pname = "obs-move-transition";
version = "2.6.4";
version = "2.7.1";
src = fetchFromGitHub {
owner = "exeldro";
repo = "obs-move-transition";
rev = version;
sha256 = "sha256-+kAdCM5PEFNxKNmJmf2ASTyUKA7xnbMAA7kP/emoaeI=";
sha256 = "sha256-zWHQ01iNTlqSAKcmsDCUZPXmmBIpqY/ZDftD5J6kp80=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ obs-studio ];
preConfigure = ''
cp ${obs-studio.src}/cmake/external/ObsPluginHelpers.cmake cmake/
postInstall = ''
rm -rf $out/obs-plugins $out/data
'';
cmakeFlags = [
"-DBUILD_OUT_OF_TREE=On"
"-Wno-dev"
];
meta = with lib; {
description = "Plugin for OBS Studio to move source to a new position during scene transition";
homepage = "https://github.com/exeldro/obs-move-transition";

View file

@ -2,20 +2,21 @@
stdenv.mkDerivation rec {
pname = "obs-multi-rtmp";
version = "0.2.8.1";
version = "0.2.8.1-OBS28";
src = fetchFromGitHub {
owner = "sorayuki";
repo = "obs-multi-rtmp";
rev = version;
sha256 = "sha256-OhatuSlDJ2VDNorM4QfoKPYKyv5YpN8EnIelLdBTlZ0=";
sha256 = "sha256-1W+c8Y0AmtKQmCIg8IDAaYYStQzDpZRuqw3vZEY5ncU=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ obs-studio qtbase ];
cmakeFlags = [
"-DLIBOBS_INCLUDE_DIR=${obs-studio}/include/obs"
patches = [
# Patch cmake file to link against the obs build output, instead of its sources
./fix-build.patch
];
dontWrapQtApps = true;

View file

@ -0,0 +1,54 @@
From 72aeddb52c2b656bfec918097ad07a0ff092008b Mon Sep 17 00:00:00 2001
From: Raphael Robatsch <raphael-git@tapesoftware.net>
Date: Thu, 13 Oct 2022 21:34:21 +0200
Subject: [PATCH] Link against OBS public interface instead of sources
---
CMakeLists.txt | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 27e20f8..8725c5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,15 +65,9 @@ if (WIN32)
"/def:${CMAKE_CURRENT_BINARY_DIR}/obs-frontend-api.def"
"/out:${CMAKE_CURRENT_BINARY_DIR}/obs-frontend-api.lib"
)
-elseif (APPLE)
- # macOS
- find_library(_LIB_OBS "${LIB_OBS}.0.dylib" PATHS ${OBS_BIN_DIR} REQUIRED)
- set(LIB_OBS "${_LIB_OBS}")
-elseif (UNIX)
- # Linux
- find_package(LibObs REQUIRED)
else ()
- message(FATAL_ERROR "Unsupported OS!")
+ find_package(libobs REQUIRED)
+ find_package(obs-frontend-api REQUIRED)
endif ()
@@ -96,18 +90,10 @@ if (WIN32)
"${CMAKE_CURRENT_BINARY_DIR}/version.rc"
)
endif ()
-target_include_directories(obs-multi-rtmp PRIVATE
- "${OBS_SRC_DIR}/libobs"
- "${OBS_SRC_DIR}/UI/obs-frontend-api"
-)
-target_link_directories(obs-multi-rtmp PRIVATE
- "${CMAKE_CURRENT_BINARY_DIR}"
- ${OBS_BIN_DIR}
-)
target_link_libraries(obs-multi-rtmp PRIVATE
Qt6::Widgets
- ${LIB_OBS}
- obs-frontend-api
+ OBS::libobs
+ OBS::obs-frontend-api
)
if (WIN32)
--
2.37.3

View file

@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
pname = "obs-ndi";
version = "4.9.1";
version = "4.10.0";
nativeBuildInputs = [ cmake ];
buildInputs = [ obs-studio qtbase ndi ];
@ -10,11 +10,13 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "Palakis";
repo = "obs-ndi";
rev = version;
sha256 = "1y3xdqp55jayhg4sinwiwpk194zc4f4jf0abz647x2fprsk9jz7s";
rev = "dummy-tag-${version}";
sha256 = "sha256-eQ/hQ2AnwyBNOotqlUZq07m4FXoeir2f7cTVq594obc=";
};
patches = [ ./fix-search-path.patch ./hardcode-ndi-path.patch ];
patches = [
./hardcode-ndi-path.patch
];
postPatch = ''
# Add path (variable added in hardcode-ndi-path.patch)
@ -26,11 +28,12 @@ stdenv.mkDerivation rec {
ln -s ${ndi}/include lib/ndi
'';
cmakeFlags = [
"-DLIBOBS_INCLUDE_DIR=${obs-studio}/include/obs"
"-DLIBOBS_LIB=${obs-studio}/lib"
"-DCMAKE_CXX_FLAGS=-I${obs-studio.src}/UI/obs-frontend-api"
];
postInstall = ''
mkdir $out/lib $out/share
mv $out/obs-plugins/64bit $out/lib/obs-plugins
rm -rf $out/obs-plugins
mv $out/data $out/share/obs
'';
dontWrapQtApps = true;

View file

@ -1 +1 @@
{"hash": "sha256:24ed671e140ee62ebe96a494b3f0e3a3e5ba005364a0a6ad8ebf89b3494b7644", "version": "5.5.1"}
{"hash": "sha256:70e04c2e7a629a9854de2727e0f978175b7a4ec6cf4cd9799a22390862f6fa27", "version": "5.5.2"}

View file

@ -31014,16 +31014,10 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Foundation;
};
obs-studio27 = libsForQt5.callPackage ../applications/video/obs-studio/27.nix {
obs-studio = qt6Packages.callPackage ../applications/video/obs-studio {
ffmpeg_4 = ffmpeg-full;
};
obs-studio28 = qt6Packages.callPackage ../applications/video/obs-studio/28.nix {
ffmpeg_4 = ffmpeg-full;
};
obs-studio = obs-studio28;
obs-studio-plugins = recurseIntoAttrs (callPackage ../applications/video/obs-studio/plugins {});
wrapOBS = callPackage ../applications/video/obs-studio/wrapper.nix {};