#plugins-and-tools

1 messages Β· Page 111 of 1

placid turret
#

works perfectly, thanks for the suggestion!

placid turret
#

my main goal right now is just to write pixels to an input source and overlay those on top of my stream as a proof-of-concept, eventually i would like to implement dynamically-updating pixel data, perhaps through a local socket or memory region shared with a tool/daemon i plan to write.

mortal harbor
#

Hey @quiet bramble did you manage to rewrite that rounded rect shader? (No rush btw, just checking up)

quiet bramble
# mortal harbor Hey <@!277094731576770561> did you manage to rewrite that rounded rect shader? (...

I tinkered with it a bit, but changing in a very different direction to the existing shaders, it's one of the things I'll be poking with on and off this week, no idea when I'll have something working the way that I want tho. When I hit the end goal, I'll probably post it here but no idea when that might be. I did find a better way to do this stuff though which is wayyyyyyyyyyyyyyyyyyyyyy less code, and better performance in theory once I get my own thing to work.

#

In short, I found some very cool articles online about approaching things like this (by iq) and I want to wrap my head around it rather than a quick ugly hack.

#

It's using signed distance fields but in an optimized fashion.

mortal harbor
#

Are you referring to blending the edges to make them smoother?

quiet bramble
#

For creating the border itself as well as smoothed edges, with rounded rect but also arbitrary other shapes.

mortal harbor
#

Ah I see:/

#

Alright well let me know you do it

mossy lintel
#

could this possible restriction come from obs side or from system/os itself?

quiet bramble
#

antialiased rounded rect stuffs coming along...

#

I might add an option to give each corner a custom radius also, because More is Moreβ„’

#

Why have a shader with 2 options when you can have 57 options right?

#

Soft edges...

#

Hmm... why not elliptical rect also....

cyan peak
#

if that's in the obs output, it's likely because of chroma subsampling

quiet bramble
#

naw, it's part of the shader πŸ™‚

#

Nice soft skwoooshy inner and outer edges on rounded rect

#

no more retina shredding pixelies! πŸ˜›

#

I'm considering adding options to have other shapes and use as a general mask, circle, n-gon, n-star etc.

#

Why do something simple when you can make it complicated right?

#

Think that's all for tonight, need to save some fun for tomorrow. πŸ˜›

mortal harbor
#

It’s nice, but is it still transparent?

#

For some reason I was having trouble with alpha, the pixel would draw opaque with alpha set anywhere from 1-255

quiet bramble
mortal harbor
#

Oh lovely - and the border isn’t required right?

quiet bramble
mortal harbor
#

Very nice

#

Am I allowed to try it? πŸ‘€

quiet bramble
#

The current shader is still highly experimental with gobs of dev code, spaghetti, and relies on a private library currently. I'm going to continue refining it, clean it up and decouple from my personal library.

mortal harbor
#

Yessir PES_Salute

quiet bramble
#

There are some visual problems occurring with some of the adjustments that I need to figure out, probably a bit of BadMathβ„’

#

It can have an optional opaque inner rectangle instead of the source, and optional opaque external rectangle to replace what gets cut off, (the purple/white in my initial screenshot)

mortal harbor
#

Understandable, I can’t wait for it!
Idea since you’re working with borders too, would you be able to do like a border start and end alpha? Or some kind of drop shadow feature? I just use another drop shadow shader but I wonder if putting it in 1 would be better for performance

quiet bramble
#

The cool thing is that the shape function is independent of the rest of it, so I can add more shapes in the future such as circle, star, heart, etc.

#

The border already has alpha. I am thinking about inner/outer shadow also to explore later

mortal harbor
#

Alrighty

quiet bramble
#

I need to decouple the border's inner/outer softness also

mortal harbor
#

Yeah for sure. For now it would be awesome just to get the smoothed edges!

quiet bramble
#

Currently it is only eating up 1-2% of my 1050 mobile GPU... but it is not optimized yet either.

#

Well, actually it is a bit optimized... there are no conditionals in it.

mortal harbor
#

Yeah honestly I only really care about the smooth edges that would be awesome

quiet bramble
#

It also has a built in crop which wasn't actually intended but hey, free features... πŸ˜›

peak vector
#

I wondered why you experiment with a shaders what a simple image mask could achieve but having automatically generated size and shape is quite nice

quiet bramble
#

It's best to use static image and/or image mask wherever possible for static content as it is lower cost. But for dynamic live content and/or flexibility using shaders can be quite flexible and effective as well, and the lower the cost of the code and the faster the GPU, a lot of shader effects are practically free. So it is a big convenience per se.

autumn hearth
#

Hey guys, I'm currently struggling with a rather unique issue. I'm using Streamlabs for Overlays, however, besides that I only rely on OBS internal functions. Now, my problem is this: I have an image slideshow in my overlay in OBS. On the same spot of that image slideshow, I would like to place the alert box. What I would like to do is, I would like OBS to recognize the alert box gets an alert, and disable/hide the slide show underneath. Is there a way to achieve this? Maybe with the Advance Scene Switcher?

quiet bramble
#

Like, with the shader, you could crop in OBS, and the shader will follow your crop. This also means that if you animate the dimensions of a source using something like move-transition, the shader will track the dimensions of the source also.

mortal harbor
#

Indeed ^

#

More control is always better

quiet bramble
#

So you end up with dynamic results. You could have the camera go from full screen rectangle, shrink and scale down to the corner in a square, and have the border track it and add rounded corners all animated.

#

Gives it a live pro TV look

#

Rather than 1975 πŸ™‚

#

Having said that, 1975 is cool too! Scanimate FTW!

#

πŸ˜›

#

I'd actually like to make some shaders to simulate retro Scanimate type FX.

#

Oh, I didn't mention it but the shader also has built in animation option

#

It can modulate the corner radius currently from 0 to user specified radius, and each corner can have a different radius.

mortal harbor
#

Sounds awesome

quiet bramble
#

Also, the entire source code is about the same size as the original Shaderfilter shader if I remove all the comments and commented out crap and dev crap πŸ™‚

mortal harbor
#

pls keep the comments

quiet bramble
#

junk comments I mean, not documentive ones

#

I should probably turn this into a LUA script for better control over properties and UI when I'm done.

#

Also need to write the vertex shader for adding padding. Currently it is doing an inner border thing rather than outer.

#

That will be a slight bit tricky due to the soft border edges tho, the soft part will have to overlap the opaque source. Will need to think about how to handle that I guess.

#

The fun part will come when I add the smoky border tho πŸ˜›

mortal harbor
#

Pls save that for after you release just the normal working one

quiet bramble
#

I wont be adding that for some time, I have a separate shader for doing a smoky halo around arbitrary transparent source which needs some fixing. Once that's working I can include the smoke in other stuff as I'm doing it as a library.

#

I want to optimize the stuff first tho as some things can add up.

mortal harbor
#

I see

#

The skeletonbow suiteℒ️

quiet bramble
#

It's faster and lower GPU overhead than doing it with existing shaders+filters and hacks tho as was my first solution.

#

The first one used around 20% GPU on my 1050 IIRC, and the shader version uses about 5%

#

There are other optimizations that could be done with some things multi-pass, but that needs to be a custom plugin

#

πŸ™‚

#

Sometimes you just have to take something really simple, and make it overkill just because.

weak escarp
quiet bramble
#

nope, it's homebrew based on iq's SDF examples

#

The animation is done in the shader itself

#

radius *= (sin(elapsed_time * Animate) + 1.0f);

#

although way more coolness could be done with move-transition, and I look forward to having fun with that with it also πŸ˜›

#

and using Move Value to adjust the edge softness etc. would be cool

#

he's got working implementations of them all on Shadertoy also, although I didn't really look at those as the core shape functions are the important bits.

#

He's got 3D versions also, which could be another fun ball of wax sometime.

#

I also need to convert that jigsaw puzzle effect into a shader too, that's using Motion Effect from way way way back when... Want to change it to generate the puzzle in shader, and either use move-transition or built-in anim

#

I can't wait to connect all this stuff with MIDI in Reaper too... gawd that's going to be mental

harsh topaz
#

Good job SB πŸ™‚

mortal harbor
#

can't wait for you to share this!

harsh topaz
#

SB keeps all his shaders hidden away, locked in a chest in a dark basement room.

mortal harbor
#

fmdsjkfhdsjkhfdsjk

#

the tease is strong

#

he's already done exactly what I initially wanted oooh

analog ruin
#

for an all time low, 19.99, you too can subscribe to SB's shader library (monthly fee, conditions apply) smug

mortal harbor
#

noooooooo oooooohGif

quiet bramble
#

hahahahaha πŸ™‚ Be patient! πŸ˜›

thick gale
#

I'm looking for some kind of way to be able to perform Q&A's for streams. But I'm not streaming on Twitch or YT so it can't be reliant on that

mortal harbor
vale vine
#

So with multirtmp I can stream to different platforms at different resolutions?

analog ruin
#

I think so. It has the scaling option, right?

vale vine
#

Looks like it

#

Excited to test out this fiber connection when it gets connected tomorrow

autumn hearth
#

Hey guys, asking again. I'm using Streamlabs for Overlays, however, besides that I only rely on OBS internal functions. Now, my problem is this: I have an image slideshow in my overlay in OBS. On the same spot of that image slideshow, I would like to place the alert box. What I would like to do is, I would like OBS to recognize the alert box gets an alert, and disable/hide the slide show underneath. Is there a way to achieve this? Maybe with the Advance Scene Switcher?

idle spindle
#

when I run into this trying to build a plugin I need to go to vs developer command prompt and use cl /I <path> to search the obs studio source code esp the libobs folder to get obs.h right

#

well it currently just does this when I try to

#

also anyone knows what this is? it's from the cmakelists.txt of the plugin I forked but it doesn't seem to work

knotty mural
#

Is there a tool that allows to only record a specific application's sound and not others that also works on Linux?

quiet bramble
#

no

knotty mural
#

Sad.

bleak mist
#

ola good afternoon I'm having a problem with the plugin that separates the audio tracks, I install it normally however it does not parace on my OBS someone could help me ?

deft orbit
#

So this is the issue I'm having. This should last for what, 6.5 seconds? 1 second in, 4.5 to stay, and then 1 second out, right?

gilded folio
#

virtual camera plugin seems to be unstable and still crashing obs. What am I missing ? I am using the filter on a scene and not source if that helps.

gilded folio
#

yeah standby

#

where I upload it to?

dark sapphire
#

what exactly happens when you say OBS "crashes"

gilded folio
#

sorry the crash log I sent is wrong... It did not create one today. As soon as I apply the filter on my sceen obs locks up. Have to end task obs. Let me test with other sources and scenes. Nope obs will not launch with the latest virtual camera plugin installed.

jolly pike
#

Hey friends, got a question: is there a plugin out there for setting up Discord video calls on OBS with separate audio? (for context, I know that using an NDI plugin allows this sorta thing for Skype calls, so I was wondering if that's something I can set up for Discord or even Zoom as well?)

hard jay
#

Discord doesn't separate audio, so not possible unfortunately.

#

A lot of people use vdo.ninja for those kinds of use cases right now

gilded folio
rich sage
#

someone please help, after installing a win capture audio my display and window capture are completely missing from sources

jolly pike
mortal harbor
#

the VLC plugin is skipping media files

rich sage
#

display capture and window capture have disappeared please help

dark sapphire
rich sage
#

your amazing!

gilded folio
#

yeah I think the virtual cam filter plugin needs looking at again since it was updated before OBS 27.2.3

hard jay
gilded folio
hard jay
#

Just checking cause one will probably never be updated again :p

gilded folio
dark sapphire
swift haven
#

Is there a filter that makes the screen look like it's cracked and broken?

glass trail
quiet bramble
noble hollow
#

Hey does anyone know where to find filters that are compatible with OBS?

dark sapphire
#

what kind of filters?

mortal harbor
#

ok i tying to fix obs with youtube chat it not working

noble hollow
#

Like softening filters, snapchat filters etc

dark sapphire
quiet bramble
#

!plugins

oblique yewBOT
quiet bramble
#

The StreamFX and OBS Shaderfilter plugins are among the most popular for adding filter type functionality to OBS. StreamFX has a blur filter which is what you'd need for softening a source. (Mind you if using such filters with static images or background video content, that should be done using photo manipulation or video editing software instead to avoid GPU resource usage)

strong tulip
warm oriole
#

Is this any different than a for loop on a single update per source? - it appears not but i wanted to confirm
i want to update multiple text sources at one single time

warm oriole
#

also feel like an dummy for not knowing this, but how do i use that execute batch command?
i dont see any examples.. Im connected to the websocket and am getting heartbeats...
Ive tried a python lib shown on the socket docs and its samples, none of them work at all

placid turret
#

πŸ‘‹ howdy. i'm writing a plugin with the intent to have it render arbitrary graphics into a obs source. currently trying to understand the obs_source_frame type, which i suspect is the type i need to generate video frames using obs_source_output_video. are there any good resources on understanding this? maybe a simple plugin that does something similar that i can take a look at?

placid turret
#

hmm i am looking at the plugins/linux-capture/xhsm-input.c and see that it's using gs_draw_sprite, maybe that's what my plugin should be using also

warm oriole
#

trying to update textGDI and am having error returned saying Your request type is not valid.
I am using simpleobsws for python

     
    req = simpleobsws.Request('SetTextGDIPlusProperties', {'source': "Test Text GDI", 'text': "Test Text GDI"})
    ret = await ws.call(req)
    print("")
    print(ret)
placid turret
#

hmm, i think i see the difference between obs_source_output_video and obs_source_draw/gs_source_draw. the former doesn't need to be called in video_render (looking at the implementation of v4l2 input where it is called in a loop from a thread) whereas the latter is "synchronous" ie needs to be called in a video_render method πŸ€”

#

i think for my use case it would be easier not to have to think about video_render

mortal harbor
#

How do you print/log something to the log viewer in shader files?

#

hello guys, I am new to streaming, I am streaming with ONE screen. So i encounter issue to display the chat on my game! I love the chat overlay done by streamlabs, that u can add in obs studio. but this overlay is added to the stream. I would like to get the same exactly the same on top of my game. Do you guys know if it's possible? I tried to use Restream (freely) but those messages never disappeared from the chat box, so they are displayed continuously on top of my game, which is not I want because I need to get the same render as overlay on top of stream. I seek help and I thanks anyone that have a viable solution for me in advance! πŸ™‚

#

I'm trying printf() but obs just fails with this:

17:43:54.108: Pass (0) <> missing pixel shader!
17:43:54.108: [obs-shaderfilter] Unable to create effect. Errors returned from parser:
17:43:54.108: (None)```
shadow saffron
#

are there any plugins that can capture the sound from a separate window?

oblique yewBOT
quiet bramble
#

It's a common enough tool that people ask for, and while it doesn't really fit into OBS, it is a requested feature on the OBS website so not out of the realm of them adding something in the future, but probably not super high priority, especially with other software that can be used I guess.

paper barn
mortal harbor
#

Hi, is there a plugin like the Nvidia broadcast noise removal for video? I would like to hide some of my skin blemishes (without makeup) without going into personal detail about my skin problems.

quiet bramble
#

Would require computer vision facial recognition, and ML to train what are undesireable elements within and what to do. I'd suspect it'd be a real GPU melter. πŸ™‚

#

An alternative could be vtuber software where you completely replace your real image with digitally generated CGI character that tracks your movement, which seems to be a very popular thing.

#

I imagine within 10 years we'll have stuff like that be available commonly and probably software to change the color of our eyes, hair and other stuff live.

#

AMD is allegedly working on something (dunno if it is available) that can track your eyes and make them always look at the camera even if you look away. This is good for someone doing talking head reading from a teleprompter or similar who wants their eyes to remain on camera to build more connection with audience.

#

Hardware-wise, current gen hardware could do all of these things, but it's more of a matter of "who is going to program this, and what incentive do they have to do it" πŸ˜›

analog ruin
#

maybe you could with a bit of work create your own in their "snap lens studio" or whatever its called πŸ˜… Not sure how much work it is

#

keep in mind tho, this will consume your camera, so you wouldnt be able to use it without the snap thing (while its running)

#

not a proper OBS plugin, but it can do what you're asking for

quiet bramble
#

The discussion gave me an idea for a shader tho, not sure if it'd work for this use case but it gave me an idea for removing unwanted noise pixels from a region.

#

Sampling a radius of pixels around the current one, keeping track of those with a particular range of hue, and if the majority of pixels within a given radius are of that correct hue, automatically making the rest of them the same hue, thus removing small amounts of off-color noise from a given area.

#

This could also potentially smooth out noise in posterized images if it works well.

#

(a problem that has bothered me forever)

mortal harbor
mortal harbor
mortal harbor
analog ruin
mortal harbor
analog ruin
#

Oh wow, didn't know lol. Lucky us then :D

warm oriole
ancient matrix
#

does anyone have experience with Advanced Scene Switcher? im having trouble getting "video exactly matches" to work.

late girder
#

hello everyone! i have one little problem with Multi-RTMP-plugin on mac.
I install it and dont show up on dock menu. I use it on windows and it work fine.

pulsar turtle
#

hey peeps im trying to use the record source plugin and it just doesnt save the webcam at all. I've downloaded the most recent 0.3.0 file and installed it but is there a way to check if ive done it properly?

#

also, do it matter if my webcam is grouped in the sources?

pulsar turtle
#

OH and now i cant delete the source record it just crashes everytime i try lol

pulsar turtle
#

hmmm not it's making OBS crash all the time. interesting

harsh topaz
# pulsar turtle hmmm not it's making OBS crash all the time. interesting

There's some issues with Source Record currently, unfortunately. It shouldn't matter if things are grouped (can't guarantee), you add the filter to whatever source you wish to output.

Please do know though, that if you experience bugs crashes or things simple not working that is something the developer is aware of - but it's a complicated thing to try and fix πŸ™‚

pulsar turtle
#

So far I've got it working and hopfully it stays that way. Had to fully uninstall it. restart. remove the source record filters. close OBS. restart. reinstall the source record and now its working

gilded folio
sterile marlin
#

Ok guys I have a problem

#

I'm trying to get this darken shader to work

#

on an experimental build of Shaderfilter

#

but because of how it's coded, changing the parameters doesn't show any output on the preview

#

It's darken.shader

#

Me and a pal edited the code to make it readable via OpenGL, but the uniform float parameters aren't being used in the code.

#

Here's what our edited code looks like.
`uniform float Opacity_Percentage = 100.0;
uniform float Fill_Percentage = 100.0;
uniform string Notes = "Simulates a photo editing darken layer blending mode. Fill percentage is the interior alpha and Opacity is the layer alpha.";

float dot(float3 a,float3 b){
return a.xb.x+a.yb.y+a.z*b.z;
}

float4 mainImage(VertData v_in) : TARGET
{
float4 other = float4(1.0, 1.0, 1.0, 1.0);
float4 base = image.Sample(textureSampler, v_in.uv);
float luminance = 0.299base.r+0.587base.g+0.114*base.b;
float4 gray = float4(luminance,luminance,luminance, 1);

return min(base,other);

}`

#

How do we implement the alpha layers? I know the clamp function can be used to implement alpha... do I use that to implement Opacity_Percentage and Fill_Percentage?

quiet bramble
# sterile marlin Here's what our edited code looks like. `uniform float Opacity_Percentage = 100...

dot is a reserved keyword for dot product multiplication so that function isn't necessary. Your luminance math is for Rec601, better to use Rec709 as:

float luminance = dot(color, float3( 0.2126, 0.7152, 0.0722 );

you can also use swizzle to reduce verbosity:

grey = float4( luminance.xxx, 1.0);

If you want to preserve the alpha of the pixel you are sampling, just replace the 1.0 above with base.a which is the alpha channel of the sampled pixel.

white dune
#

call me crazy, but that code appears to have a lot of unused variables.

quiet bramble
#

If you want to specify your own alpha, just use:

grey = float4( luminance.xxx, saturate(Opacity_Percentage * 0.01) );
sterile marlin
#

Ok so I did this:
float luminance = dot(base, float3( 0.2126, 0.7152, 0.0722 )); float4 gray = float4( luminance.xxx, saturate(Opacity_Percentage * 0.01) );

#

and got this

quiet bramble
#

are you on Mac or Linu?

sterile marlin
#

Mac

quiet bramble
#

ahhh

sterile marlin
#

That's why I used float luminance = 0.299*base.r+0.587*base.g+0.114*base.b;

quiet bramble
#

Well, that luminance math is for Rec 601 which is an old standard. If you're calculating luminance for modern video the values I provided are for the Rec 709 standard for modern HD video

sterile marlin
quiet bramble
sterile marlin
#

Is there a swizzle function for vector floats?

#

Or something akin to it?

quiet bramble
#

Since you're on Mac, I'm not sure how the code will get translated on Mac, unless you're directly writing GLSL

sterile marlin
#

I'm using OpenGL soooo

#

Is that directly writing GLSL?

quiet bramble
#

not sure what you mean by swizzle function. You can use swizzle with variables as in my grey line: luminance.xxx

#

I haven't used GLSL in OBS directly since OBS's HLSL variant is the default on Windows. I've used GLSL on Shadertoy

#

GLSL is what is used with OpenGL. OBS shaders written for Windows get converted to GLSL on Mac/Linux and the conversion doesn't always work

sterile marlin
#

That's why I want to fix this code.

#

To fix the conversion.

#

First off, please tell me... what's a "non-vector primitive float"?

quiet bramble
#

In both GLSL and HLSL it'd just be a float

#

The vectors would be in HLSL: float2, float3, float4, which are vec2, vec3, vec4 in GLSL

#

So if you're converting HLSL to GLSL you'd want to search for the word float and change all instances to vec if they are followed by [234]

sterile marlin
#

If I change to vec I get a syntax error

quiet bramble
#

Another way to do it is make a header file containing:

#define float2 vec2
#define float3 vec3
#define float4 vec4

and just #include "thatfile.inc" near the top of the shader. Just don't put it on the very first line or OBS will crash hard.

sterile marlin
#

what's "thatfile.inc"?

quiet bramble
#

whatever you call the file πŸ™‚

sterile marlin
#

Uh

quiet bramble
#

Call it "HLSLtoGLSLmacros.inc" for example

sterile marlin
#

This is gonna be applied to a source as a filter...

quiet bramble
#

yup

sterile marlin
#

Why declare a file name?

quiet bramble
#

I explained above, if you have a file written in HLSL, which all of the shaders that come with Shaderfilter are, instead of manually converting the entire thing painstakingly from HLSL to GLSL by hand, you can use macros to do a lot of the work for you, stick them in a separate header file, and then use a #include directive at the top of the file to include the macros.

sterile marlin
#

but uh

quiet bramble
#

It works similar to #include in C

#

You're misunderstanding what I'm saying πŸ™‚

sterile marlin
#

Sorry

quiet bramble
#

The macros get stored IN the file you will be including

#

Create a new file called HLSLtoGLSLmacros.inc

#

Then in your shader, #include "HLSLtoGLSLmacros.inc" which now exists because you just created it. Put all those #defines in that other file.

sterile marlin
#

Oh

quiet bramble
#

If you're converting a bunch of code like this, a conversion include file will save you decades of time

#

Here are a few others:

#define lerp mix
#define frac fract
#

Also beware the arguments of atan() are reversed between languages for maximum fun

#

not related to your problem, just some bonus tips πŸ™‚

sterile marlin
#

I don't know about this.

#

I just want to change the code of one file

#

Not add others

quiet bramble
#

Do it however you like. I've been converting shaders for several years and am offering advice on how to save time and prevent premature hair greying.

#

πŸ™‚

sterile marlin
#

I've been able to convert ALL these shaders to be readable by the shaderfilter plugin

#

Without making an extra file

#

(the files marked red are broken)

quiet bramble
#

You don't HAVE to make any extra file.

#

I was offering advice on how to convert a lot of code all at once by using an include file instead of hand editing 500 shaders manually

sterile marlin
#

Well dang

quiet bramble
#

You can ignore that advice if it isn't useful to you, and you prefer to manually edit files all week long. πŸ™‚

sterile marlin
#

Bro

#

I just wasted my entire February

#

because I didn't know there was an easier way to do this

quiet bramble
#

There'll be more. πŸ™‚

sterile marlin
#

Can we just stick to converting the shaders directly into OpenGL? Please?

quiet bramble
#

Some of the original Shaderfilter shaders need some updating too it seems. πŸ™‚

sterile marlin
#

Look as much as I appreciate the fact that there could've been an easier method to convert all this code, this is mac we're talking about.

#

It's fickle.

#

Plus I want to keep all the files where they should be in my plugin.

#

I want to make a direct 1-to-1 convertion of shaderfilter. No extra files.

quiet bramble
#

Just looking at the orignal source code and that shader is just broken spaghetti. I should have looked closer in the first place.

#

It's a non-working shader that looks like it was started and not completed.

#

For starters, the 2 user property uniforms are not used anywhere in the code. It sets a grey variable that is never used anywhere, and the dot product references a variable 'color' that doesn't exist in the code.

#

(on a side note this shader's own documentation suggests it was intended to simulate a darken blend mode. OBS now has blend modes, not sure if darken is one of them as I don't have 27.x up ATM)

sterile marlin
#

Btw even with the method you gave me, I still can't convert everything

#

Look I'm already mad at myself for only now learning that I wasted a month manually editing shaders

#

and accomodate for it

quiet bramble
#

Well, you already successfully converted it. It's a non-working HLSL shader that doesn't work in Windows, and you made it a non-working GLSL shader that doesn't work in Mac. I'd call that a successful conversion. πŸ™‚

sterile marlin
#

Well, the problem is... how do we make it work at all?

quiet bramble
#

Should be easy, but step one is to delete the file because it is broken random garbage. Step 2 is to find out what the actual algorithm for Darken is, and write a new shader to do it from that, which should be trivial.

sterile marlin
#

Ok.

#

Unfortunately darken isn't in OBS

quiet bramble
#

Ok, that shader is completely nonsensical. I'm not sure what it was trying to do or wanting to be. You have to have 2 images to blend them, and it is reading the OBS texture the filter is applied to for one, and has a hard coded value other set to opaque white.

sterile marlin
#

It was trying to do something like this

#

The post for that image has a github link, but it broke

quiet bramble
#

The darken algorithm takes the lesser of each channel between the two inputs, and since one of them is hard-coded as bright white, the OBS texture will always be equal or lower resulting in the source pixel always being written out and no actual work being done.

#

Great shader.

#

It's not possible inside of a Shaderfilter shader to access 2 OBS source textures so it is not possible to blend them.

#

What is possible would be to have a color parameter that is user settable, and then use that as the other source, or to load a texture from an image file on the hard disk.

#

So you could blend a static image such as a PNG with an OBS texture and apply a blend mode to it. But that code does none of that.

#

Or, if you generate an image inside of a shader you could blend it with an OBS source.

#

The short story though is if you are trying to convert all of the OBS Shaderfilter sources from Windows to Mac just to have feature parity, that darken.shader file can be deleted on both Windows and Mac and not lose any working functionality.

sterile marlin
#

I'm just gonna label is as "DUMB"

quiet bramble
#

It would however be possible to implement such a darken shader on StreamFX however as it has texture support

sterile marlin
#

Nah

#

that's a can of worms I don't want to deal with today

#

Well thanks for your opinion

#

I'm gonna relabel this shader

quiet bramble
#

We wasted a bit of time at first as I converted things on a line by line basis without looking at the code as a whole and seeing how dumb it is. πŸ™‚

#

Just so our time wasn't completely wasted, I will tweak the code to actually do something that might have some small use.

sterile marlin
#

Honestly I appreciate you telling me that there was an easier way... but that possibly requires recoding on the plugin's part and I don't want to do that

sterile marlin
quiet bramble
#

I could add image texture support, converting it to an .effect file to make it more useful. One annoying thing though is that the uniform float4 support for specifying color, and the texture support are both buggy in Shaderfilter. No way to specify default values that stick so they always must be specified manually after attaching the shader.

#

Not a big issue with this shader, but annoying for shaders that have specific image textures.

#

Now, it is my understanding that OBS converts these to GLSL on the fly on Mac/Linux, and there's absolutely nothing complex going on in there so in theory this should just work on Mac/Linux AFAIK without needing manual conversion, but I can't test that either.

sterile marlin
#

Thank you so much!

quiet bramble
#

If it does need manual conversion... float4 -> vec4, and saturate() would need to be converted to clamp(Opacity * 0.01, 0.0, 1.0);

sterile marlin
#

Nah it doesn't

#

The shader is successfully read

quiet bramble
#

I think everything else should work in GLSL

#

it's working? You need to change the color configuration first BTW (default colors are ignored in shaderfilter as per my gripe above hehe)

sterile marlin
quiet bramble
#

If it works as is I would just leave it alone

#

Only change things if the auto-conversion breaks. πŸ™‚

sterile marlin
#

Yeah making those changes resulted in this, so I'm sticking with what you uploaded.

quiet bramble
#

There are a number of bugs in Shaderfilter, mostly just quirks though. I don't believe it is under active development or maintenance by Surn anymore so they'll probably never get fixed. StreamFX recently gained the few features Shaderfilter had that StreamFX shaders didn't, and the StreamFX shader feature set is much greater, so if someone doesn't beat me to it, I plan to port all of the Shaderfilter shaders (at least the ones that work) to StreamFX probably later this year, and just switch everything over to that.

sterile marlin
#

Unfortunately Shaderfilter-Plus is not available for macOS

#

I'll use it when I make my eventual PC

quiet bramble
#

That's weird as one of the key features of Shaderfilter Plus was GLSL support

#

I don't think it's maintained anymore either though

sterile marlin
#

GLSL support there is for Linux iirc

quiet bramble
#

Of the 6 shader plugins for OBS, StreamFX is the only one actively developed and maintained these days.

#

Also with the largest and most flexible feature set.

sterile marlin
#

There are 6????

quiet bramble
#

The only thing StreamFX is missing compared to Shaderfilter Plus I believe is fft support.

#

Well, there is the original Shaderfilter, then Surn(OnCorporation)'s popular fork, then Andersama's Shader Plugin, then Shaderfilter Plus, and Custom Effect. There's another one I forget the name of.

#

Most of them got an initial release, maybe a few updates for a few weeks or a month or two, and then never got updated again.

sterile marlin
#

I see

dark sapphire
quiet bramble
#

90% hard yes. πŸ™‚

#

The pros of StreamFX are: 1) Who doesn't already have StreamFX for 1000 things anyway. 2) You can specify user properties with high degree of configurability. 3) Multiple techniques can be specified. 4) Enums for end user friendliness. 5) Various other unique features. 6) Active development/maintenance.

#

Pros of Shaderfilter original are: none

sterile marlin
#

Well even still

quiet bramble
#

Pros of Shaderfilter(OnCorporation/Surn): it has the largest collection of ready to use shaders of any of the plugins, so most useful for non-programmer end users wanting free filters/fx. There are some dud shaders in there, and many have defaults that do not do anything visible leaving the user to think the shader doesn't do anything, so it could use some user-friendly updates. πŸ™‚

sterile marlin
#

I use it because it allows me to debug the shaders

quiet bramble
#

Pros of Shaderfilter Plus: 1) fft support, so you can create custom shaders for custom audio visualizers. 2) GLSL support even on Windows (but requires reconfiguring OBS to use OpenGL which is blah on Windows)

#

Pros of the other plugins: <shrug, couldn't find any>

quiet bramble
quiet bramble
#

Shaders are a complex topic overall, so they all are complex from an end user non-programmer perspective, but that's just how it is if people want to do this sort of thing.

#

One con I should mention with StreamFX, is that user properties while very configurable to mega awesomeness... are sorted in alphabetical order with no way to disable that, which makes it so you must prefix them with unnecessary characters if you want them to show up in a specific order.

dark sapphire
#

Sure, but even if the shader ui wasn't complex, the rest of the plugin is. It adds a lot, some of it unrelated to the name. And can even cause ffmpeg to behave weird, even on built in encoders

sterile marlin
quiet bramble
#

This alphabetical properties is considered an optimization IIRC although I never understood why exactly. πŸ™‚ The "solution" to that is to transition prototype StreamFX shaders to standalone LUA scripts or native plugins to get a better UI after prototyping in SFX>

#

Also should be noted that many people have made their own personal playground forks of Shaderfilter and possibly the other plugins also, and may have additional functionality or shaders in their forks, but none are public releases, just personal playgrounds.

#

My personal preference would be to have the ffmpeg bits as a separate plugin as it was originally, but it's not that big of a deal and it simplifies maintenance for Xay so that's why he integrated it.

#

The shader UIs are a bit complex due to the nature of the plugins for the most part, and from what I understand the limitations of what OBS lets plugins set up in properties pane.

#

StreamFX has the best setup for that tho, with the exception of the alphabetical listing, and no way to use the OBS built in color picker.

#

For color selection you have to use manual float variables with sliders, no visual or HSV etc.

dark sapphire
#

Sounds like poor mapping. We have a colour picker, as seen by the colour source

quiet bramble
#

it's just not implemented

dark sapphire
#

If that API is not sufficient, nobody has informed us, so yeah just lack of implementation on the plugin's side

quiet bramble
#

Shaderfilter has the color picker but it is super buggy. I tried to debug it once but got a bit over my head.

#

Not sure if the bug is in Shaderfilter (which is what I think), or in OBS

dark sapphire
#

Could legit be in either

quiet bramble
#

Basically when you specify a float4 in a Shaderfilter uniform, you get the color picker, but if you put a default value it is ignored and black or blue usually gets used. The float values are being misinterpreted somehow.

#

I looked through the plugin code and couldn't spot anything that jumped out at me

#

So some of this is a bit hacky/clunky but ok for prototyping at least. Not so great for end users that'd like to have some additional filters.

#

I'm going to convert some things to LUA in the future, got a few already. Would like to turn some things into native plugins in future also but you know the story about old man time... πŸ™‚

sterile marlin
#

Ok while you're here skeleton, do you think you could guide me on debugging a few more shaders?

#

Rotatoe, Aspect Ratio, and Gaussian Blur

#

the last one has code that applies to some other shaders, so I wanna get the first two out of the way

quiet bramble
#

what are the probs?

sterile marlin
#

Here's what I got for Aspect Ratio.

quiet bramble
#

I can see one minor problem with the AR shader... just convention though. It's named a .shader extension, but it follows the convention of the Shaderfilter .effect files, so it should be loaded as a .effect file.

#

oh, the source code contains a global variable, those are not allowed

#

also, math isn't allowed there either

#

did we... did we... I say... did we find another shader that doesn't actually work? πŸ™‚

sterile marlin
#

No

#

I'm not one to give up like that

quiet bramble
#

Ok, I just tested it and looked at it deeper and the aspect ratio shader is non-working code that seems like it was being developed and never got finished.

sterile marlin
#

That's so weird

quiet bramble
#

Not super sure what use it is though as the OBS Scale/Aspect filter already exists

#

or the transform bounding box options

sterile marlin
quiet bramble
#

It's not a completed shader so it never worked. It contains nonsensical code like this:

    // determine the game window's current aspect ratio
    float windowaspect = hw.h / hw.w;
#

.h is not a valid swizzle

sterile marlin
#

Ok let's tackle this syntax error

sterile marlin
quiet bramble
#

What has happened, is that this plugin isn't developed with a separation between "experimental work in progress that doesn't actually work yet" code branch, and a stable released version intended for end users. So it contains code that was being developed and never got into a working state to begin with, never got completed. This shader and that darken.shader are 2 found so far.

#

The uniform variables are invalid syntax, it has an illegal global variable with illegal math

#

this shader never ever worked

#

it references variables that don't exist

sterile marlin
#

Hm

#

So... no dice?

quiet bramble
#

Swizzle are .rgba and .xyzw

sterile marlin
#

Ok with that in mind

#

I edited the swizzles

quiet bramble
#

It's not clear from the shader what the dev was trying to do with it, so no sense trying to complete it to get it to do something IMHO

sterile marlin
#

Good thing I have some rect code in other shaders that I can cross-reference

quiet bramble
#

Judging from comments in the code, he appears to have made this shader to act as an auto aspect ratio adjustment for games

#

OBS can already do that without any shader

sterile marlin
#

Oooooh

#

Even still

quiet bramble
#

These are the magic options that do this, that almost nobody knows are there or how to use them.

#

πŸ™‚

sterile marlin
#

Do you have any suggestions on how to fix rect?

#

I know about that lol

#

should I just bag this shader, then?

quiet bramble
#

The shader isn't working code that stopped working, it is code that never got completed and never worked to begin with, and isn't worth finishing.

sterile marlin
#

Ok

quiet bramble
#

The way to fix it is with the right mouse click -> Delete on the file

#

πŸ™‚

sterile marlin
#

Ok so it turns out I ain't bagging this yet

quiet bramble
#

rotatoe is a super weird niche custom shader he wrote for a friend of his or something, I remember him mentioning that to me a few years ago. It works I believe, but very limited use. I dunno how reliable OBS is at translating some of that code to GLSL

sterile marlin
#

The problem was that I had ".effect" file turned on

quiet bramble
#

I see that it is using 3x3 matrices and I know GLSL uses a different row/column order, and that OBS ignores pragmas etc. on how to override row/column order, so if OBS translation to GLSL does not convert that itself, then this code wont work.

sterile marlin
#

I think if I fix this I can get my preview working for AR (yes I'm stubborn)

quiet bramble
# sterile marlin The problem was that I had ".effect" file turned on

Well, it is a full effect. The way shaderfilter works is the filename used is completely irrelevant and only for the human looking at it. There are 2 shader file types that shaderfilter works with. One is a simplified shader that just specifies the main pixel shader and it must be called mainImage() and you specify any uniform variables if needed. This is to make it easy to write simple quick and dirty shaders without having to write or copy over a vertex shader, technique, samplertype configuration and plugin supplied global uniforms.

#

So the convention is to call these type of shader files ".shader" to visually distinguish them as automatically using the built in plugin template that is built into the plugin.

sterile marlin
#

I'll try renaming it to .effect

#

Ok I just get the rect error again

quiet bramble
#

If you need to create a custom vertex shader, use multiple techniques, custom samplertypes, file based textures etc. then you have to create a full blown effect and not use the built in shader template. To do that you specify the full list of things I mentioned above and check off the ".effect file" checkbox to inform the plugin to not use the built in template, that this shader file includes vertex shader etc. itself. To remember to do this, they're named .effect so that when the human loads them they remember to check off the .effect file checkbox.

#

The actual filename extension is irrelevant to the plugin though, you could name it aspect_ratio.potatosacksupreme

#

It's what's inside that determines whether or not the .effect file checkbox needs to be on. If there is a vertex shader, technique, sampler types etc. then it is an effect file no matter what the filename is... so this file is not following the author's convention of effect files being named .effect

#

Renaming the file to .effect would correct this file naming mistake, but wont make the code work because it is nonworking code. πŸ™‚

sterile marlin
#

How do we make it a valid shader, then?

quiet bramble
#

By reading Surn's mind to determine what the shader was supposed to do, and then finish writing the rest of the missing code and fixing all of the plenty bugs it has. πŸ™‚

sterile marlin
#

So then. Rect.

quiet bramble
#

As I said, this isn't a completed shader that ever worked and somehow has a typo in it, this is code that was a work in progress idea that never got completed and contains code farts that do not do anything. This was never code that ever worked.

#

I have the code in my own text editor here, I can see it πŸ™‚

sterile marlin
#

Hm

#

I think I'll leave this for another time

#

I just put this

#

Let's do rotatoe

quiet bramble
#

yup, that's a case of whatever OBS is using to convert HLSL to GLSL not properly converting matrix operations

#

One of the best things about the log file error messages for shader problems, is that the line number shown never ever is the line number in the actual file.

sterile marlin
#

Time to do a lot of ||

quiet bramble
#

So it says line 74, but that will never be on line 74. This is the fun part.

#

So if I remember correctly, if you multiply 2 different sized vectors, or a matrix and a vector in GLSL, you can just use the * operator and it works (someone correct me if I'm wrong on that).

#

But, in HLSL this is an illegal operation.

#

You have to use mul() for that.

#

But also as mentioned before, one language uses column major representation and the other uses row major, and the language syntax for overriding that is ignored by OBS

#

So one has to go rewrite all of the matrixes to be the opposite major.

#

(unless someone knows of a better way to do it, I haven't found one)

#

so float3x3 in HLSL is mat3 in GLSL.

#

How I approached this sort of thing was wanting to do almost the opposite of what you're doing. Taking GLSL shaders and converting them to work in OBS in Windows under OBS's HLSL inspired shader language.

#

Mostly from Shadertoy.com. But it is somewhat very tedious to do this, and fraught with a lot of repeated problems. After a week of that, I started making life easier and using macros to ease porting code between the two languages, and also different shader implementations.

#

That's what I was talking about earlier in using an include file. It's dirt simple and saves time with zero negative downside.

#

So now when I convert from GLSL to HLSL, I just include my conversion macro include file, then change a few implementation specific things like the main function, global variables and convert conditional compilation into runtime conditionals, then let OBS have a crack at running it

#

locate errors, convert what's left individually. If I find something else that can be automated between the two languages, my macro file grows larger and all future stuff is easier.

#

Another GLSL<->HLSL caveat to be aware of, is in GLSL, Y coordinate is positive upwards as in cartesian. In HLSL the Y coordinate is positive downwards. For shaders where this matters, you have to convert ( usually by doing: uv.y = 1.0 - uv.y;)

#

My gut tells me that rotatoe is likely to be an armful to convert to working GLSL. Not hard, just time consuming and easy to get wrong if one hasn't done it before.

wintry mauve
sterile marlin
#

What if I just... put all of this in there?

quiet bramble
quiet bramble
sterile marlin
#

Even so, I still keep getting this

wintry mauve
sterile marlin
#

Feel free to optimize the code by taking out any "#define"s that aren't needed for this shader

quiet bramble
#

no need, they don't do anything

quiet bramble
quiet bramble
#

I'm not sure what that might get converted to in GLSL by OBS

sterile marlin
#

Because without them the 74 error still appears

#

it looks like my plugin can read float3x3 fine

#

What I need to figure out is how to make * work on vec2 and mat3

wintry mauve
#

It's not at shader/effect compilation/processing time. It's at draw setup for the projection matrix. You end up drawing an upside down render target to avoid needing to modify texture coordinates.

#

OBS draws D3D right side up, GL upside down.

sterile marlin
#

found one possible booger

#

Sorry for the tedium skeleton I just like going bit by bit to see what my machine can read

quiet bramble
sterile marlin
#

Mad isn't read... but mul is

#

So boom

quiet bramble
#

Sometimes to figure out what line an error is on it can be frustrating. You can try commenting out blocks of code strategically to play hot and cold, or do a binary search using commenting. It's oldschool but hey.

sterile marlin
#

Line 54 fixed

quiet bramble
#

If mul is working, then that's an actual bug in the shader IMHO, and it should be there for Windows also.

sterile marlin
#

Still getting the line 74 error though...

quiet bramble
#

So here's another trick...

#

OBS says the first error was on line 54 but it is actually on line 47

#

That's a difference of 7. Subtract 7 from line 74 and you get line 67

sterile marlin
#

OOOOOOOHHHH

#

Soooo.... mul function on here?

quiet bramble
#

I am not certain about why the line numbers are off, but my guesstimate is that how OBS sees the file is post preprocessing expansion, so line numbers are off from the actual file lines. Just my theory.

quiet bramble
#

There is a matrix multiplication on the line above in the conditional Rotate_Transform. Something is probably hoaky about that.

sterile marlin
#

ok, here's the chunk

quiet bramble
#

Ok, lets test the theory.... block comment out line 64 and 65 to see if it prevents the error

sterile marlin
#

Even with the comments this still happens

quiet bramble
#

saved and refreshed? (it happens...) πŸ™‚

sterile marlin
#

Yep

#

Still line "74"

quiet bramble
#

another dirty trick I use is to add a fresh blank line somewhere, which shifts the whole file down by one line. If the error message increases by one, I know the error is below the line I added. Remove the line and do a binary search like this to pinpoint the line.

#

Sometimes you just look at the code and go "oh, there... that's it... gotta be" and other times it is like "WTF... ok, we'll do it your way then... brute force" πŸ™‚

sterile marlin
#

I think I found the problem

#

I didn't binary search, though, since it kept going to 74

quiet bramble
#

Then it is before the line

#

so you jump back and do binary search backwards

#

I don't split them in half, but do it more strategically

#

so not so binary πŸ™‚

sterile marlin
#

No matter how many blank lines I add, even to the start, I don't see the error line number changing

#

HOWEVER.

#

I noticed that "axis" here is different from

quiet bramble
#

they're different things

sterile marlin
#

oh...

#

fuck

#

regardless I swear it's rotAxis

quiet bramble
#

From the line number of the error, it's going to be in the vertex or pixel shader.

sterile marlin
#

Where's that?

quiet bramble
#

Big hint at the bottom of the file. πŸ™‚

sterile marlin
#

Oop

quiet bramble
#

<insert Picard meme here>

#

πŸ™‚

sterile marlin
#

Look I'm not a coder

quiet bramble
#

Well, you're doing pretty good for that overall. πŸ™‚

sterile marlin
#

Anyway here are the chunks

#

Vertex shader
`VertData mainTransform(VertData v_in)
{
VertData vert_out;
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);

float speed = speed_percent * 0.01;
// circular easing variable
float PI = 3.1415926535897932384626433832795; //acos(-1);
float PI180th = 0.0174532925; //PI divided by 180
float direction = abs(sin((elapsed_time - 0.001) * speed));    
float t = sin(elapsed_time * speed);
float angle_degrees = PI180th * Angle_Degrees;

// use matrix to transform rotation
if (Rotate_Transform)
    vert_out.pos.xyz = mul(vert_out.pos.xyz,rotAxis(float3(Axis_X,Axis_Y,Axis_Z), (angle_degrees * t))).xyz;

vert_out.uv  = v_in.uv * uv_scale + uv_offset;

return vert_out;

}`

quiet bramble
#

It's a manner of fumbling on things and learning a few new things each time, and within days/weeks you have a tool chest of scars

#

πŸ™‚

sterile marlin
#

Pixel shader
`float4 mainImage(VertData v_in) : TARGET
{
float4 rgba = image.Sample(textureSampler, v_in.uv);

float speed = speed_percent * 0.01;
// circular easing variable
float PI = 3.1415926535897932384626433832795; //acos(-1);
float PI180th = 0.0174532925; //PI divided by 180
float direction = abs(sin((elapsed_time - 0.001) * speed));    
float t = sin(elapsed_time * speed);
float angle_degrees = PI180th * Angle_Degrees;


// use matrix to transform pixels
if (Rotate_Pixels)
{
    float2 center_pixel_coordinates = float2((center_width_percentage * 0.01), (center_height_percentage * 0.01) );
    rgba = image.Sample(textureSampler, mul(v_in.uv - center_pixel_coordinates ,rotAxis(float3(Axis_X ,Axis_Y, Axis_Z ), (angle_degrees * t))).xy + center_pixel_coordinates);
}
if (Rotate_Colors)
    rgba.rgb = mul(rgba.rgb, rotAxis(float3(Axis_X,Axis_Y,Axis_Z), (angle_degrees * t))).xyz;

return rgba;

}
`

quiet bramble
#

Try doing a block comment around both of the conditionals in the pixel shader. You tried that in the vtx shader already above.

#

Looking at the code nothing jumps out at me as wrong, but I write HLSL and fumble converting GLSL to HLSL as needed, going the other way around I'm not as clear on things, and the code compiles as-is and works in OBS in Windows so nothing screams at me as being wrong.

#

(wrong in terms of how GLSL will handle it that is)

#

I do wonder why so many shaders manually convert between degrees and radians though when there are functions built into the language for that. #JustSaying

sterile marlin
#

That's what happens with the block commenting

quiet bramble
#

Ok, that means the commented out block contains the error, because the code now compiles.

#

Now uncomment it and just comment out one of the two blocks and test it.

#

The bad line is most likely one of the two lines calculating rgba

#

man_i_should_totally_rewrite_all_of_my_shaders_with_really_long_variable_names_that_span_all_3_displays

#

{O.o}

harsh topaz
#

Shortened to varMistraomswrlvntsa3p

sterile marlin
#

This line specifically:
rgba = image.Sample(textureSampler, mul(v_in.uv - center_pixel_coordinates ,rotAxis(float3(Axis_X ,Axis_Y, Axis_Z ), (angle_degrees * t))).xy + center_pixel_coordinates);

#

How do I fix that line?

quiet bramble
#

Ok, judging by the error, I'm guessing something is going wrong in the conversion.

sterile marlin
#

Another weird thing: selecting rotate_transform in OBS exhibits a blank source preview.

quiet bramble
#

The mul() is multiplying a float2 * float3x3, and returning a float2 vector of the result. GLSL must not like that for some reason. Might have to split that calculation out to the line above it and break it down into some other sequence of equivalent math that GLSL wont choke on and OBS conversion wont choke on

#

not weird if the shader isnt' even working yet πŸ™‚

sterile marlin
#

fair

quiet bramble
#

Also, as I mentioned before, the matrix column/row order is different and I have no idea if OBS handles that when converting

#

Perhaps someone else can speak to that.

#

So once this current problem gets resolved, the shader may work and do magic fruity weirdo things

#

which is the best part

sterile marlin
#

the matrix column/row order is different
wdym?

#

Also I tried to replace "mul" with "mad", and the code hated it

quiet bramble
#

they don't do the same things

sterile marlin
#

So... what can do the same thing as mul?

sterile marlin
quiet bramble
#

Not sure what you're asking. The Sample function takes a uv pixel coordinate which is a float2. That math is calculating what the coordinate is.

sterile marlin
#

I'm asking what kind of function would allow us to multiply a float2 * float3x3 into a float2 vector.

quiet bramble
#

It's a matter of understanding matrix math, understanding how it is done in HLSL, and understanding how it is done in GLSL, as well as understanding how OBS is converting it to GLSL (not sure if that's visible anywhere). First comes from a math textbook <grin>, the 2nd from Microsoft's documentation with the caveat that just because something is documented by microsoft doesn't mean it works like that in OBS, and the latter is in GLSL documentation. I'm no expert with GLSL, and without solid error messages it's difficult to figure out the specific problem and why OBS is generating invalid GLSL code when we can't even see what it is generating to inspect why it isn't valid GLSL.

#

We're not looking for a magic function. πŸ™‚

sterile marlin
#

Sigh

#

I'm gonna wait for my friend to get back online

#

thanks for the help though

#

Ok... well... one more shader

warm dragon
#

Hello

sterile marlin
#

It's a lot though, so I'll do it later

warm dragon
#

I have a problem, i am trying to get the the plugin win capture audio, but i don't see it

quiet bramble
sterile marlin
#

again, I'll figure it out with my pal

#

I have some studying to do

#

but thanks for the help compiling rotatoe! And making an actual darkening shader lol

quiet bramble
#

Might want to log into Shadertoy and play around with vector math to try to figure out the right operation in GLSL along with some docs/tutes

#

useful tool for rapidly testing things

deft orbit
#

If I'm using a plug in and uninstall it and then reinstall it, will it mess up sources that were using that plug in?

quiet bramble
#

If you are using the latest or recent version of OBS studio, it should be fine. Older versions would remove the filters from the sources if the plugin was no longer present but they fixed that a while ago, so there should be no problems now (that I'm aware of anyway).

mint fractal
#

does anyone know what would cause one of my recordings while using Source Record is being cut short? I have one for my cam and one for my screen. The recording from my cam is flawless start to finish, but the one from my screen is being cut off about 30 seconds. I have never run into this problem before and don't even know where to begin.

quiet bramble
# sterile marlin It's a lot though, so I'll do it later

pointClampSampler suggests whatever that is, it is using a custom sampler type, which means it has to be an effect file and loaded with the .effect file checkbox (and should have a .effect filename extension to act as a clue to this)

warm oriole
#

am trying to use SetSceneItemProperties and can only seem to get it to rotate a scene item, but NO other options appear to be working?
is there something special that needs done to a scene item to be able to move it?

#
    return createJSON("SetSceneItemProperties",
                        {'item': item, 'scene-name': scene_name,
                         'position.x': position_x, 'position.y': position_y, 'position.alignment': position_alignment,
                         'rotation': rotation, 'scale.x': scale_x, 'scale.y': scale_y, 'scale.filter': scale_filter,
                         'crop.top': crop_top, 'crop.bottom': crop_bottom, 'crop.left': crop_left,
                         'crop.right': crop_right,
                         'visible': visible, 'locked': locked, 'bounds.type': bounds_type,
                         'bounds.alignment': bounds_alignment, 'bounds.x': bounds_x, 'bounds.y': bounds_y})
#

but using the depreciated version with setsceneitemposition and it works fine

lofty hatch
#

Does anyone know of any plugins that would allow me to free-selection crop?

#

Instead of just having to crop using a squared crop

vivid sapphire
#

use an image mask filter

mortal harbor
#

hello guys, simple question today, I am new with OBS studio, I would like to do a simple thing, create a web source via a youtube video

#

so when I am creating the source no issue, but when the source is on my studio board, it ask me to log in into youtube

#

but I can not click inside the windows to log in

#

so I am stuck

oblique yewBOT
proven junco
#

hey is there any plugin that i can clip while live my mods sometimes arnt in i know i can have my stream on the side but sometimes depending on the game and dont catch in time

vale vine
#

@proven junco you are using a stream deck right?

proven junco
#

nope

vale vine
#

Ah. Someone else I was thinking

proven junco
#

thats why im hoping there is a plugin that add like a dock or something

vale vine
#

Can insert your twitch dashboard controls as a custom browser dock

#

Should be able to pop it out and grab the url

#

It has a clip button in it I believe.

dark sapphire
proven junco
vale vine
#

Matt you LEGEND

vapid charm
#

While it would still require lironboard you could use the /marker twitch command if you have a tablet/mobile device you can tap handily.

vale vine
#

Yea. I run a clip button on my tablet with touch portal

potent copper
#

my stream deck plugin wont satart

#

start#

#

plz help

modern drum
strong tulip
mortal hedge
#

In linux version for OBS, I've installed lower third dock(latest version): setup my icons(.png), filled text, and installed both script and pointing to the control panel, setup shortcut keys. The addon works, but not the animations. Any idea? The box remains red, the animation are not showing in the preview.

shell cipher
#

Hello, can anybody help me on how to install the valhalla supermassive vst plugin? Thanks

quiet bramble
#

!vst

oblique yewBOT
shell cipher
#

Thank-you!

shell cipher
#

One thing I don’t understand, how to toggle the plugin on/off during stream

vale vine
#

Is there an alternative to getting an asio feed without using the andersama asio plugin?

vale vine
#

Guess I shall run reaper while also running obs

quiet bramble
vale vine
#

Do filters have hotkeys yet or still need the script?

shell cipher
vale vine
#

Stream deck should have an action to toggle filter state I believe

quiet bramble
#

Confirm, under Bar Raider's OBS Tools there is a "Toggle Filter" module for Stream Deck

placid turret
#

πŸ‘‹ howdy folks. got a question about obs_source_t. I am writing an OBS plugin in Rust and getting set up for asynchronous video using obs_source_output_video. to do this I am creating a new Rust thread in the obs_source_info.create method (this is the thread that will be responsible for actually calling obs_source_output_video with obs_source_frame instances that it generates). in order for that new thread to call obs_source_output_video i need to "move" (in rust parlance this means moving ownership of a variable into a different borrow-checked scope) a copy of the *mut obs_source_t wrapped in a Arc<Mutex<t>> to that new thread.

my question here is, is there some kind of locking function i should call on *mut obs_source_t to make sure that accesses to it in this other thread are safe? or is that taken care of when calling obs_source_output_video? I'm pretty sure i won't need to make any explicit changes to the obs_source_t itself in my code, just want to make sure it's safe to call obs_source_output_video on it.

for what it's worth i am more or less trying to follow the example of the linux-v4l2 plugin where i see a similar threaded approach. just want to make sure i'm not missing any mutex locks that wouldn't be obvious since i don't write C/C++ ever

hard breach
#

to whom made source record, I'm having an issue, once i'm done recording sometime not all the time i get an Oops OBS crashed error. Thankfully i don't lose any of my recorded content.

vapid charm
#

That would be Exeldro.

hard breach
#

ok

#

i did leave a post on OBS fourms as well

#

so im not using NVENC (new), i have source record for my video capture device & game capture, i've turned down the settings for the default video output, not point since i'm not going to use that recording. And yea it still pops up right after i end record, but like i said lucky i don't lose my recordings.

#

it only stated to happen when i add the plugin, it works but not without OBS crashing right at the end unless it's meant to do that

dark sapphire
boreal hearth
#

Something I've been playing around with. A modular multiview. Maybe I'll actually finish it

dark sapphire
boreal hearth
#

yeah saving/loading is a todo. The idea is that the multiview is made up of cells that can display more than just scenes. Ideally other's could also register their own widgets

#

I don't think that the code is good enough to be merged though :P

dark sapphire
#

Ah yeah. That'd be neat for a v2

gaunt zealot
boreal hearth
#

Well I'll probably try and add some kind of audio level widget, but you can't put qt widgets like the mixer in there. You could show browser sources though

harsh topaz
wise palm
#

Is there a Plugin I can use to make Instant Replays somewhat automated with a hotkey?

quiet bramble
#

Do you have a hotkey configured in OBS for replays already?

scarlet oasis
#

Crop/Pad is adjusting the position of the output. Is there a way to fix it?

scarlet oasis
#

StreamFX

quiet bramble
#

Can you explain the problem in more detail?

scarlet oasis
#

Program is no longer centered

quiet bramble
#

that has nothing to do with StreamFX πŸ™‚

scarlet oasis
#

If I disable crop/pad, problem goes away

quiet bramble
#

That's an OBS feature, not StreamFX

scarlet oasis
#

Oh, hrm

quiet bramble
scarlet oasis
#

I'm on linux

#

I thought crop/pad was a SFX issue; apologies

quiet bramble
#

ah well, it's not OS-specific in this case, but I responded in the Windows help channel

chrome tapir
#

some scenes that have move transitions on them lag when switching to them... any advice?

quiet bramble
#

If you turn off move-transition do they still do that?

boreal hearth
fallow mauve
#

Hey! I'm looking into several open source projects to see how they implement their plugin system. I see that OBS uses obs-module.h and OBS_DECLARE_MODULE. The plugins use OBS_DECLARE_MODULE in their .c files; I was looking at the sndio plugin (https://github.com/obsproject/obs-studio/tree/master/plugins/sndio) that uses the obs_module_load() function to register itself as a source. Though as the function is not static it means this module can't be linked statically. If I'm correct, none of the plugins can be statically compiled because of this; which is perfectly fine; I'm curious though if there was a particular reason to use this approach? I do think this is a clean design btw.

boreal hearth
#

You mean statically linked? also #development is probably better

fallow mauve
#

@boreal hearth yep πŸ™‚

hard breach
#

@dark sapphire that's for you

dark sapphire
hard breach
#

ok

#

i mean i only downloaded a few days ago, so that should be up to date

hard breach
#

is he on

dark sapphire
#

he's away at the moment, he'll respond when he has time

hard breach
#

ok no worries lucky my content is still in piece after the crash

weak escarp
#

@hard breach when do you get the crash? disabling the source record filter? Shutting down obs?

hard breach
#

i get the crash once i press stop recording

#

i haven't tried running in admin yet, i could see if that fix's it

#

still got the crash even on admin

weak escarp
hard breach
#

so for my Cam, record mod " recording" format mp4, audio track 1, Mic/Auc, encoder x264 CBR 4000 kbps CPU usage superfast everything else not touched

#

for game capture, same recording, but goes in a different folder all 3 videos.. cam, game, & default recording go in to different folders, format mp4, audio track 1 desktop but some reason just right now it's not capturing audio it was yesterday. Encoder old nvenc rate control CBR bitrate 10k kbps keyframe 2 preset quality profile high, max b frames 2

#

actually what was weird, when i went into the filter of my game capture my audio was set as the same a my camera filter mic/aux but the game was working, but after i set it to desktop to sound

#

no sound came i meant to say

hard breach
#

Ok after restarting my PC the audio problem is solved.. that came out of know where, so what i have learned for my game capture filter. if you are using desktop audio you must use track 2, which i was but something bugged out some where, If you use track 1 instead it captures your Mic sound.

#

so now back to the other problem of why is it crashing..?

#

i found that some setting change on there own, i go back in & it's changed to something else, just like my audio track 1 it was set to 2 for desktop

#

that's why i was like.. why is video not got game audio

hard breach
#

@weak escarp you still there

weak escarp
#

I am, but I am at work, so not much time atm

hard breach
#

ok

scenic cosmos
#

Ok, so I have a weird and oddly specific 'looking for a plug-in' question, I have an overlay that needs to be shown ehen a specified color is present on a particular part of the screen and taken down after it is no longer present.

Its going to be an overlay for my BF's Apex game streams/recordings and the overlay would go over and stylize the health bar.
the overlay should only pop up if part of the screen has a certain color value present in a specific place and the overlay disappears when not present. Is there a plug in already in existence that can do it or would I have to make one?

Thank you in advance.

hard breach
#

@weak escarp DM me when your back from work thanks

vale vine
scenic cosmos
vale vine
#

His setup was 100% custom by VBI. Still hasn't been released for anyone else to purchase. And I'm not sure if advanced scene switcher can do exactly what you are wanting. Wonder if my pal @harsh topaz is around....

#

There is a fork of obs(at least was) that can do what you are wanting

scenic cosmos
#

I see, its similar to what I'm wanting yeah

scenic cosmos
#

I wonder if its observing the ingame code or the screen though

vale vine
#

With anti cheat involved, I'm assuming it's observing the screen

#

Tapping into game code with anti cheat is sure to be an issue, especially with apex

scenic cosmos
#

Makes sense. Well I hope this works and everything. going to have to update OBS and my othe rplug ins to see if this works or not lol

vale vine
#

Be warned. It's a fork

#

Won't be support for it here

#

Just sharing the things I've come across

scenic cosmos
#

What does being a fork mean exactly?

civic crest
#

it split off from the main development.

scenic cosmos
#

and of corse I understand it not being fully supported lol

civic crest
#

meaning someone else is handling its development. not the OBS devs.

#

think of a fork in the road

scenic cosmos
#

ah ok, I think I already have other plug ins like that.

civic crest
#

that's where the phrase comes from

scenic cosmos
#

Smart

vale vine
#

From what ive heard it can be pretty resource intensive. That was a big hesitation in the team not wanting it merged(last I heard)

#

I would personally like to use it myself for not having to manually turn my apex health overlay on/off. But I don't wanna use forks

scenic cosmos
#

lol I feel that. I mean I am a custom freak so I'm sure this wont be the most heavily resource hungry thing on my PC

#

Thank you again!!

vale vine
#

Good luck! Let me know how it works out. Maybe I'll give it a shot based on your feedback

scenic cosmos
vivid sapphire
#

There were some significant issues with it

vale vine
#

I'm assuming no RFC happened @vivid sapphire ?

vivid sapphire
#

No, there was basically a fundamental disagreement between how the submitter wanted to implement the feature vs. how we wanted the feature implemented

#

Essentially, the submitter had a requirement that OBS have the ability to respond on the exact frame where the change happened, rather than reacting 1 frame later, because the person who commissioned the work wanted this feature to enforce privacy, and people could theoretically step frame-by-frame through a video to catch a frame of private information

#

The problem is that this has a huge possibility if a significant performance impact

vale vine
#

Yea. I saw the performance impact Jim mentioned. Guess the person that commissioned it can continue using a fork. I'd settle for multiple frames of delay for my personal needs if it means better performance

wintry mauve
#

It wasn't even a real problem because you can detect and block same frame on the GPU.

#

They just didn't want to modify their implementation.

vivid sapphire
#

What was the reasoning? too much work? Or did they have a technical objection?

wintry mauve
#

They didn't agree with our assessment.

#

I think he just didn't want to admit his approach was bad and needed redoing. Kind of embarrassing to accept a contract on the premise that you are going to do a job competently, and then not.

cyan peak
#

from my perspective, I saw it as another fairly significant feature set to maintain on multiple operating systems and across multiple graphics APIs that only benefited one party

#

it just wasn't a good ask

#

I saw very little benefit for us, at a fairly significant cost

wintry mauve
#

My issue with the API was that it encouraged a terrible performance pattern.

cyan peak
#

yea that also helped me make the final decision

vivid sapphire
#

Well, fwiw there's absolutely demand for the feature beyond one dude

vale vine
#

The reasoning presented in that thread for saying no seemed very logical and well said. I totally understand they why. It's a shame that the how is the reason for the why and no willingness for them to adjust their how

#

And yes, I do believe it would indeed extend far beyond a niche benefit

gritty orbit
#

I sort of doubt this is the most correct channel to ask this, but is there some plugin or feature that can automatically stop recording based on... signal loss? a specific image?
I'm digitizing VHS tapes using an old Elgato Game Capture HD and don't want to hover over the record button waiting for the tape to end. When the VCR stops, the capture card loses the signal and displays "No Signal".
I realized while writing this that I could probably use GStreamer to do this but I'd really rather not πŸ˜…

hard jay
#

So for VHS, are you confident in the runtime?

#

You can set an output timer for a specific length and just use that

#

You'd have to adjust it for each tape, of course, but that's a quick and easy way of doing it

#

(Tools -> Output Timer)

gritty orbit
hard jay
#

Then the unfortunate answer is no, there isn't really a way of doing that I'm aware of. At least, in any kind of premade solution.

#

I'm certainly confident that it's a technical possibility to make, sure.

gritty orbit
#

And I know I could make it, but at that point it's probably easier to use GStreamer than to write a plugin.

#

Thanks for the help anyway!

hard jay
#

OBS isn't the best tool for what you're doing anyway, I'd recommend ffmpeg for that kind of stuff in general.

gritty orbit
#

yes but then I'd have to learn ffmpeg

hard jay
#

Sure :p

worthy geyser
#

Is there a reason why the Move Value filter isn't disabling itself after updating the value, but it does disable itself after reversing the value?

#

Expected:
Enable filter -> Value is animated -> Upon completion filter disables itself -> Enable filter again -> Value is animated back to original -> Upon completion filter disables itself.

Actual:
(1) Enable filter -> (2) Value is animated -> (3) Upon completion filter remains enabled -> (4) Manually disable filter -> (5) Nothing happens -> (6) Enable filter again -> (7) Value is animated back to original -> (8) Upon completion filter disables itself.

#

I thought it was the same issue that @marble needle had reported here a while back, but it doesn't fully match #plugins-and-tools message

#

If I use the "Start" button on the Move Value filter, then toggling the value back and forth works correctly: each click on Start toggles the value.

But if instead I try to toggle the actual Move Value filter (clicking the eye icon), then it takes one click to turn it on, but it takes 2 clicks before it's toggled off (see steps (3), (4), (5) above for an explanation of why one more click is necessary).

I'm thinking there's a bug here.

sterile marlin
#

I still wanna figure out how to compile pointClampSampler, though. These two shaders are the only ones that use it. (Drunk.shader contained GB's direct code.)

sterile marlin
#

I found the problem!!!

#

OpenGL can't take "p_image.Sample"!!!

#

FINALLYYYYY

viral sonnet
#

I am trying to download Source Record but it will not work.. Any ideas?

quiet bramble
#

not enough info to go on

kindred folio
#

I really like how my mic is sounding with some OBS filters, without them, it's a very sensitive mic that picks up the slightest sound. I'm wondering if there's a way to export these filters/settings to Equalizer APO or another software to have the filters working globally on my mic, so it sounds like this in every app, thanks!

quiet bramble
#

No, you'd have to manually configure other software to mimic whatever filters you are using in OBS.

kindred folio
#

Ohh, do you have any tips on how to do this?

quiet bramble
#

You'd have to explore each app and learn how its filters work individually. Lets say you are using the OBS audio compressor, so you have to understand what the compressor is actually doing, then the audio compressor in the other software, and adjust the parameters of the other compressor (which might be similar or very different) based on your own knowledge of what the filter is doing and how it works. Alternatively if one doesn't have that deep of an understanding of how a given effect works to configure some other software in a similar way, then there may be tutorials out there to learn from or by poking knobs and going by ear.

#

OBS doesn't have an EQ built in but for example, if it did (since this would be an easy example), if you have a mid-range boost of +4dB at 2000Hz, then just configure some other software's EQ to have a +4dB boost at 2000Hz.

#

There's no way to extract the specific settings outside of OBS for something like this and store it in a generic format that is abstract that other applications can utilize however.

#

Other applications might not even use the same names for the controls. For example "Output Gain" might be called "Output Level" in some other program, or "Output" or "Makeup Gain". OBS compressor has an Attack and Release controls, some other compressor might not have those controls at all and have that function hard coded.

viral sonnet
quiet bramble
#

A lot of compressors such as the one built into Voicemeeter only have a single knob

#

"COMP"

#

Experimentation with it shows that it controls the compression ratio, but it isn't clear if it doubles to adjust something else also. So you can't convert OBS compressor settings to work in Voicemeeter for example. You have to know how a compressor works and just set up the same idea of how it is being used, in the limitations of the other software. Same for any other filter.

quiet bramble
# viral sonnet wdym?

More or less what I said. πŸ™‚ You haven't given enough information for anyone to be able to suggest anything that might help. It's kind of like if your car broke down on the side of the road and you called an auto mechanic and they answered the phone and you said "My car doesn't work. Any idea what is wrong?" How could they possibly have any idea if you haven't told them anything about your car, what the symptoms are etc.

#

I mean, it is true that some people might have cybernetic implants that can read someone's mind, but those are not widely available yet so it's best to assume people are not cybernetically enhanced for at least another decade or two depending...

#

πŸ™‚

viral sonnet
quiet bramble
#

Generally when a plugin does not show up once it is installed, it is either the version of the plugin is not compatible with the version of OBS (check the website to see what the minimum OBS version required is, and make sure you have that), or the plugin is installed into one of several copies of OBS that are on the system, but not the OBS the person is actually using. There are a number of reasons someone might have multiple copies of OBS installed and not even realize it.

#

To solve the latter problem, however you launch OBS, such as via an icon, right click on it and go to properties and look at where on the computer it is launching OBS from.

#

Inside of the obs-studio directory where that OBS is installed there should be a "data" and "obs-plugins" directory present. If the plugin that got installed is not in these directories, then it is not installed in the correct OBS installation.

#

Common problems that cause this, can be: 1) Someone has previously installed 32bit OBS and not using it anymore, switched to 64bit OBS without uninstalling 32bit, so 2 versions are installed at the same time even though they don't see them both normally. 2) Someone installed OBS, then ran out of disk space and just copied the whole OBS folder to another hard drive. Plugin is installing in the original location and not the OBS copy they are using currently. 3) Person is using OBS portable installs and has multiple, the plugin is installing into one of them and not all of them. 4) Person has downloaded the ZIP file version of the plugin and unzipped it and copied the files into the wrong OBS installation, or the wrong subdirectory in the correct OBS installation, or has only copied some but not all of the files to the right place.

#

Always best to download the Windows installer if a plugin has one, and use that. Make sure when it asks where to install, that it is the correct OBS directory for the installation that is being used. Verify it by checking your OBS shortcut or launch method so that there isn't a disconnect between where OBS is actually installed and where you think it is installed.

#

On the upside, all of the above possible problems are usually an easy fix. πŸ™‚

viral sonnet
quiet bramble
#

Ok, assuming you launch OBS via a shortcut on your desktop or start menu, does the shortcut point to the obs64.exe file located in the directory in your screenshot?

viral sonnet
#

yes

quiet bramble
#

What version of OBS?

viral sonnet
#

recent

quiet bramble
#

that's not a version

viral sonnet
#

27.2.3

quiet bramble
#

Ok, it meets the minimum requirement given on the Source Record page (26.0.0), and it was just updated earlier this week so compatibility is reasonably assumed.

#

!log @viral sonnet

oblique yewBOT
#

@viral sonnet

A current log file is required to help fix your issue. Please post a link to your current log file.

  • In OBS select Help > Log Files > Upload Current Log File.
  • Click Copy URL and then paste the link here.
viral sonnet
quiet bramble
#

One other thing to mention is that whenever a plugin is installed for OBS, the program must be restarted if it is currently running as plugins are only scanned during OBS startup.

oblique yewBOT
viral sonnet
#

probably because I'm currently recodording ^

quiet bramble
#

If you have not restarted OBS since installing the plugin, that would be the reason it does not show up.

#

(assuming everything else was done correctly)

viral sonnet
#

yeh think it's like that because I'm recording

#

should it be in here?

quiet bramble
#

If D:\OBS Studio\obs-studio' is the installation directory of OBS itself, then this should also be the directory name to install plugins to.

viral sonnet
quiet bramble
#

(not in subdirectories of that)

viral sonnet
#

okay

#

okay it's working but there is no audio..

#

got it nvm

quiet bramble
#

sweet πŸ™‚

viral sonnet
#

if I change scenes it corrupts the videos

quiet bramble
#

I believe the plugin is considered somewhat experimental currently, a work in progress so to speak. I have not used it myself yet, but people talk a lot about their use in here over time so I've seen people reporting problems on and off.

viral sonnet
#

ok

quiet bramble
#

If you encounter a problem you might want to mention it on the forums for the plugin, might be something there

viral sonnet
#

If I record in FiveM will it decrease my frames at all?

quiet bramble
#

Recording does use some resources on the computer, how much and whether it has any effect on a given game's gameplay one has to experiment with and if there is a problem it is usually a matter of tweaking the game, OBS, or both to find the best balanced compromises.

#

GTA 5 is pretty old now so probably not very heavy

#

10700K with 3070... should be a breeze

viral sonnet
#

Okay so I have a virtual greenscreen effect right now along side with source record but when I look at the recording it doesn't have the virtual greenscreen..

quiet bramble
#

Filters are applied to a source in order from top to bottom (the reverse of how things are layered as sources)

#

Do you mean you have a working virtual background removal effect showing in OBS preview, but it is not being recorded with Source record?

fallen goblet
#

Are obs-backgroundremoval and StreamFX violating the GPL?

I'm hoping someone can help me understand how this works. The way I see it, OBS is GPL2+ and obs.dll is needed for plugins to function and is GPL2+ too. That would imply that any OBS plugin is a derived work under GPL2+ and needs to make full source code available, including all dependencies.

obs-backgroundremoval uses the Microsoft DirectML libraries. StreamFX uses the NVIDIA MAXINE libraries. Based on my understanding of the GPL2+, they are in violation. What am I overlooking?

I'm asking because I have access to a really cool AI filter kit as a commercial & proprietary Windows DLL. And I'm wondering if there is any way for me to create an OBS plugin which uses that closed-source DLL. I can redistribute that DLL under lenient terms. It's just that there is no way I can get source code for it. But the functionality of that OBS plugin would depend 100% on that DLL, meaning as far as the GPL2+ is concerned, that DLL is a mandatory component of the integrated program.

vale vine
#

I guess it could go either way, but the gpl violation thing, folks in that channel may have a better understanding

fallen goblet
#

Thanks for the hint, I have asked in there, too.

quiet bramble
#

Microsoft DirectX is proprietary, OBS uses it.

#

H.264 is proprietary

#

etc.

fallen goblet
#

The DirectX libraries might be an exception because they are pre-installed on the user's PC. But obs-backgroundremoval actually includes "DirectML.dll" in the ZIP file that you install.

#

And yes, I get your point that OBS is using proprietary libraries, too. That's why I am so confused about the GPL2 and GPL3 stating that a integrated program (meaning something using obs.dll) is not allowed to use commercial components anymore.

quiet bramble
#

Old ones might be, but most games install DirectX as a part of the game installation because the latest version doesn't come with the system.

fallen goblet
#

Or more precisely the GPL says that if I use obs.dll (which is GPL licensed) then I need to publish source code for everything I link against. So a plugin using DirectML would need to publish the DirectML source code to adhere to the GPL2+.

fallen goblet
#

That's why I feel so confused about this. We have multiple plugins that according to my reading are clear GPL2+ violations. Are these other plugins just "getting away with it" but I might not? Or is there an exception that I have not found yet?

dark sapphire
#

DirectML is MIT, is it not?

quiet bramble
#

Licensing issues are generally quite complex and confusing as a whole. Ultimately it's a matter for the copyright owners of a given piece of code, which in this case would be the OBS project and contributors, StreamFX author/contributors, and Nvidia etc.

IMHO, it's really something to talk about with the developers of the actual software and/or an intellectual property attourney. Everyone who is not a lawyer or stakeholder can have opinions but none of them matter unless someone is in a court of law speaking to a judge ultimately.

dark sapphire
#

^

fallen goblet
dark sapphire
#

Then that is up to the plugin developer to figure out, I believe.

quiet bramble
#

Not sure how OBS Project feels about how people are using their code in forks, or linking, plugins, etc. I mean, StreamLabs OBS is a fork of OBS that is GPL, but from what I understand they have 3rd party plugins that are only available via monthly subscription that link to their software which do not provide the source code if I understand correctly. If this is the case, such plugins are in violation of OBS's license.

#

But nobody ever talks about that.

#

πŸ™‚

#

Well, other than that one time...

#

πŸ˜›

fallen goblet
quiet bramble
#

But there's another thing to consider too... what about code copy and pasted from StackExchange that contains no license into a GPL program.

#

Legally, code that does not specify any license is copyrighted with all rights reserved and is not public domain. You don't even have to state "Copyright blah blah" on it.

fallen goblet
#

I believe StackExchange does have a default license for all user-submitted content.

quiet bramble
#

That's not how the law works tho

fallen goblet
quiet bramble
#

The law requires explicit granting of rights.

fallen goblet
#

You accept it as part of the Terms of Service when you create your account.

quiet bramble
#

CC BY-SA would be incompatible with the GPL license, because it requires attribution which would be "an additional restriction" which is incompatible with the GPL license.

#

Much the same as how BSD 3-clause l icense is GPL incompatible.

fallen goblet
#

What a mess πŸ˜…

quiet bramble
#

I brought this up because I know of some code that was copy and pasted from Stack Exchange into some program that is GPL licensed... I wont mention which one it is. πŸ™‚

#

Another interesting oddity that comes up in all of this is where there is something proprietary, and the proprietary vendor's license permits everything that needs to be permitted, and they're ok with it being used for whatever... but their license conflicts with the GPL, but the author of the GPL program owns all of the code in the program.

#

So the program's GPL license is in conflict with the proprietary vendor's license making the GPL invalid, but the proprietary vendor's license is not being violated so the vendor doesn't care. The GPL program contains code only by the original author. So even though the license is incompatible, no law is really being broken, or not in any way that could result in an infringement case.

#

The author being the only copyright owner of the code would have to sue themselves for violating the GPL license on their own code. πŸ˜‰

fallen goblet
#

Yes and no. If I would build a obs plugin and use non-GPL2 components, then I - the plugin developer - would be the one that is legally liable towards the OBS Project because I'm the one breaking their GPL2+ license.

wary escarp
quiet bramble
#

But, if there was a legitimate infringement, anyone else taking the code and using it would be in violation of GPL, but theey could only be sued by the original author of the code, who is the one who violated the GPL πŸ™‚

fallen goblet
#

Yes. That means for me as a person:

  1. OBS somehow allows non-GPL2+ plugins
  2. I never build the plugin because I don't want to be the one that gets sued in the end
quiet bramble
#

There are other weird cases like the licensing of Steinberg's VST2 and VST3

hollow stirrup
#

and obs-ndi as well.

quiet bramble
#

yeah, NDI is another one. Possibly Voicemeeter plugin (not sure)

#

The ASIO plugins

fallen goblet
quiet bramble
#

Passive allowance of infringements knowingly or unknowingly creates another grey area too.

fallen goblet
#

I'm starting to have the feeling that the OBS Project is quite willing to overlook GPL violations as long as it suits them... but once someone makes money off their violation (e.g. Streamlabs), they'll start taking action.

hollow stirrup
#

I don’t think a company like Streamlabs has the rights to sue OBS.

fallen goblet
#

No the other way around. OBS had a dispute with Streamlabs, because that is basically an OBS fork

quiet bramble
#

I think a much more likely case is that the OBS Project wants to focus on what they love doing, writing code and making the best open source broadcasting software they can, and not spend half of their man hours tracking down every possible legal problem and pursuing it and taking on legal costs and getting no financial gain in return. But that's just my opinion. πŸ™‚

wary escarp
quiet bramble
#

The OBS StreamLabs dispute was also over trademark, not copyright.

fallen goblet
#

I see

quiet bramble
#

ya

fallen goblet
#

Or maybe I'm just understanding something fundamentally wrongly. I mean it's hard to imagine that 10+ OBS plugins would be built on legal quicksand

quiet bramble
#

yep, but the lawsuits could only happen from the authors of one of the piece of code that believed they were infringing, and cared enough to pursue it legally also, and only then if they interpreted it as a violation to begin with.

quiet bramble
hollow stirrup
fallen goblet
#

=> OBS plugin developers are safe as long as they have no beef with the OBS project. But as soon as they have, they could be sued in court? Still sounds risky for me πŸ˜…

quiet bramble
#

They open source glue code that only exists to swallow proprietary blobs.

#

But, their drivers are important enough that oh look, nobody ever sued them πŸ™‚

fallen goblet
quiet bramble
#

Someone could just talk to Xaymar about the licensing of StreamFX stuff, he's generally remarkably candid about such things.

#

But I'd approach such a conversation from a friendly curious perspective rather than an accusatory one.

fallen goblet
#

Yeah, surely. I mean I am a happy OBS user myself. I'm just curious about how this works. And maybe I'm a bit overly cautious on the legal side.

quiet bramble
#

Xaymar also lives in Germany and is under German copyright law which is slightly different as well. He's talked a bit about some of that before.

fallen goblet
#

Is he sometimes in Discord, too?

quiet bramble
#

He used German law to reverse engineer how VST3 worked in order to make VST3 plugins for StreamFX, without using Steinberg's official APIs and thus not having to deal with that.

#

StreamFX has its own discord server

#

I actually tracked down the Steinberg stuff myself but he didn't want it, and chose to figure it all out himself. Gotta respect that!

#

OBS also has support built in for Nvidia's RTX noise removal BTW

#

not sure what the licensing is on that but I imagine the OBS devs handle that stuff on their own.

boreal hearth
vale vine
#

πŸ‘€

unkempt gust
#

hi everyone. does anyone know if there is an advanced plug in to program source switching? I know that OBS currently has a source switcher but I need something more advanced, kind of like the sequence part of exeldroΒ΄s "advanced scene switcher"

quiet bramble
#

Advanced Scene Switcher is made by someone else πŸ™‚

unkempt gust
#

damn IΒ΄m so bad with names IΒ΄m so sorry!!! the plug in that warmuptill made

quiet bramble
#

hehehe

#

You might want to talk to Myles also, he has a cool program for controlling OBS. He hasn't released it publicly yet but he's cool with sharing it with fellow musicians.

#

If you're interested I'll hook you up via DM

unkempt gust
unkempt gust
quiet bramble
#

unless Myles kit has MIDI now too, he mentioned desire to add MIDI before

unkempt gust
#

I know that its possible to control OBS with MIDI using MIDI2Key, I think. would programming the MIDI commands in a DAW and the importing it somewhere work? IΒ΄m not sure if this is possible or if IΒ΄m missing something. the only MIDI programming I ever made mas with vstΒ΄s πŸ˜‚

quiet bramble
#

There are better OBS midi plugins nowadays that don't use keys... OBS-midi is one, but there are some others too. Silence uses one of them

#

I think Grym uses it now too

#

SOA uses um, what's it called... ugh...

#

SOA uses Bome MIDI Translator, but he used that oldschool before anything else existed because you know him... The OBS MIDI stuff now surpasses that commercial stuff IMHO

#

Not sure what Greg uses, but I'm guessing probably MIDI in Aitum, but I haven't looked at that yet

unkempt gust
#

oh silenceΒ΄s set up is insane. I remember he explained part of his set up, and I couldnΒ΄t understand how everything worked πŸ˜‚
oh I thought grym made the camera changes with a footswitch.
well SOA I think was one of the first people do something like that, wasnΒ΄t he?
yes Gregles uses MIDI with Aitum as far as I know

quiet bramble
#

Grym used to do things manually but I think it is mostly MIDI now

#

Yeah, SOA is OG... 2016

#

I have not yet played with the MIDI stuff mainly due to lame computer woes and other gear problems, having it as a future TODO, but now I'm getting close... so probably within a few months I'll be nosediving heavy into that stuff

#

Probably using Reaper+OBS-MIDI or whatever is the most current plugin

#

If anyone else knows better, please speak up πŸ™‚

#

Looks like it hasn't been touched in a year though too

gaunt zealot
quiet bramble
#

Will have to check that out

deft orbit
#

I've currently got the starscape creator plug in manager, but I'm pretty sure it's not showing me all the plug ins I've got installed. Is there an easy way to see what I have installed and uninstall ones I don't use that I'm missing?

unkempt gust
unkempt gust
vale vine
#

But if you open a log, plugins are generally listed in the loaded modules section

#

I would also say, use starscape at your own risk.

#

They didn't approach their manager properly or with seemingly the best of intentions

quiet bramble
#

Ah, I seem to remember some bad vibes about that a few months back

vale vine
#

Yep

#

Data collecting 101

quiet bramble
#

Forget the deets, but it seemed a bit shady IIRC

vale vine
#

Their plugin manager was a premise to steer people towards their paid items imo

#

And their devs I believe have been banned from here

quiet bramble
#

Ah, didn't they spamvertise it here too?

deft orbit
wary escarp
#

I think that got resolved, but I'm not sure what the result was

vale vine
#

Shady AF if ya ask me

#

Their initial actions left far too bad of a taste in my mouth personally to trust

quiet bramble
#

ah yes, I remember that now

mortal harbor
#

can we add when the vlc playlist is not showing and then we show it again it resets the playlist

barren lynx
#

I have multiple VLC playlist sources, each with a sequential series of videos. I want to switch to a random playlist when the currently-playing video has ended. To break it down:

  • Set up three playlists, each with an ordered list of videos
  • I manually start playing one of the playlists
  • When that video in the playlist ends, run Advanced Scene Switcher macro (or script, or whatever) to switch to another random playlist.
  • Play the next sequential video from that playlist
  • Back to step 3
    I am using Advanced Scene Switcher (as mentioned), but the problem seems to be Advanced Scene Switcher doesn't trigger the macro at the end of an individual videoβ€”only at the end of the entire playlist.

Is there another way to do this with Advanced Scene Switcher? Or is there another plugin I should be using?

civic crest
#

ReallyDumbQuestion(tm) - what is the logi_obs_plugin on the mac? it would imply logitech given the name, but i'm not sure why there'd be a logitech plugin.

#

that's what seems to be causing the "quit OBS and it crashes" thing on the Mac, post 27.2.x. removing the plugin and no crashy. just not sure what i disabled by doing that. heh. :-)

wary escarp
civic crest
#

hm

wary escarp
#

In any case, it's not from OBS

civic crest
#

well i removed it, and the deck continues to work.

#

maybe Logitech was planning some way to allow you to control your mouse or other wireless logitech things via the GHub plugin.

#

and here's what i think of that idea...

#

shuffles it off to /dev/null

mortal harbor
#

i cant find my chat dock

gloomy pine
#

Can somebody help me. How can I activate the move value plugin On when the source become visible ? And off if the source is off/not visible

civic crest
vagrant minnow
#

It's fine, it'll reinstall itself later.

civic crest
#

i bet i can prevent it from doing that. :-D

vale vine
#

Sure as shit reinstalled iteslf

#

F you logitech

vale vine
civic crest
#

don't think it's causing problems on windows w/OBS. but it does indeed on the Mac. the way i'd do it on the Mac is a UNIX trick that won't work on WindBlows.

vale vine
#

Ah

civic crest
#

did you restart the hub, and it re-installed it that way?

vale vine
#

Probably

#

Ghub starts on launch for dpi settings

civic crest
#

right

vale vine
#

As far as I've seen, can't get them to properly save to mouse without ghub

civic crest
#

i believe that. i don't use multi-DPI, so i can live without ghub running.

#

only need it if i want to change other settings.

vale vine
#

I'd love only one dpi. Even ghub forces me to set different stages

#

But when ghub is closed, they go to the default stages

#

Might be time for a new mouse

#

My corsair mouse let me set all the dpi stages to the same one AND save it to the mouse

karmic blade
#

Is there a plugin that allows you to animate with keyframes the transform of a source?

#

I want to animate a webcam source to follow a path

torpid trout
#

someone have a link to start coding a plugin for obs?