Code Monkey home page Code Monkey logo

xaymar / obs-streamfx Goto Github PK

View Code? Open in Web Editor NEW
3.9K 104.0 2.8K 17.53 MB

StreamFX is a plugin for OBS® Studio which adds many new effects, filters, sources, transitions and encoders! Be it 3D Transform, Blur, complex Masking, or even custom shaders, you'll find it all here.

Home Page: https://s.xaymar.com/streamfx-dc

License: GNU General Public License v2.0

CMake 5.14% C++ 93.02% Shell 0.26% JavaScript 1.58%
plugin addon obs-studio obs av1 prores amd nvidia ffmpeg h264

obs-streamfx's Introduction

StreamFX

Upgrade your setup with several modern sources, filters, transitions and encoders using StreamFX! With several performant and flexible features, you will discover new ways to build your scenes, better ways to encode your content, and take your stream to the next level. Create cool new scenes with 3D effects, add glow or shadow, or blur out content - endless choices, and all of it at your fingertips.

More Information
CI Status Crowdin Status

Support the development of StreamFX!

Patreon

Maintaining a project like StreamFX requires time and money, of which both are in short supply. If you use any feature of StreamFX, please consider supporting StreamFX via Patreon. Even as little as 1€ per month matters a lot, plus you get a number of benefits!

obs-streamfx's People

Contributors

brandonedens avatar carlosbaraza avatar catb0t avatar coolsoftrf avatar cpyarger avatar danimo avatar dghodgson avatar germanaizek avatar kilinbox avatar nuudlman avatar oncorporation avatar pencels avatar radegast-ffxiv avatar rmnvgr avatar tt2468 avatar tytan652 avatar vainock avatar vantaboard avatar wpettersson avatar wwj402 avatar xaymar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obs-streamfx's Issues

Particle Emitter Source

Allow designers to create a full particle source including all definition entirely inside of OBS Studio.

Race Condition crash with obs_shutdown in Source Mirror

Describe the bug
A rare crash may be observed if there is audio data and obs_shutdown is running at the same time.

To Reproduce

  1. Add a Source Mirror
  2. Set it to mirror an audio source and enable audio.
  3. Exit obs.
  4. Occasionally this will crash.

Expected behavior
OBS will correctly exit.

Desktop (please complete the following information):

  • Operating System: Windows 10
  • Kernel Version: 1809 Build 17763.55
  • Plugin Version: master

Additional context
The crash happens because aud and aoi are not checked for nullptr and instead just used.

Short OBS freezes cause increasing delay the longer encoding is active

Description

In the current implementation (0.3.0pre2), whenever OBS encounters an unusual freeze, frames are not skipped and instead queued up resulting in either running out of memory or delaying all further encoded frames.

Expected Behavior

Frames should be skipped if OBS is frozen.

Reproduction Steps

  1. Start encoding.
  2. Cause OBS to freeze using some method (debugger breakpoint works).
  3. Delay all further encoding by a certain amount.
  4. Repeat.

System Information

  • Software Version: 0.3.0pre2 / master
  • Operating System: Windows 10
  • Kernel Version: 1903 18362.356
  • CPU: AMD Zen1 ThreadRipper 1950X
  • GPU: Nvidia GeForce RTX 2080 Ti FE
  • RAM: 64GB

Checklist:

  • I have read the contribution guidelines.
  • I can reproduce the issue with the exact reproduction steps I have provided.
  • The issue appears on all of my systems that can run this software.

Crash with audio and Media Source in Source Mirror

Describe the bug
OBS Stream Effects will crash if the referenced audio source is destroyed before the audio mirror is destroyed.

To Reproduce

  1. Add a Source Mirror and Media Source.
  2. Set the Media Source to contain video and audio data.
  3. Point it at a Media Source and enable audio
  4. Delete the Media Source
  5. Occasionally crash

Expected behavior
OBS Stream Effects doesn't crash.

Desktop (please complete the following information):

  • Operating System: Windows
  • Kernel Version: 1809
  • Plugin Version: master

Additional context
Crash happens due to this->m_audio_capture never being cleared, only replaced.

Source Mirror: Improve Rescaling

Is your feature request related to a problem? Please describe.
Rescaling with Source Mirror is currently extremely limited and doesn't work well in all cases.

Describe the solution you'd like
Additional options that act like the obs Scene Transform options.

Improve Rendering Speed using Single Tri Fullscreen Rendering

Is your feature request related to a problem? Please describe.
Pixelshader effects are ~3% slower than their Compute counterparts despite accessing the same resource. The slow down is worse on AMD, where it might be as much as ~15% on a Radeon VII, and ~30% on a Radeon RX 480.

Describe the solution you'd like
Use single-tri rendering, see this PR: obsproject/obs-studio#1911

Describe alternatives you've considered
Compute Shaders, but they are too heavy and don't really work real time.

Random Filters Dialog freeze with Source Mirror and Audio

Describe the bug
A previously though fixed bug reappeared, although much rarer. It is tied to Source Mirror with Audio Mirroring enabled.

To Reproduce
Steps to reproduce the behavior:

  1. Add any Audio Source
  2. Add a Source Mirror, set it to the Audio Source and enable Audio Mirroring
  3. Open the Filters dialog on either the Audio Source or Source Mirror
  4. ~0.2% chance to freeze.

Expected behavior
Filters Dialog should open without freezing.

Desktop (please complete the following information):

  • Operating System: Windows 10
  • Kernel Version: 1809
  • Plugin Version: 0.6.1

New Blur Filters

Is your feature request related to a problem? Please describe.
Gaussian and Box blur currently just take too much GPU to render even in optimized scenarios, so a faster, equally visually pleasing alternative is needed.

Describe the solution you'd like
An implementation of Kawase and Dual Kawase Blur, which approximate Gaussian Blur without needing the extreme calculation cost of it.

Additional context

Adding a 2nd blur filter to a group hangs or crashes OBS

Description

When attempting to add a second Stream Effects Blur filter to an OBS source, under certain conditions it will cause the program to livelock and spin "Not Responding" forever, or in some circumstances immediately crash to desktop.

When this problem occurs, OBS may or may not have written the scene collection configuration out to disk yet. If it did not, then all OBS scene configuration since the last clean exit is lost. If OBS did write it out to disk, then when you restart OBS it tries to load the same scene collection and the active scene has 2 blurs which immediately causes OBS to crash again. You have to hand edit the scene collection JSON file to remove the 2nd blur, or manually remove the scene collection from the configuration in order for OBS to be able to start without crashing.

Screenshot N/A. I do not have a crash log as it usually live-locks "Not Responding" and does not produce a crash. OBS will sit there hung forever until the program is forcibly terminated via Task Manager or a reboot.

Expected Behavior

To add a second blur filter configured differently than the first one without program instability.

Reproduction Steps

With a fresh OBS installation, a new scene collection with a single scene with a group with a single source, adding a Gaussian directional blur filter, then attempting to add a second blur filter will hang OBS and/or crash to desktop as soon as you choose Blur from the "Add filter" menu.

The above description is just a usable simplified reproduction case that triggers the problem. The actual usage case the problem was originally discovered was a more elaborate filter chain with a blur near the start and a blur desired at the end to soften the results of the rest of the filter chain. I created a clean setup with minimal test case to confirm reproduction. If necessary I can do more testing to try to help narrow down more specific circumstances in which it occurs.

System Information

  • Software Version: 24.0.3
  • Operating System: Windows 10 x64 1809
  • Kernel Version: 1809
  • CPU: Intel i7 7700HQ (laptop)
  • GPU: Nvidia 1050 Ti 4GB
  • RAM: 16GB

Checklist:

  • I have read the contribution guidelines.
  • I can reproduce the issue with the exact reproduction steps I have provided.
  • The issue appears on all of my systems that can run this software.

Blur effect not showing up in OBS filters. How do I install the plug-ins?

Hello Xaymar, could you please help me by telling me how to install the plug-ins? I tried placing the files in both "C:\Program Files\OBS\plugins" and "C:\Program Files (x86)\OBS\plugins" folders but still no luck. I can't get the blur filter to show up in OBS. I'm using OBS 21.0.1 (64bit, windows).

Greetings

Dynamic Mask Filter

A filter that (like Image Mask) allows specifying and input region, image, source or scene, a color multiplier, alpha multiplier and final value multiplier and then masks out part of the underlying source dynamically.

Implement full custom Shader support

Description

Allow the user to load any .effect file into OBS and use as a Source, Filter or Transition. The UI should update accordingly and help the user use their shader as much as possible with the limited OBS API that we have.

For example, a user could load a custom edge detection filter and use the output of that filter for other purposes, or as the actual effect they want. Or they could implement some sort of inverse masking, various reactions to audio, or similar.

Features:

  • Parameter Types
    • bool
    • float, float2, float3, float4
    • int, int2, int3, int4
    • texture2d
  • Advanced Parameter Features
    • Type override
    • Array size override
  • Parameter UI Customization:
    • Visibility Toggle (hide from user)
      • Automation Toggle (hide from libobs)
    • Entry Name
    • Entry Description
    • Value Suffix (where applicable)
    • Value Min/Max Limits (where applicable)
      • Adjustable Per Element
    • Scaling Value (Allows more accurate Min/Max/Step) (where applicable)
      • Adjustable Per Element
    • Step Value (where applicable)
      • Adjustable Per Element
    • Enumerations (where applicable)
      • int, int2, int3, int4
      • float, float2, float3, float4
      • texture1d, texture2d, texture3d, textureCube
  • Default Inputs
    • float4 ViewSize: x = Width, y = Height, z = 1/Width, w = 1/Height. Width and Height are the final rendering size.
    • texture2d InputA: Texture holding the input data for the filter or transition, in the original source size before the shader was applied. (Available in: Filters, Transition)
    • texture2d InputB: Texture holding the target transition data for the transition, in the original source size before the shader was applied. (Available in: Transitions)
    • float4 Time: x = Time in seconds, y = Progress in current second, z = Total seconds elapsed (full seconds only), z = random value.
    • float4x4 Random: Random values per frame.
    • float4x4 RandomPerInstance: Random values generated at the time of shader load, never changing. Useful as a seed.
    • float4x4 RandomPerActive: Random values generated whenever the shader enters active state.
    • float4x4 RandomPerShow: Random values generated whenever the shader enters showing state. Might be the same as active.

Checklist:

  • This feature is necessary and can't be done through other means.
  • I am willing to hire/pay someone to implement this.

Reduce warnings in GCC and Clang++

Describe the bug
There are a ton of warnings currently output by clang++ and gcc, ranging from actual errors in behavior to simple cosmetic changes. Work is being done to fix this in clang-compatibility. This may also be necessary for Linux and MacOS support (See #27 and #13).

Obs freezes after installation

#57 # Description
Obs freezes after installing obs-stream-effects as seen in this screenshot:
https://prnt.sc/ppqbvm

System Information

  • Operating System: Windows 10 64 bit
  • CPU: 4790k
  • GPU: gtx970
  • RAM: 8gb

If you need more info let me know thanks

Source Mirror: Crash on exit

Describe the bug
OBS Studio occasionally (1 in 5 runs) crashes on exit due to a source being destroyed in the wrong order by OBS Studio.

To Reproduce
Steps to reproduce the behavior:

  1. Add a Source Mirror
  2. Point it at some source
  3. Restart OBS Studio
  4. Point it at another Source
  5. Crash

Expected behavior
OBS Studio should quit normally.

Desktop (please complete the following information):

  • Operating System: Windows
  • Kernel Version: 1809
  • Plugin Version: 73b96b8

Failure to render Preview or Mixer

obs-stream-effects: 0.4.1
os: windows 10
obs: 21.0.1 64-bit and 32-bit

This'll probably be too vague to take action on, but perhaps others will have a similar issue when updating to obs 21.0.1

Visual reference: https://i.imgur.com/ce3lZMz.png

OBS fails to load the preview and mixer (just white boxes in their stead).
Starting a recording fails to generate output and doesn't advance from 'Stopping Recording' when cancelled.
Program persists in background when forcefully quit.
Problem occurs with both 32-bit and 64-bit installations and does not occur when the plugin is removed.
No stream-effects have been applied, this is only with the plugin present.
Dumped the profiles/scene collections directory and added a single image. Was able to add sources and have them logged, I'm able to then interact with where they should be on the preview and get context menus. I'm also able to see audio devices when I pop open the mixer, I'd imagine it's drawn on demand.
Disabling preview then re-enabling it freezes obs.

19:11:46.169: CPU Name: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
19:11:46.169: CPU Speed: 2592MHz
19:11:46.169: Physical Cores: 4, Logical Cores: 8
19:11:46.169: Physical Memory: 16233MB Total, 11377MB Free (NOTE: 32bit programs cannot use more than 3gb)
19:11:46.169: Windows Version: 10.0 Build 16299 (revision: 192; 64-bit)
19:11:46.169: Running as administrator: false
19:11:46.169: Aero is Enabled (Aero is always on for windows 8 and above)
19:11:46.169: Windows 10 Gaming Features:
19:11:46.169: 	Game Bar: Off
19:11:46.169: 	Game DVR: Off
19:11:46.169: 	Game DVR Background Recording: Off
19:11:46.180: Sec. Software Status:
19:11:46.181: 	Windows Defender Antivirus: enabled (AV)
19:11:46.181: 	Windows Firewall: enabled (FW)
19:11:46.181: 	Windows Defender Antivirus: enabled (ASW)
19:11:46.181: Portable mode: false
19:11:46.193: OBS 21.0.1 (windows)
19:11:46.193: ---------------------------------
19:11:46.194: ---------------------------------
19:11:46.194: audio settings reset:
19:11:46.194: 	samples per sec: 44100
19:11:46.194: 	speakers:        2
19:11:46.200: ---------------------------------
19:11:46.200: Initializing OpenGL...
19:11:46.832: OpenGL version: 4.6.0 NVIDIA 388.16
19:11:46.832: Warning: The OpenGL renderer is currently in use.  On windows, the OpenGL renderer can decrease capture performance due to the lack of specific features used to maximize capture performance.  The Direct3D 11 renderer is recommended instead.
19:11:46.922: ---------------------------------
19:11:46.922: video settings reset:
19:11:46.922: 	base resolution:   3840x2160
19:11:46.922: 	output resolution: 1280x720
19:11:46.922: 	downscale filter:  Bicubic
19:11:46.922: 	fps:               30/1
19:11:46.922: 	format:            NV12
19:11:46.923: Audio monitoring device:
19:11:46.923: 	name: Default
19:11:46.923: 	id: default
19:11:46.923: ---------------------------------
...
19:11:47.275: device_pixelshader_create (GL) failed
19:11:47.275: [Stream Effects] <filter-blur> Loading effect 'Gaussian Blur' (path: '../../data/obs-plugins/obs-stream-effects/effects/gaussian-blur.effect') failed with error(s): Generic Error
...
19:11:48.308: ---------------------------------
19:11:48.308: ==== Startup complete ===============================================
19:11:48.308: Service '' not found
19:11:48.310: All scene data cleared
19:11:48.310: ------------------------------------------------
19:11:48.469: WASAPI: Device 'Speakers / Headphones (Realtek High Definition Audio)' initialized
19:11:48.500: WASAPI: Device 'Microphone (Realtek High Definition Audio)' initialized
19:11:48.514: Switched to scene 'Scene'
19:11:48.514: ------------------------------------------------
19:11:48.514: Loaded scenes:
19:11:48.514: - scene 'Scene':
19:11:48.514:     - source: 'Image' (image_source)
19:11:48.514: ------------------------------------------------

Building as plugin on Linux: templates with C linkage

Describe the bug

Xaymar commented on Apr 26, 2018
Standalone builds however currently require Windows, as you have already discovered. So in order to build it on Linux and Mac, you need to include it as a plugin in obs-studio.

Does that mean that on Linux, I have to compile this as part of an obs-studio build?

I'm compiling directly on Ubuntu (not part of an OBS build), and I don't get @aliksend's error:

CMake Error:
  Error evaluating generator expression:

    $<TARGET_PDB_FILE:obs-stream-effects>

  TARGET_PDB_FILE is not supported by the target linker.

instead it's some mixing-up of C and C++ headers / code

https://gist.github.com/catb0t/a0ef26bd65612ec1f220579f9e609fc9

the first main error is

In file included from /usr/include/c++/8/chrono:40,
                 from /home/cat/Downloads/obs-stream-effects/source/filter-blur.h:24,
                 from /home/cat/Downloads/obs-stream-effects/source/plugin.cpp:21:
/usr/include/c++/8/limits:317:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
           ^

the other one, which is repeated the most, is

In file included from /usr/include/c++/8/bits/move.h:55,
                 from /usr/include/c++/8/bits/stl_function.h:60,
                 from /usr/include/c++/8/functional:49,
                 from /home/cat/Downloads/obs-stream-effects/source/plugin.h:21,
                 from /home/cat/Downloads/obs-stream-effects/source/strings.h:21,
                 from /usr/include/string.h:431,
                 from /home/cat/Downloads/obs-stream-effects/build/libobs-src/include/util/bmem.h:22,
                 from /home/cat/Downloads/obs-stream-effects/build/libobs-src/include/obs.h:21,
                 from /home/cat/Downloads/obs-stream-effects/build/source/module.cpp:1:
/usr/include/c++/8/type_traits:71:3: error: template with C linkage
   template<typename _Tp, _Tp __v>
   ^~~~~~~~
In file included from /usr/include/features.h:424,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdint.h:26,
                 from /usr/lib/gcc/x86_64-linux-gnu/8/include/stdint.h:9,
                 from /home/cat/Downloads/obs-stream-effects/build/libobs-src/include/util/c99defs.h:72,
                 from /home/cat/Downloads/obs-stream-effects/build/libobs-src/include/obs.h:20,
                 from /home/cat/Downloads/obs-stream-effects/build/source/module.cpp:1:
/usr/include/string.h:28:1: note: ‘extern "C"’ linkage started here
 __BEGIN_DECLS
 ^~~~~~~~~~~~~

Those go on for quite some time until the build fails.

To Reproduce
Steps to reproduce the behavior:

  1. git clone Xaymar/obs-stream-effects
  2. mkdir build; cd build; cmake ..; make

Expected behavior
Project builds.

Desktop

  • Operating System: Ubuntu 18.10
  • Kernel Version: Linux 4.18.0-13-generic
  • Plugin Version: 0.4.2.139 (HEAD)
  • OBS Studio (system installation): 22.0.2 (linux)

Additional context
I spent 3 hours trying to figure this out, but I can't even change the error output. I can compile other (C-source) OBS plugins and I have a working C++ compiler with C++ STL / headers.

  • commenting out extern "C" in source changes nothing
  • including <obs/....h> (system-wide OBS headers from libobs-dev) changes nothing

It seems like this project manages to make C source files include C++ source files, while __cplusplus is defined, so the extern "C" is overridden and templates become declared with C linkage. No idea how to make it compile though.

make error: ‘_Ref_count_obj’ is not a class template

Describe the bug
Working with v0.5.0 source code: https://github.com/Xaymar/obs-stream-effects/archive/0.5.0.tar.gz in an Archlinux environment:

cmake: https://pastebin.com/raw/xAdbjYrh
make: https://pastebin.com/raw/SwRUYvaA

obs-stream-effects-0.5.0/source/obs/obs-source-tracker.hpp:37:21: error: ‘_Ref_count_obj’ is not a class template
   friend class std::_Ref_count_obj<obs::source_tracker>;

To Reproduce

  1. cmake
  2. make

Expected behavior
Source code should compile in a GNU/Linux environment

Desktop (please complete the following information):

  • Operating System: Linux
  • Kernel Version: 4.19.34

Barrel Distortion of Sources

Is your feature request related to a problem? Please describe.

I want to emulate the perceived distortion of viewing an image on old, curved CRT monitors.

Describe the solution you'd like

I would like the ability to apply this distortion to a video source with separate inputs for the x and y axes. It would be ideal to be able to apply the distortion after things like scaling and cropping.

Information on the distortion algorithm can be found here:
https://stackoverflow.com/questions/6199636/formulas-for-barrel-pincushion-distortion
http://sprg.massey.ac.nz/pdfs/2003_IVCNZ_408.pdf

Describe alternatives you've considered

I've considered using a displacement filter to simulate this look but the results haven't been as desirable and as easy to iterate as simple numerical inputs.

Additional context

https://publiclab.org/system/images/photos/000/021/421/large/Screen_Shot_2017-08-25_at_11.40.41_AM.png

The image on the left is the result I am trying to achieve. The image on the right would be the original source.

Wrong Apple ProRes Profile

First of all: Thank you for your great work!
2019-12-04 16_31_52-Aktuelle Medieninformationen
2019-12-04 16_32_01-Settings

Description

If I use your encoder to record in Apple ProRes, the final file will have the wrong profile "Apple ProRes 422 HQ (apch)" in the codec- / metainfo regardless my profile selection in OBS (e.g LT, Standard, etc.). That's why my Adobe Premiere Pro 2019 crashs if I try to import the file with the wrong profile in the codec-/metainfo. I tried it on 2 different systems with the same settings and the same result.

Expected Behavior

File with the selected profile in the codec-/metainfo.

Reproduction Steps

OBS 24.0.3 with OBS ffmpeg Encoder 0.4.0
Output => Recording
Format: mov
Encoder: Apple ProRes (prores_aw)
Profile: 422 Light/LT (APCS)
Resolution: [email protected]

FFMPEG OPTIONS
no custom settings
GPU: 0
Override Color format: yuv422p10le
number of threads: 0
Standard Compliance: Normal

System Information

  • Software Version: OBS 24.0.3 with OBS ffmpeg Encoder 0.4.0
  • Operating System: Windows 10
  • Kernel Version: 1903 Windows 10
  • CPU: AMD Ryzen 9 3900X
  • GPU: ASUS RTX 2080 Ti
  • RAM: 32GB (2x16GB) G.Skill Trident Z RGB 3000MHz CL14

Checklist:

  • I have read the contribution guidelines.
  • I can reproduce the issue with the exact reproduction steps I have provided.
  • The issue appears on all of my systems that can run this software.

Gaussian Blur is not using the correct curve width

Describe the bug
Gaussian Blur currently acts like a softer Box blur due to the fact that the curve width is larger than the filter width.

To Reproduce
Steps to reproduce the behavior:

  1. Add a Blur Filter
  2. Set it to Gaussian Blur
  3. Set the width to 25px
  4. See that it doesn't act like proper gaussian blur.

Expected behavior
Gaussian Blur should result in a soft gradient.

Screenshots
https://cdn.discordapp.com/attachments/374636084883095554/540582950094372875/unknown.png
image

Origin configuration for the 3D transform filter

Description

A very useful feature would be to be able to configure where the origin/anchor point is in the 3D transform filter, like you can do with the OBS built in 2D transform. This would for example make it easy to line up say... the top left corner of a source to a specific pixel in OBS, and anchor that corner, then all the other controls would be relative to that origin, making it easy to build a multi-source 3D image.

One usage case would be tesselating an OBS source into N pieces to then manually 3D transform them to a non-planar surface wrapping around something. For example one of the many "newsroom" backgrounds from stock photo sites which show a newsroom with chroma keyed fake TV screens, some of which wrap around multiple walls and things. By having a configurable origin it would make placing things side by side in 3D space without any gaps much easier.

Customizeable origin could be configured via x, y, z values or via a mechanism that mimics the OBS 2D transform anchoring/centering etc. controls, or perhaps both depending on which is most convenient for a given application.

Thanks for your consideration!

Checklist:

  • I have read the contribution guidelines.
  • This feature is necessary and can't be done through other means.
  • This feature does not break existing functionality.
  • I am willing to hire/pay someone to implement this.

Audio Ducking Filter

This filter would allow you to "duck" the audio levels of a channel when another channel is louder than a minimum dB number. May also support physical device ducking for Virtual Audio Cable or similar.

Blur quality

The blur effect requires too much processing power on higher radii. The best solution for this currently is downscaling the source, blurring the downscaled image and then scaling it back to original size. This can be implemented in a much more optimized fashion in the plugin itself by just discarding pixels selectively, reducing the amount of calculations and making the filter faster at a barely noticeable quality decrease.

Source Mirror keeps an additional reference to the original Source

Describe the bug
If Source Mirror is used and saved into a config file, the next time OBS Studio is started there will be an extra reference to the mirrored Source. This reference will never be released.

To Reproduce

  1. Add a Source Mirror
  2. Configure it to mirror any source.
  3. Restart OBS Studio without crashing (hopefully)
  4. Try and get OBS Studio to release the mirrored source.
  5. Fail because the mirrored source can't be released as it has too many references.
  6. Crash on exit

Expected behavior
Sources should be cleaned up as soon as they are no longer used. There should not be an additional reference to a source in this case.

Desktop (please complete the following information):

  • Operating System: Windows
  • Kernel Version: 1809 17763.253
  • Plugin Version: f910312

Linux local installation is not supported

Describe the bug
with CMAKE_INSTALL_PREFIX=/home/cat/.config/obs-studio/plugins, make install (or make install/local) the plugin isn't loaded because its installation is not correct.

The actual tree in .config/obs-studio/plugins:

~/.config/obs-studio/plugins
├── data
│   └── obs-plugins
│       └── obs-stream-effects
│           ├── effects
│           │   ├── blur.effect
│           │   ├── color-conversion.effect
│           │   ├── displace.effect
│           │   ├── mask.effect
│           │   ├── mipgen.effect
│           │   ├── sdf-generator.effect
│           │   └── sdf-shadow.effect
│           ├── filter-displacement
│           │   ├── disp-stretch-middle.png
│           │   └── neutral.png
│           ├── locale
│           │   ├── en-US.ini
│           │   └── zh-CN.ini
│           ├── shaders
│           │   └── filter
│           │       └── example.effect
│           └── white.png
├── obs-plugins
│   └── 64bit
│       └── libobs-stream-effects.so

The correct tree that results in the plugin loading is

~/.config/obs-studio/plugins
├── obs-stream-effects
│   ├── bin
│   │   └── 64bit
│   │       └── libobs-stream-effects.so
│   └── data
│       ├── effects
│       │   ├── blur.effect
│       │   ├── color-conversion.effect
│       │   ├── displace.effect
│       │   ├── mask.effect
│       │   ├── mipgen.effect
│       │   ├── sdf-generator.effect
│       │   └── sdf-shadow.effect
│       ├── filter-displacement
│       │   ├── disp-stretch-middle.png
│       │   └── neutral.png
│       ├── locale
│       │   ├── en-US.ini
│       │   └── zh-CN.ini
│       ├── shaders
│       │   └── filter
│       │       └── example.effect
│       └── white.png

To Reproduce
Steps to reproduce the behavior:

  1. cmake ..; make; make install
  2. Start OBS
  3. See the plugin isn't loaded

Expected behavior

info: [Stream Effects] Loading Version 0.4.2 (Build 144)
info: ---------------------------------
info:   Loaded Modules:
info:     libobs-stream-effects.so

Desktop:

  • Operating System: Ubuntu 18.10
  • Kernel Version: Linux 4.18
  • Plugin Version: clang-compatibility e921e10 (0.4.2)

Not a huge problem as long as the user knows what the file structure has to be, but it will require distinguishing between a "home folder" installation in .config/obs-studio and an OBS system folder installation.

15 Memory leaks without source mirrors

Describe the bug
Separate to #32 (I think), I'm not using any source mirrors that I'm aware of but OBS reports 15 memory leaks when exiting with the plugin loaded

To Reproduce
Steps to reproduce the behavior:

  1. Stop the plugin from loading
  2. See OBS exit with 0 memory leaks
  3. Make the plugin loaded by OBS again
  4. See OBS exit with 15 memory leaks

Expected behavior
No leaks.

Desktop (please complete the following information):

  • Operating System: Ubuntu 18.10
  • Kernel Version: Linux 4.18
  • Plugin Version: f910312

I'll look into debugging this with Valgrind / ASAN at some point.

Blur Filter leaks Sources

Describe the bug
When a Blur Filter is being used, it can be seen constantly adding a new reference to a source, but never releasing it.

To Reproduce
Steps to reproduce the behavior:

  1. Add a Blur Filter
  2. Open Properties
  3. Enable "Apply A Mask"
  4. Scroll through the Blur Types

Expected behavior
No Sources should be leaked.

Signed Distance Field Effects (Filter) Freezes OBS then crash

Description

I add the Signed Distance Field Effects (Filter) to a scene or webcam or text. OBS Immediately freezes and then I have to force close it (crash it).

Expected Behavior

Signed Distance Field Effects (Filter) works.

Reproduction Steps

Just try out the Signed Distance Field Effects (Filter) on many different sources and one of them should crash.

System Information

  • Software Version: Stream Effects 0.7.0, OBS 23.2.1
  • Operating System: Windows 10 64 bit
  • Kernel Version: 10.0 build 17134
  • CPU: Intel i7-6700
  • GPU: NVIDIA GTX 1070
  • RAM: 16GB

Checklist:

  • I have read the contribution guidelines.
  • [X ] I can reproduce the issue with the exact reproduction steps I have provided.
  • The issue appears on all of my systems that can run this software.

'Source' dropdowns do not update when a Source is renamed

Describe the bug
Sources that use obs::source_tracker aren't updating the source name as expected, causing source lists to suddenly stop working as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Add a blur filter.
  2. Set it to use any source as a mask.
  3. Rename the source it uses as a mask.
  4. Blur filter source mask list will still have the old name.

Expected behavior
The list of sources should be updated with the new name.

Additional context
Fix must be backported to 0.6.x and 0.5.x.

Support for OS X?

Description

I managed to get the effects content where it belongs, but all of the assets for the actual plugin itself don't seem to follow expectations for plugins on mac. I'm completely new to OBS, so it's possible I'm doing something silly, but from my understanding a plugin should have an extension of os

System Information

  • Software Version: 10.14.6
  • Operating System: Mac OS X
  • Kernel Version: N/A
  • CPU: 3.4Ghz intel core i5
  • GPU: Radeon Pro 570 4GB
  • RAM: 64GB 2400 MHz DDR4

Checklist:

  • I have read the contribution guidelines.
  • This is not a bug, crash or generic issue.

How to install on Linux

Sorry, I'm a bit of a newbie to this. How do I install this on Ubuntu? I've tried extracting directly in to ~/.config/obs-studio/plugins and in to a subfolder ~/.config/obs-studio/plugins/obs-stream-filters. What am I doing wrong?
Ubuntu 18.04, OBS Studio 23.2.1 64-bit

Linux and MacOS Standalone Builds

Hi

Thank you for your library.
How difficult is it to compile it for OS X and linux?
I tried to compile it on my mac and got error:

CMake Error:
  Error evaluating generator expression:

    $<TARGET_PDB_FILE:obs-stream-effects>

  TARGET_PDB_FILE is not supported by the target linker.

I think that some platform-specific build configuration required like in obs-studio CMakeLists.txt. But is configuration will be enough or there is some windows-specific code in your library that makes cross-platform more complex?

Thank you

Some text tooltip labels are missing

Checklist:

  • I have read the contribution guidelines.
  • I can reproduce the issue with the exact reproduction steps I have provided.
  • The issue appears on all of my systems that can run this software.

image

Other Options
B-Frame Reference Mode
Key Frames
Interval (hover the 2.00 seconds default)

H264 and HEVC encoders:
H264 and HEVC
Preset
Profile
Level
HEVC
Tier
Rate control options
Rate control mode
Bitrate limits
Target Bitrate
Maximum Bitrate

ProRes encoder
Profile

If you didn't come up with any text for these labels, I can do them and submit a PR

Mathematic Scaling Filter

Is your feature request related to a problem? Please describe.
I have a large number of sources and filters designed for my old retro consoles.
Due to the way I capture them to preserve sharp pixels, I need to apply a very specific aspect ratio correction in OBS. This is a mathematical function that varies from console to console. For example, the SNES requires (H * (8/7)), and the GameCube requires (H * (10/11)).

The issue arises when starting to account for overscan.
For the GameCube, some games are 660x480, some 640x480, some 660x448, and some 640x448. In addition, some games have a 16:9 option.
This means that I need 8 different filters - One for each aspect ratio of each resolution. In addition, this means that should I need to use a different crop for whatever reason, I have to make yet another scaling filter.

Describe the solution you'd like
Ideally, I'd like a mathematic scaling filter with separate boxes for Horizontal scaling and Vertical scaling.
This means instead of having 8 filters, 4 for 4:3 and 4 for 16:6, I can make two filters that are something like this;

1.5x Scaling 4:3
H = (H*(10/11))*1.5
V = V*1.5

1.5x Scaling 16:9
H = ((H*(10/11))*1.5)*(4/3)
V = V*1.5

This would mean that no matter what resolution the input is cropped to, it will scale to the correct size for the respective input. It would save me having to use a ton of filters for each different crop, and everything would guarantee being scaled correctly.

If it's not too complicated, being able to use separate scaling filters for Horizontal and Vertical would also be extremely useful.
In the case of the SNES for example, I want to scale vertically 3x using Point scaling to preserve hard edges, but Horizontally (H*(8/7))*3 using bilinear scaling to blend cleanly. This is fairly easy to do using two separate filters, one for horizontal and one for vertical, but it's not super ideal.

Describe alternatives you've considered
The default scaling filters do not allow for dynamic scaling, aside from their very limited in scope aspect ratio settings. At present, you can only set specific resolutions to scale to, and if the input changes size then it doesn't compensate.
As mentioned above, the only solution at present is to have a huge number of filters for each different resolution and aspect.

Additional Blur Types

I'd like to see the following additional blur type in the future:

Radial Blur

This type of blur is basically just rotating the original source around the center or another point. It creates the effect that you get when you rotate a camera around the axis of the lens.

Zoom Blur

A type of blur that looks like forward motion is happening due to being stronger on the edges than the center.

Directional Blur

A type of blur that looks like directional motion (X, Y).

Blur Filter allow a bluring map/mask

I have a great idea (in my opinion). In addition to restricting the blur to a region #12. I think it would be really useful and should provide everything what you possibly could need for setting a region to blur (On the condition that this would be possible).

I thought of an image (mask) like the displacement map, there are "pixels" set which would blur and which are not. Like white for 100% and black for 0% blur (speak: no blur). I'm not quite sure if it should include the shades of gray for setting something like 50% blur (Like a manual feather).


Blur mask example


This image would be for a 1920x1080 canvas. It maybe should be possible to scale the mask/map up or down for different canvas sizes.

I'm not really in image processing, that's why I can't judge how possible this is. But I thought this would be a handy idea which would serve a solution for every purpose you could possibly need for setting a region.

Tell me what do you think about this.

3D Transform squishes/stretches async Sources

Describe the bug
When applying 3D Transform to an async source without a proper size (such as during loading or initialization of OBS Studio), the filter will squish or stretch the source.

To Reproduce

  1. Add a Video Capture Source
  2. Add a 3D Transform Filter with random settings to that Video Capture Source
  3. Close OBS Studio
  4. Open OBS Studio

Expected behavior
The Source should not be squished.

Screenshots
image

Desktop (please complete the following information):

  • Operating System: Windows 10
  • Kernel Version: 1809
  • Plugin Version: Build 17763.292

Linux Build Broken

Current master seems to not build on linux. Using gcc-8.2.0:

[  6%] Building CXX object CMakeFiles/obs-stream-effects.dir/source/plugin.cpp.o
In file included from /home/joe/obs-stream-effects/source/plugin.cpp:21:
/home/joe/obs-stream-effects/source/filter-blur.hpp:62:22: error: ‘_Ptr_base’ is not a class template
    friend class std::_Ptr_base<filter::blur::blur_factory>;
                      ^~~~~~~~~
/home/joe/obs-stream-effects/source/filter-blur.hpp:62:22: error: ‘_Ptr_base’ in namespace ‘std’ does not name a type
/home/joe/obs-stream-effects/source/filter-blur.hpp:62:22: note: suggested alternative: ‘_Mutex_base’
    friend class std::_Ptr_base<filter::blur::blur_factory>;
                      ^~~~~~~~~
                      _Mutex_base
/home/joe/obs-stream-effects/source/filter-blur.hpp:62:4: error: friend declaration does not name a class or function
    friend class std::_Ptr_base<filter::blur::blur_factory>;
    ^~~~~~
/home/joe/obs-stream-effects/source/filter-blur.hpp:90:60: error: ‘const’ qualifiers cannot be applied to ‘std::__cxx11::string&’ {aka ‘std::__cxx11::basic_string<char>&’}
    std::string& const get_translation(std::string const key);
                                                            ^
In file included from /home/joe/obs-stream-effects/source/plugin.cpp:22:
/home/joe/obs-stream-effects/source/filter-displacement.hpp:46:22: error: ‘_Ptr_base’ is not a class template
    friend class std::_Ptr_base<filter::displacement::displacement_factory>;
                      ^~~~~~~~~
/home/joe/obs-stream-effects/source/filter-displacement.hpp:46:22: error: ‘_Ptr_base’ in namespace ‘std’ does not name a type
/home/joe/obs-stream-effects/source/filter-displacement.hpp:46:22: note: suggested alternative: ‘_Mutex_base’
    friend class std::_Ptr_base<filter::displacement::displacement_factory>;
                      ^~~~~~~~~
                      _Mutex_base
/home/joe/obs-stream-effects/source/filter-displacement.hpp:46:4: error: friend declaration does not name a class or function
    friend class std::_Ptr_base<filter::displacement::displacement_factory>;
    ^~~~~~
In file included from /home/joe/obs-stream-effects/source/gs-vertexbuffer.hpp:24,
                 from /home/joe/obs-stream-effects/source/filter-shape.hpp:21,
                 from /home/joe/obs-stream-effects/source/plugin.cpp:23:

Using Clang-7:

[  6%] Building CXX object CMakeFiles/obs-stream-effects.dir/source/plugin.cpp.o
In file included from /home/joe/obs-stream-effects/source/plugin.cpp:21:
/home/joe/obs-stream-effects/source/filter-blur.hpp:62:22: error: explicit specialization of non-template class '_Ptr_base'
                        friend class std::_Ptr_base<filter::blur::blur_factory>;
                                          ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joe/obs-stream-effects/source/filter-blur.hpp:62:22: error: no class named '_Ptr_base' in namespace 'std'
                        friend class std::_Ptr_base<filter::blur::blur_factory>;
                                     ~~~~~^
/home/joe/obs-stream-effects/source/filter-blur.hpp:90:17: error: 'const' qualifier may not be applied to a reference
                        std::string& const get_translation(std::string const key);
                                     ^
In file included from /home/joe/obs-stream-effects/source/plugin.cpp:22:
/home/joe/obs-stream-effects/source/filter-displacement.hpp:46:22: error: explicit specialization of non-template class '_Ptr_base'
                        friend class std::_Ptr_base<filter::displacement::displacement_factory>;
                                          ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joe/obs-stream-effects/source/filter-displacement.hpp:46:22: error: no class named '_Ptr_base' in namespace 'std'
                        friend class std::_Ptr_base<filter::displacement::displacement_factory>;
                                     ~~~~~^
In file included from /home/joe/obs-stream-effects/source/plugin.cpp:24:
/home/joe/obs-stream-effects/source/filter-transform.hpp:32:22: error: explicit specialization of non-template class '_Ptr_base'
                        friend class std::_Ptr_base<filter::transform::transform_factory>;
                                          ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joe/obs-stream-effects/source/filter-transform.hpp:32:22: error: no class named '_Ptr_base' in namespace 'std'
                        friend class std::_Ptr_base<filter::transform::transform_factory>;
                                     ~~~~~^
In file included from /home/joe/obs-stream-effects/source/plugin.cpp:25:
/home/joe/obs-stream-effects/source/obs-source-tracker.hpp:37:21: error: explicit specialization of non-template class '_Ref_count_obj'
                friend class std::_Ref_count_obj<obs::source_tracker>;
                                  ^             ~~~~~~~~~~~~~~~~~~~~~
/home/joe/obs-stream-effects/source/obs-source-tracker.hpp:37:21: error: no class named '_Ref_count_obj' in namespace 'std'
                friend class std::_Ref_count_obj<obs::source_tracker>;
                             ~~~~~^

Blending modes for scenes

Would be great if scenes could be layered additively or multiplicatively

Similar to photoshops Screen, Multiply, Overlay, etc. blending modes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.