Getting Started
Tutorial Videos
Courses
Lovense
Cam Sites
Community
Back
#StreamMaster #New horizontal flip in OBS preview
I am using a teleprompter to I can look directly at my viewers. In the screen I am looking at my OBS. Unfortunately I can't read the comments because the teleprompter flips everything horizontally. When I flip the lovesense feedback I can read the comments but then my viewers can't read the comments. It would be great if the preview I see is flipped, but the virtual camera flips it back before broadcast.
2
Save
2 replies
4 months ago
I wrote a lua script to make this work. Maybe you can make this into a product that others can use. It is not the most user friendly as written.

obs = obslua

source_name = ""
flip = false

function script_description()
return "Flips a specific source horizontally in the preview, but not in the output to the virtual camera."
end

function script_properties()
local props = obs.obs_properties_create()

obs.obs_properties_add_text(props, "source_name", "Source Name", obs.OBS_TEXT_DEFAULT)
obs.obs_properties_add_bool(props, "flip", "Flip Preview Horizontally")

return props
end

function script_update(settings)
source_name = obs.obs_data_get_string(settings, "source_name")
flip = obs.obs_data_get_bool(settings, "flip")

if source_name ~= "" then
local source = obs.obs_get_source_by_name(source_name)
if source then
local scene_item = obs.obs_scene_find_source(obs.obs_scene_from_source(source), source_name)
if scene_item then
obs.obs_sceneitem_set_scale_x(scene_item, flip and -1.0 or 1.0)
end
obs.obs_source_release(source)
end
end
end

function script_defaults(settings)
obs.obs_data_set_default_bool(settings, "flip", false)
end

function script_save(settings)
script_update(settings)
end
1
Daryl.Rose
Moderator replied to Peaceful_ownyZI:
4 months ago
Nicely done 👏
Reply