Coder Social home page Coder Social logo

Comments (13)

upgradeQ avatar upgradeQ commented on May 25, 2024

Offset happens when you resize the source which is used for cursor. This is fixed in update_crop which is used for zoom and highlight (if not resized).

Multiple monitors setup is not supported.

from obs-studio-cursor-skin.

upgradeQ avatar upgradeQ commented on May 25, 2024

@mayank1513 resizing now works.

Let me know if bug is persist.

from obs-studio-cursor-skin.

Karmalakas avatar Karmalakas commented on May 25, 2024

Update crop doesn't change anything. I have cropped area and highlight image follows cursor as if recorded area wasn't cropped. It matches cursor when in one corner, but moving away from the corner increases the offset. What am I missing?

from obs-studio-cursor-skin.

upgradeQ avatar upgradeQ commented on May 25, 2024

@Karmalakas what is your use case? If you are trying to create zoom, might as well try using this script https://github.com/tryptech/obs-zoom-and-follow . Update crop checkbox is used for highlighting e.g: invert color, change gamma via color correction filter. It can be used as zoom but there is better solution for that by zoom and follow script.
If possible, can you create gif / video with what are you trying to do?

from obs-studio-cursor-skin.

Karmalakas avatar Karmalakas commented on May 25, 2024

Here you go. I hope this clarifies what I mean :) All I want, is just for the image to follow cursor

from obs-studio-cursor-skin.

upgradeQ avatar upgradeQ commented on May 25, 2024

Do your monitor resolution match base canvas resolution?

from obs-studio-cursor-skin.

Karmalakas avatar Karmalakas commented on May 25, 2024

Looks like it does
image

from obs-studio-cursor-skin.

upgradeQ avatar upgradeQ commented on May 25, 2024

There can't be any offset issue if you'll set base canvas resolution to your monitor resolution. Try adding a desktop capture again( so it will be updated). Also, did you resize your cursor (some scene item) ?

from obs-studio-cursor-skin.

Karmalakas avatar Karmalakas commented on May 25, 2024

It works fine until I add crop filter
image

from obs-studio-cursor-skin.

Karmalakas avatar Karmalakas commented on May 25, 2024

Also noticed, if crop ratio doesn't match output ratio and I move desktop source to the left, cursor image completely ignores where my desktop ends and goes beyond the monitor frame (don't even know how to explain). It seems all cursor script cares about, is full display resolution and where cursor is on display and calculates where it should be on the output

https://youtu.be/D5sT1DUaMu0

from obs-studio-cursor-skin.

upgradeQ avatar upgradeQ commented on May 25, 2024

It seems all cursor script cares about, is full display resolution and where cursor is on display and calculates where it should be on the output

Exactly, here is the logic behind that

scale = obs.vec2()
obs.obs_sceneitem_get_scale(scene_item, scale)
scene_width, scene_height = apply_scale(
scale.x, scale.y, scene_width, scene_height
)
next_pos = obs.vec2()
next_pos.x, next_pos.y = get_position()
next_pos.x -= scene_width / 2
next_pos.y -= scene_height / 2
# set position to center of source where cursor is
obs.obs_sceneitem_set_pos(scene_item, next_pos)

You might also try different approach with scene item transform, hold alt and adjust crop region via dragging borders.

from obs-studio-cursor-skin.

Karmalakas avatar Karmalakas commented on May 25, 2024

But then in output video it leaves all this black area :(
I guess I'll just have to crop video after recording it

Anyway, thank you for this nice script :)

from obs-studio-cursor-skin.

upgradeQ avatar upgradeQ commented on May 25, 2024

Okay, I am closing it then.

from obs-studio-cursor-skin.

Related Issues (9)

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.