-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial support for protocol version 5 #64
base: master
Are you sure you want to change the base?
Conversation
Hello! The text label stuff is under the func UpdateText(source, text string) error {
if _, err := client.Inputs.SetInputSettings(&inputs.SetInputSettingsParams{
InputName: source,
InputSettings: map[string]interface{}{"text": text},
}); err != nil {
return err
}
return nil
} There's no dedicated properties struct for input settings anymore, since all the inputs share the same request now, so we have to use a Technically the above is all that's needed, but it might be good to check if it's actually a text input we're updating. Otherwise the request will work just fine but won't do anything (e.g. setting text on a media input). resp, err := client.Inputs.GetInputSettings(&inputs.GetInputSettingsParams{
InputName: source,
})
if err != nil {
return err
}
// check if text_ft2_source_v2 or text_gdiplus_v2
kind := resp.InputKind
if !strings.HasPrefix(kind, "text_") {
return fmt.Errorf("input %s is of %s", source, kind)
} |
Nice work, @yusefnapora! I'll have to see if it makes sense to reorganize a few of the commands to better match the protocol, or if we rather stick with the old organization of cli commands. |
Thank you very much! With this I can now use OBS-CLI with OBS28 again. This also gave me the idea a --version support, which protocol is supported then just. |
I tested this last night, and was unable to manipulate sceneitems (sources) inside groups. |
Update soon? |
There are still a few issues where the new v5 API doesn't support old functionality, which makes me hesitant to update. I was hoping this would resolve itself before the next obs-cli update, so I don't have to introduce breaking behavior. |
Okay. Keep up the good work! |
Could we get an alpha pre-release? |
Since there are still a few unimplemented commands (labels, e.g.), I'm not sure the current state warrants a pre-release. You can always build this yourself with a simple |
I started obs-cmd with a minimal obs-websocket 5 support |
Was this abandoned? |
Hi! I hit #61 and noticed that the
goobs
library just released an update with protocol v5 compatibility. I figured I'd hack a little bit and try to get things building with the new version.This PR seems to work, but there are a few things that I just commented out since I couldn't figure out the "new world" way of doing things:
label
command, since I couldn't find anything similar to the Freetype2 stuff in the current versionrecordingStatus
no longer prints the filename being recorded to, since that doesn't seem to be in the new API responsevirtualCameraStatus
no longer prints the timecode for the same reasonI left
TODO
comments to mark the unfinished bits. I may not have time to polish this up to a state where it can be merged, so feel free to use as inspiration, push new commits and / or close the PR. Since this is a breaking change it probably deserves a version bump & some kind of warning to people with old versions ofobs-websocket
.Cheers :)