vwout / obs-visca-control

OBS plugin to control Visca-over-IP based cameras
https://obsproject.com/forum/resources/control-visca-over-ip-based-cameras.1173/
GNU General Public License v3.0
35 stars 6 forks source link

Add support for camera picture options Brightness and ColorSaturation #8

Closed vwout closed 1 year ago

vwout commented 1 year ago

Can Brightness and ColorSaturation also be added? please please😟😟

微信截图_20221024144902

Originally posted by @PoWeR-Ding in https://github.com/vwout/obs-visca-control/issues/6#issuecomment-1288500542

vwout commented 1 year ago

Two questions:

PoWeR-Ding commented 1 year ago

@vwout 👇This is the Visca command documentation。。 Visca Command (English).zip

👇This is the camera link。。 https://www.tc-video.com/video-camera/ptz-camera/20x-zoom-live-streaming-ptz-camera.html https://www.amazon.com/dp/B09N8QLS4H/ref=sr_1_22_sspa?__mk_zh_CN=%E4%BA%9A%E9%A9%AC%E9%80%8A%E7%BD%91%E7%AB%99&crid=3B0WGS8I653CM&keywords=ptz+camcorder&qid=1666662752&qu=eyJxc2MiOiIxLjU0IiwicXNhIjoiMC4wMCIsInFzcCI6IjAuMDAifQ%3D%3D&sprefix=ptz+%E6%91%84%E5%83%8F%E6%9C%BA%2Caps%2C1022&sr=8-22-spons&psc=1

Just like the previous "speed" requirements, press the shortcut key to increase+1 or - 1 each time.. Does this belong to Dynamically change?

PoWeR-Ding commented 1 year ago

@vwout

My Device Brightness Value(0-14): 81 01 04 A1 00 00 00 00 FF 81 01 04 A1 00 00 00 01 FF 81 01 04 A1 00 00 00 02 FF 81 01 04 A1 00 00 00 03 FF 81 01 04 A1 00 00 00 04 FF 81 01 04 A1 00 00 00 05 FF 81 01 04 A1 00 00 00 06 FF 81 01 04 A1 00 00 00 07 FF 81 01 04 A1 00 00 00 08 FF 81 01 04 A1 00 00 00 09 FF 81 01 04 A1 00 00 00 0A FF 81 01 04 A1 00 00 00 0B FF 81 01 04 A1 00 00 00 0C FF 81 01 04 A1 00 00 00 0D FF 81 01 04 A1 00 00 00 0E FF

My Device Color Saturation Value(0-14): 81 01 04 49 00 00 00 00 FF 81 01 04 49 00 00 00 01 FF 81 01 04 49 00 00 00 02 FF 81 01 04 49 00 00 00 03 FF 81 01 04 49 00 00 00 04 FF 81 01 04 49 00 00 00 05 FF 81 01 04 49 00 00 00 06 FF 81 01 04 49 00 00 00 07 FF 81 01 04 49 00 00 00 08 FF 81 01 04 49 00 00 00 09 FF 81 01 04 49 00 00 00 0A FF 81 01 04 49 00 00 00 0B FF 81 01 04 49 00 00 00 0C FF 81 01 04 49 00 00 00 0D FF 81 01 04 49 00 00 00 0E FF

PoWeR-Ding commented 1 year ago

good morning @vwout

How is this function progressing? Can it be solved?

vwout commented 1 year ago

Haven't had time yet. Next to that, there also are a few things to figure out. Since you want to be able increment the values, the plugin has to retrieve the value it wants to increment first and send the new value back to the camera. The plugin doesn't support that mechanism yet.

PoWeR-Ding commented 1 year ago

还没来得及。除此之外,还有一些事情需要解决。由于您希望能够增加值,插件必须首先检索它想要增加的值,并将新值发送回相机。插件还不支持这个机制。

Visca Command (English).zip

In the document I give you, there is a command for Visca to query the brightness of the device. I have tested that it is OK and can return the brightness value normally. Can you use this idea to query your footsteps and return the brightness value?

微信截图_20221030161241 微信截图_20221030161304 微信截图_20221030161417

RX:90 50 00 00 00 08 FF y0 50 00 00 0p 0q FF (p q: Brightness Position)

PoWeR-Ding commented 1 year ago

Or let's change our thinking.

We do not query the parameter value of the device.

Directly set an initialization value, such as 08. During initialization, 81 01 04 A1 00 00 00 08 FF (08 brightness) is directly sent to the device.

Then set the variable in the plug-in according to this value, and then+1 - 1

vwout commented 1 year ago

I prefer not to. A more complete Visca protocol implementation would provide the following commands (source is Sony spec): afbeelding You camera does not seem to support dedicated increment/decrement commands for ColorSaturation. That's ok, more camera's (like several PTZOptics) only support the function to set the level directly. In addition the range support seems to vary between camera (0-4, 0-7 or 0-E).

A similar situation seems to apply to Brightness where you camera allegedly only uses 0-E. The 'official' range (for as far as structurally documented) seems to be 0-FF.

PoWeR-Ding commented 1 year ago

OK, if you need my help, please feel free to contact me.

vwout commented 1 year ago

Implementation of your request is progressing. Library functions are done. You could already test some of the functionality:

To test, download libvisca.lua, ljsocket.lua, obs-visca-control.lua and replace your local files with these.

PoWeR-Ding commented 1 year ago

@vwout Thank you.

(test failed) - A new hotkey is added to reset the Color Gain (Saturation) to the camera default level (test valid)- A new action is added to the camera action menu in scene settings to set a defined Color Gain and Brightness

PoWeR-Ding commented 1 year ago

Currently, lua scripts are excellent😆

unwanted added to reset the Color Gain (Saturation) to the camera default level

It only needs added hotkey based increase and decrease of current Color Gain and Brightness。Then test it.

vwout commented 1 year ago

@PoWeR-Ding just to let you know that your requested hotkeys are implemented some days ago, so feel free to test.

PoWeR-Ding commented 1 year ago

微信截图_20221122122118

See the new hotkey.

But it has no effect.

vwout commented 1 year ago

@PoWeR-Ding I retested to new functions today with a Visca camera and confirmed correct operation. Are you sure that libvisca.lua, ljsocket.lua and obs-visca-control.lua are all updated?

PoWeR-Ding commented 1 year ago

I'm sorry, because I haven't succeeded. I'll close this request.

PoWeR-Ding commented 1 year ago

微信图片_20230216100320

I would like to ask: What is the function of Suppress actions on scenes for Visca cams?

vwout commented 1 year ago

See the readme: "Camera actions configured for a scene are executed as configured when the scene is activated or deactivated on preview or on program. To temporarily suppress execution of scene actions, configure the hotkey 'Suppress actions on scenes'. As long as the hotkey is pressed, actions are not executed. To permanently disable execution, without removing the configuration, change the visibility of the Visca Camera Control source in the scene to 'hidden'."

When you have a scene that recalls a preset and you dynamically reposition a camera on preview using hotkeys, you probably don't want the preset position to be recalled when the preview transitions to program. When you press the configured hotkey, the plugin will in that case not apply the action configured for the screen. In this example, the manually changed camera position will remain.

PoWeR-Ding commented 1 year ago

👍👍👍👍👍👍👍👍

PoWeR-Ding commented 1 year ago

good morning,vwout

Yesterday, when using the PTZOptics mode, I found that the "Increase Pan/Tilt Speed" adn "Decrease Pan/Tilt Speed"(A) did not take effect immediately on the camera. I need to press the refresh button(C) in the lower left corner to take effect, but the value here has changed(B).

微信图片_20230218090822

微信图片_20230218090732

vwout commented 1 year ago

@PoWeR-Ding please don't hijack closed topics for other things

PoWeR-Ding commented 1 year ago

Sorry, I have brought you inconvenience