From b83a5c76eb5d519bb85483c0362773788a624e55 Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 25 Apr 2026 03:54:19 +1000 Subject: [PATCH 01/15] Cmake: Cmake ffmpeg library fix for Windows - Add windows environment setup and build instructions - Update build specs to the latest obs-deps versions - Change library resolving for windows to use the pre built ffmpeg libaries - Add extra required windows libraries needed --- CMakeLists.txt | 21 ++++++++++++++++----- WINDOWS.md | 37 +++++++++++++++++++++++++++++++++++++ buildspec.json | 12 ++++++------ 3 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 WINDOWS.md diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a68423..90eb082 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,11 +16,22 @@ add_library(obs-moq MODULE) if(${BUILD_PLUGIN}) find_package(libobs REQUIRED) # FFmpeg dependency - include(FindPkgConfig) - pkg_check_modules(FFMPEG REQUIRED libavcodec libavutil libswscale libswresample) - target_include_directories(obs-moq PRIVATE ${FFMPEG_INCLUDE_DIRS}) - target_link_directories(obs-moq PRIVATE ${FFMPEG_LIBRARY_DIRS}) - target_link_libraries(obs-moq PRIVATE ${FFMPEG_LIBRARIES}) + if(NOT OS_WINDOWS) + pkg_check_modules(FFMPEG REQUIRED libavcodec libavutil libswscale libswresample) + target_include_directories(obs-moq PRIVATE ${FFMPEG_INCLUDE_DIRS}) + target_link_directories(obs-moq PRIVATE ${FFMPEG_LIBRARY_DIRS}) + target_link_libraries(obs-moq PRIVATE ${FFMPEG_LIBRARIES}) + else() + target_link_libraries(obs-moq PRIVATE Userenv ntdll) + + find_library(AVCODEC_LIB avcodec) + find_library(AVUTIL_LIB avutil) + find_library(SWSCALE_LIB swscale) + find_library(SWRESAMPLE_LIB swresample) + + target_link_libraries(obs-moq PRIVATE ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB} ${SWRESAMPLE_LIB}) + + endif() else() find_package(FFmpeg REQUIRED avcodec avutil swscale swresample) target_link_libraries(obs-moq PRIVATE FFmpeg::avcodec FFmpeg::avutil FFmpeg::swscale FFmpeg::swresample) diff --git a/WINDOWS.md b/WINDOWS.md new file mode 100644 index 0000000..1f1045f --- /dev/null +++ b/WINDOWS.md @@ -0,0 +1,37 @@ +## Windows Build Instructions + +### Build Setup + +`` +Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + choco install -y git + choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System' + choco install visualstudio2026buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" + choco install rustup +``` + +During the rustup installation choose the `nightly` variant. + +Locate "Visual Studio Installer". Click "Modify". Choose "Desktop Development with C++". Check C++ ATL For x64 + + +### Build the OBS fork +``` +cd obs-studio +cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64 +cmake --build --preset windows-x64 +``` + +### Build the obs-moq plugin + +``` +cd obs +cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64 +cmake --build --preset windows-x64 +``` + +For now copy the build plugin libraries to the build obs fork + +``` +Copy-Item -Path "build_x64/rundir/RelWithDebInfo/" -Destination "../obs-studio/build_x64/rundir/RelWithDebInfo/obs-plugins" -Recurse +``` \ No newline at end of file diff --git a/buildspec.json b/buildspec.json index f4e18ba..4bf6225 100644 --- a/buildspec.json +++ b/buildspec.json @@ -1,21 +1,21 @@ { "dependencies": { "obs-studio": { - "version": "31.1.1", + "version": "32.1.2", "baseUrl": "https://github.com/obsproject/obs-studio/archive/refs/tags", "label": "OBS sources", "hashes": { - "macos": "39751f067bacc13d44b116c5138491b5f1391f91516d3d590d874edd21292291", - "windows-x64": "2c8427c10b55ac6d68008df2e9a3e82f4647aaad18f105e30d4713c2de678ccf" + "macos": "2aeb3aaa99544fefd557f10ac6550e73df71540dd57528b2a1e6f39a55ebacfb", + "windows-x64": "21cba22292985cf0da967d5c618999b40eaa32b73d2ab8b06154b5ea1b3d3798" } }, "prebuilt": { - "version": "2025-07-11", + "version": "2025-08-23", "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", "label": "Pre-Built obs-deps", "hashes": { - "macos": "495687e63383d1a287684b6e2e9bfe246bb8f156fe265926afb1a325af1edd2a", - "windows-x64": "c8c642c1070dc31ce9a0f1e4cef5bb992f4bff4882255788b5da12129e85caa7" + "macos": "9403bb43fb0a9bb215739a5659ca274fe884dbbbcd22bd9ca781c961fb041c42", + "windows-x64": "8de229cff6f1981508c0eb646b35e644633a5855787b9f5d3b90ae2aeb87ffc1" } }, "qt6": { From ea1c0a9ce860213beac150e327c48d59244cc51a Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 25 Apr 2026 14:55:18 +1000 Subject: [PATCH 02/15] - update markdown code blocks - add check for ffmpeg library path --- CMakeLists.txt | 4 +++- WINDOWS.md | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 90eb082..a16a4fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,9 @@ if(${BUILD_PLUGIN}) find_library(SWSCALE_LIB swscale) find_library(SWRESAMPLE_LIB swresample) - target_link_libraries(obs-moq PRIVATE ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB} ${SWRESAMPLE_LIB}) + if (AVCODEC_LIB) + target_link_libraries(obs-moq PRIVATE ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB} ${SWRESAMPLE_LIB}) + endif() endif() else() diff --git a/WINDOWS.md b/WINDOWS.md index 1f1045f..e7634fc 100644 --- a/WINDOWS.md +++ b/WINDOWS.md @@ -2,7 +2,7 @@ ### Build Setup -`` +```powershell Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) choco install -y git choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System' @@ -14,9 +14,9 @@ During the rustup installation choose the `nightly` variant. Locate "Visual Studio Installer". Click "Modify". Choose "Desktop Development with C++". Check C++ ATL For x64 - ### Build the OBS fork -``` + +```powershell cd obs-studio cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64 cmake --build --preset windows-x64 @@ -24,7 +24,7 @@ cmake --build --preset windows-x64 ### Build the obs-moq plugin -``` +```powershell cd obs cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64 cmake --build --preset windows-x64 @@ -32,6 +32,6 @@ cmake --build --preset windows-x64 For now copy the build plugin libraries to the build obs fork -``` +```powershell Copy-Item -Path "build_x64/rundir/RelWithDebInfo/" -Destination "../obs-studio/build_x64/rundir/RelWithDebInfo/obs-plugins" -Recurse ``` \ No newline at end of file From 9ffc4e3a2722f6b9c9b880c28e3536e97e22825f Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 2 May 2026 04:12:04 +1000 Subject: [PATCH 03/15] - Refactor cmake to search for including provided pre-built libraries in the obs dependancies --- CMakeLists.txt | 29 ++++++++++++----------------- WINDOWS.md | 5 ++++- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a16a4fb..07a6b47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,24 +15,19 @@ add_library(obs-moq MODULE) if(${BUILD_PLUGIN}) find_package(libobs REQUIRED) - # FFmpeg dependency - if(NOT OS_WINDOWS) - pkg_check_modules(FFMPEG REQUIRED libavcodec libavutil libswscale libswresample) - target_include_directories(obs-moq PRIVATE ${FFMPEG_INCLUDE_DIRS}) - target_link_directories(obs-moq PRIVATE ${FFMPEG_LIBRARY_DIRS}) - target_link_libraries(obs-moq PRIVATE ${FFMPEG_LIBRARIES}) - else() - target_link_libraries(obs-moq PRIVATE Userenv ntdll) - - find_library(AVCODEC_LIB avcodec) - find_library(AVUTIL_LIB avutil) - find_library(SWSCALE_LIB swscale) - find_library(SWRESAMPLE_LIB swresample) - - if (AVCODEC_LIB) - target_link_libraries(obs-moq PRIVATE ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB} ${SWRESAMPLE_LIB}) - endif() + # FFmpeg dependency. Use provided pre-built dependancies + find_library(AVCODEC_LIB avcodec) + find_library(AVUTIL_LIB avutil) + find_library(SWSCALE_LIB swscale) + find_library(SWRESAMPLE_LIB swresample) + + if (AVCODEC_LIB) + target_link_libraries(obs-moq PRIVATE ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB} ${SWRESAMPLE_LIB}) + endif() + # Link required windows system libraries + if(OS_WINDOWS) + target_link_libraries(obs-moq PRIVATE Userenv ntdll) endif() else() find_package(FFmpeg REQUIRED avcodec avutil swscale swresample) diff --git a/WINDOWS.md b/WINDOWS.md index e7634fc..226d5b8 100644 --- a/WINDOWS.md +++ b/WINDOWS.md @@ -34,4 +34,7 @@ For now copy the build plugin libraries to the build obs fork ```powershell Copy-Item -Path "build_x64/rundir/RelWithDebInfo/" -Destination "../obs-studio/build_x64/rundir/RelWithDebInfo/obs-plugins" -Recurse -``` \ No newline at end of file +``` + +## Debugging Moq Plugin + $env:RUST_LOG="debug"; $env:RUST_BACKTRACE=1; $env:OBS_LOG_LEVEL="debug"; .\obs64.exe -verbose \ No newline at end of file From 8a2174df4d24c39fdeadc2c7e86bfc5836b6f0ef Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 2 May 2026 04:49:59 +1000 Subject: [PATCH 04/15] - update latest specfile hashes --- buildspec.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/buildspec.json b/buildspec.json index 4bf6225..8ebba11 100644 --- a/buildspec.json +++ b/buildspec.json @@ -5,8 +5,8 @@ "baseUrl": "https://github.com/obsproject/obs-studio/archive/refs/tags", "label": "OBS sources", "hashes": { - "macos": "2aeb3aaa99544fefd557f10ac6550e73df71540dd57528b2a1e6f39a55ebacfb", - "windows-x64": "21cba22292985cf0da967d5c618999b40eaa32b73d2ab8b06154b5ea1b3d3798" + "macos": "b4a59410cddb46d0e31df1ee13b8ec66f30862d7e980c1a8c4e3b5d16fae6053", + "windows-x64": "b4a59410cddb46d0e31df1ee13b8ec66f30862d7e980c1a8c4e3b5d16fae6053" } }, "prebuilt": { @@ -19,15 +19,15 @@ } }, "qt6": { - "version": "2025-07-11", + "version": "2025-08-23", "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", "label": "Pre-Built Qt6", "hashes": { - "macos": "d3f5f04b6ea486e032530bdf0187cbda9a54e0a49621a4c8ba984c5023998867", - "windows-x64": "0e76bf0555dd5382838850b748d3dcfab44a1e1058441309ab54e1a65b156d0a" + "macos": "990f11638b80a4509e14e8c315f6e4caa0861e37fcd3113a256fbff835ffca29", + "windows-x64": "c62e82483bc7c0bf199e8ac3220c66a85a6e8a0cd69a05b6d44f873b830e415f" }, "debugSymbols": { - "windows-x64": "11b7be92cf66a273299b8f3515c07a5cfb61614b59a4e67f7fc5ecba5e2bdf21" + "windows-x64": "ef4954fa18c818103f63415776624fa1e403c3faaa7b0a7b259000cc35b2c9fc" } } }, From a5a16c1015aafb5ea4090d5dbce16ef5bfd1f8f4 Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 2 May 2026 05:14:53 +1000 Subject: [PATCH 05/15] - Enable swift for macOS to configure OBS correctly. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07a6b47..392636f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,11 @@ if(${BUILD_PLUGIN}) target_link_libraries(obs-moq PRIVATE ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB} ${SWRESAMPLE_LIB}) endif() + # Enable swift for macOS to configure OBS correctly. + if (OS_MACOS) + enable_language(Swift) + endif() + # Link required windows system libraries if(OS_WINDOWS) target_link_libraries(obs-moq PRIVATE Userenv ntdll) From af0d54631300a694fe044248f81afa695ec46743 Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 2 May 2026 05:19:37 +1000 Subject: [PATCH 06/15] - move swift language obs setup to buildspec common --- CMakeLists.txt | 5 ----- cmake/common/buildspec_common.cmake | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 392636f..f9d6d4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,11 +24,6 @@ if(${BUILD_PLUGIN}) if (AVCODEC_LIB) target_link_libraries(obs-moq PRIVATE ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB} ${SWRESAMPLE_LIB}) endif() - - # Enable swift for macOS to configure OBS correctly. - if (OS_MACOS) - enable_language(Swift) - endif() # Link required windows system libraries if(OS_WINDOWS) diff --git a/cmake/common/buildspec_common.cmake b/cmake/common/buildspec_common.cmake index 59212c3..114938f 100644 --- a/cmake/common/buildspec_common.cmake +++ b/cmake/common/buildspec_common.cmake @@ -57,6 +57,8 @@ function(_setup_obs_studio) set(_cmake_arch "-A ${arch},version=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") set(_cmake_extra "-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION} -DCMAKE_ENABLE_SCRIPTING=OFF") elseif(OS_MACOS) + # Enable swift for macOS to configure OBS correctly. + enable_language(Swift) set(_cmake_generator "Xcode") set(_cmake_arch "-DCMAKE_OSX_ARCHITECTURES:STRING='arm64;x86_64'") set(_cmake_extra "-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") From e1ad0af6f198609e5101239d881b58c7f8c8ba6a Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 2 May 2026 05:45:15 +1000 Subject: [PATCH 07/15] - revert swift language --- cmake/common/buildspec_common.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmake/common/buildspec_common.cmake b/cmake/common/buildspec_common.cmake index 114938f..59212c3 100644 --- a/cmake/common/buildspec_common.cmake +++ b/cmake/common/buildspec_common.cmake @@ -57,8 +57,6 @@ function(_setup_obs_studio) set(_cmake_arch "-A ${arch},version=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") set(_cmake_extra "-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION} -DCMAKE_ENABLE_SCRIPTING=OFF") elseif(OS_MACOS) - # Enable swift for macOS to configure OBS correctly. - enable_language(Swift) set(_cmake_generator "Xcode") set(_cmake_arch "-DCMAKE_OSX_ARCHITECTURES:STRING='arm64;x86_64'") set(_cmake_extra "-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") From 44877ffd4ef10bde294af0188a5e86cbcee91ccc Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 2 May 2026 18:56:05 +1000 Subject: [PATCH 08/15] - add libobs-metal patch --- cmake/common/buildspec_common.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmake/common/buildspec_common.cmake b/cmake/common/buildspec_common.cmake index 59212c3..b84ac98 100644 --- a/cmake/common/buildspec_common.cmake +++ b/cmake/common/buildspec_common.cmake @@ -60,6 +60,20 @@ function(_setup_obs_studio) set(_cmake_generator "Xcode") set(_cmake_arch "-DCMAKE_OSX_ARCHITECTURES:STRING='arm64;x86_64'") set(_cmake_extra "-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") + + #Patch libobs-metal if required + if (_obs_version VERSION_LESS_EQUAL "32.1.2") + + file(READ "${dependencies_dir}/${_obs_destination}/libobs-metal/CMakeLists.txt" CONTENTS) + + #check if Swift is not available + if(NOT "${CONTENTS}" MATCHES "enable_language\\(Swift\\)") + string(REGEX REPLACE "cmake_minimum_required\\(VERSION 3.28...3.30\\)" "cmake_minimum_required(VERSION 3.28...3.30)\nenable_language(Swift)" NEW_CONTENTS "${CONTENTS}") + message(STATUS "Patching libobs-metal") + file(WRITE "${dependencies_dir}/${_obs_destination}/libobs-metal/CMakeLists.txt" "${NEW_CONTENTS}") + endif() + + endif() endif() message(STATUS "Configure ${label} (${arch})") From d86e3828ee7e244a4a9bfaf84b5cc102498587ac Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 2 May 2026 20:31:42 +1000 Subject: [PATCH 09/15] - update min xcode requirements to match obs-studio - update build docs for obs-studio --- README.md | 19 ++++++++++++++++--- cmake/macos/compilerconfig.cmake | 4 ++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d5c3be3..b5f881e 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,12 @@ Prerequisites: * C++ Compiler (Clang/GCC/MSVC) * OBS Studio development libraries (libobs) * [Fork of OBS-Studio](https://github.com/brianmed/obs-studio) just to show MoQ in the UI. +* XCode 16.3 / macOS 15 1. Clone the repos: ```bash git clone https://github.com/moq-dev/obs.git moq-obs - git clone https://github.com/brianmed/obs-studio.git obs-studio + git clone --recurse-submodules https://github.com/brianmed/obs-studio.git obs-studio # optional: for local moq development git clone https://github.com/moq-dev/moq.git moq @@ -32,9 +33,21 @@ Prerequisites: ```bash cd obs-studio - # Replace with your platform + # Configure for Windows + cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64 + # Configure for macos cmake --preset macos - cmake --build --preset macos + + # Build for Windows + cmake --build --preset windows-x64 + + # Build for macOS + cd build_macos + xcodebuild \ + -configuration RelWithDebInfo \ + -scheme obs-studio \ + -parallelizeTargets \ + -destination "generic/platform=macOS,name=Any Mac" ``` 3. Configure the plugin: diff --git a/cmake/macos/compilerconfig.cmake b/cmake/macos/compilerconfig.cmake index 475e8ee..c945edf 100644 --- a/cmake/macos/compilerconfig.cmake +++ b/cmake/macos/compilerconfig.cmake @@ -16,8 +16,8 @@ add_compile_options("$<$>:-fopenmp-simd>") # Ensure recent enough Xcode and platform SDK function(check_sdk_requirements) - set(obs_macos_minimum_sdk 15.0) # Keep in sync with Xcode - set(obs_macos_minimum_xcode 16.0) # Keep in sync with SDK + set(obs_macos_minimum_sdk 15.4) # Keep in sync with Xcode + set(obs_macos_minimum_xcode 16.3) # Keep in sync with SDK execute_process( COMMAND xcrun --sdk macosx --show-sdk-platform-version OUTPUT_VARIABLE obs_macos_current_sdk From e54b02491fc9878b2f85a188a77f33b088b72d2e Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 2 May 2026 21:23:45 +1000 Subject: [PATCH 10/15] - Use pkg-config to find system libraries for Linux --- CMakeLists.txt | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f9d6d4c..3702c95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,14 +15,24 @@ add_library(obs-moq MODULE) if(${BUILD_PLUGIN}) find_package(libobs REQUIRED) - # FFmpeg dependency. Use provided pre-built dependancies - find_library(AVCODEC_LIB avcodec) - find_library(AVUTIL_LIB avutil) - find_library(SWSCALE_LIB swscale) - find_library(SWRESAMPLE_LIB swresample) - - if (AVCODEC_LIB) - target_link_libraries(obs-moq PRIVATE ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB} ${SWRESAMPLE_LIB}) + + if (CMAKE_HOST_LINUX) + # Use pkg-config to find system libraries for Linux + include(FindPkgConfig) + pkg_check_modules(FFMPEG REQUIRED libavcodec libavutil libswscale libswresample) + target_include_directories(obs-moq PRIVATE ${FFMPEG_INCLUDE_DIRS}) + target_link_directories(obs-moq PRIVATE ${FFMPEG_LIBRARY_DIRS}) + target_link_libraries(obs-moq PRIVATE ${FFMPEG_LIBRARIES}) + else() + # FFmpeg dependency. Use provided pre-built dependancies + find_library(AVCODEC_LIB avcodec) + find_library(AVUTIL_LIB avutil) + find_library(SWSCALE_LIB swscale) + find_library(SWRESAMPLE_LIB swresample) + + if (AVCODEC_LIB) + target_link_libraries(obs-moq PRIVATE ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB} ${SWRESAMPLE_LIB}) + endif() endif() # Link required windows system libraries From 0d6e7f842a6f3b50ed4481f974dd037515428874 Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Sat, 2 May 2026 21:26:52 +1000 Subject: [PATCH 11/15] - fix hash for Windows obs source archive --- buildspec.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildspec.json b/buildspec.json index 8ebba11..f83bf8a 100644 --- a/buildspec.json +++ b/buildspec.json @@ -6,7 +6,7 @@ "label": "OBS sources", "hashes": { "macos": "b4a59410cddb46d0e31df1ee13b8ec66f30862d7e980c1a8c4e3b5d16fae6053", - "windows-x64": "b4a59410cddb46d0e31df1ee13b8ec66f30862d7e980c1a8c4e3b5d16fae6053" + "windows-x64": "21cba22292985cf0da967d5c618999b40eaa32b73d2ab8b06154b5ea1b3d3798" } }, "prebuilt": { From 9d45afd9488be624aa8c6e6db595f8479e212d0f Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Mon, 4 May 2026 19:19:56 +1000 Subject: [PATCH 12/15] - Set minimum Xcode and SDK required to 26.1 to match the obs-studio build workflow --- cmake/macos/compilerconfig.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/macos/compilerconfig.cmake b/cmake/macos/compilerconfig.cmake index c945edf..89657a8 100644 --- a/cmake/macos/compilerconfig.cmake +++ b/cmake/macos/compilerconfig.cmake @@ -16,8 +16,8 @@ add_compile_options("$<$>:-fopenmp-simd>") # Ensure recent enough Xcode and platform SDK function(check_sdk_requirements) - set(obs_macos_minimum_sdk 15.4) # Keep in sync with Xcode - set(obs_macos_minimum_xcode 16.3) # Keep in sync with SDK + set(obs_macos_minimum_sdk 26.1) # Keep in sync with Xcode + set(obs_macos_minimum_xcode 26.1) # Keep in sync with SDK execute_process( COMMAND xcrun --sdk macosx --show-sdk-platform-version OUTPUT_VARIABLE obs_macos_current_sdk From c34bf512712b0453b57417f3a8fb59e807e39c11 Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Tue, 5 May 2026 03:55:50 +1000 Subject: [PATCH 13/15] - fix windows install prefix config - update windows docs with configure, build and install command - update justfile with build and install command - update docs with minimum macOS requirements --- README.md | 2 +- WINDOWS.md | 12 ++++-------- cmake/windows/defaults.cmake | 3 ++- justfile | 4 ++-- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b5f881e..384b284 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Prerequisites: * C++ Compiler (Clang/GCC/MSVC) * OBS Studio development libraries (libobs) * [Fork of OBS-Studio](https://github.com/brianmed/obs-studio) just to show MoQ in the UI. -* XCode 16.3 / macOS 15 +* XCode 26.1 / macOS 15.6 1. Clone the repos: ```bash diff --git a/WINDOWS.md b/WINDOWS.md index 226d5b8..19b4b12 100644 --- a/WINDOWS.md +++ b/WINDOWS.md @@ -22,19 +22,15 @@ cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64 cmake --build --preset windows-x64 ``` -### Build the obs-moq plugin +### Build the obs-moq plugin and install ```powershell cd obs -cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64 -cmake --build --preset windows-x64 +cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64 -DMOQ_LOCAL="../moq" +cmake --build --preset windows-x64 --target install ``` -For now copy the build plugin libraries to the build obs fork -```powershell -Copy-Item -Path "build_x64/rundir/RelWithDebInfo/" -Destination "../obs-studio/build_x64/rundir/RelWithDebInfo/obs-plugins" -Recurse -``` ## Debugging Moq Plugin - $env:RUST_LOG="debug"; $env:RUST_BACKTRACE=1; $env:OBS_LOG_LEVEL="debug"; .\obs64.exe -verbose \ No newline at end of file + $env:RUST_LOG="debug"; $env:RUST_BACKTRACE=1; $env:OBS_LOG_LEVEL="debug"; Set-Location "build_x64\rundir\RelWithDebInfo\bin\64bit"; & .\obs64.exe --verbose \ No newline at end of file diff --git a/cmake/windows/defaults.cmake b/cmake/windows/defaults.cmake index c6ec842..bea3ef3 100644 --- a/cmake/windows/defaults.cmake +++ b/cmake/windows/defaults.cmake @@ -8,9 +8,10 @@ set(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL TRUE) include(buildspec) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + cmake_path(SET ALLUSERSPROFILE_PATH $ENV{ALLUSERSPROFILE}) set( CMAKE_INSTALL_PREFIX - "$ENV{ALLUSERSPROFILE}/obs-studio/plugins" + "${ALLUSERSPROFILE_PATH}/obs-studio/plugins" CACHE STRING "Default plugin installation directory" FORCE diff --git a/justfile b/justfile index 4a95984..522a8e1 100644 --- a/justfile +++ b/justfile @@ -30,13 +30,13 @@ build preset="": set -euo pipefail PRESET=$(just preset "{{preset}}") - cmake --build --preset "$PRESET" + cmake --build --preset "$PRESET" --target install # Run a local fork of OBS Studio with the plugin loaded # TODO support for other platforms run: # Copy the plugin to the OBS Studio plugins directory - cp -a build_macos/RelWithDebInfo/obs-moq.plugin ../obs-studio/build_macos/frontend/RelWithDebInfo/OBS.app/Contents/PlugIns/ + # cp -a build_macos/RelWithDebInfo/obs-moq.plugin ../obs-studio/build_macos/frontend/RelWithDebInfo/OBS.app/Contents/PlugIns/ # Run OBS Studio with the plugin loaded RUST_LOG=debug RUST_BACKTRACE=1 OBS_LOG_LEVEL=debug ../obs-studio/build_macos/frontend/RelWithDebInfo/OBS.app/Contents/MacOS/OBS From fa059979d235764e337d1299d956c75bb0976ccb Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Tue, 5 May 2026 18:03:52 +1000 Subject: [PATCH 14/15] - Fix windows commands doc --- WINDOWS.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WINDOWS.md b/WINDOWS.md index 19b4b12..e7a39d8 100644 --- a/WINDOWS.md +++ b/WINDOWS.md @@ -33,4 +33,7 @@ cmake --build --preset windows-x64 --target install ## Debugging Moq Plugin - $env:RUST_LOG="debug"; $env:RUST_BACKTRACE=1; $env:OBS_LOG_LEVEL="debug"; Set-Location "build_x64\rundir\RelWithDebInfo\bin\64bit"; & .\obs64.exe --verbose \ No newline at end of file + +```powershell + $env:RUST_LOG="debug"; $env:RUST_BACKTRACE=1; $env:OBS_LOG_LEVEL="debug"; Set-Location "build_x64\rundir\RelWithDebInfo\bin\64bit"; & .\obs64.exe --verbose +``` \ No newline at end of file From 63cb4aeed2814cdcaa85a56bcf4ea6bc889ddc92 Mon Sep 17 00:00:00 2001 From: Dan Rossi Date: Tue, 5 May 2026 18:14:30 +1000 Subject: [PATCH 15/15] - reinstate macos command --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index 522a8e1..49220e7 100644 --- a/justfile +++ b/justfile @@ -36,7 +36,7 @@ build preset="": # TODO support for other platforms run: # Copy the plugin to the OBS Studio plugins directory - # cp -a build_macos/RelWithDebInfo/obs-moq.plugin ../obs-studio/build_macos/frontend/RelWithDebInfo/OBS.app/Contents/PlugIns/ + cp -a build_macos/RelWithDebInfo/obs-moq.plugin ../obs-studio/build_macos/frontend/RelWithDebInfo/OBS.app/Contents/PlugIns/ # Run OBS Studio with the plugin loaded RUST_LOG=debug RUST_BACKTRACE=1 OBS_LOG_LEVEL=debug ../obs-studio/build_macos/frontend/RelWithDebInfo/OBS.app/Contents/MacOS/OBS