Failing to install websockets 4.9 on OBS 27 in Ubuntu

davyboy

New Member
Specifically I'm on the latest version of UbuntuStudio (essentially Kubuntu) which comes with OBS version 27.x prepackaged and I'm trying to get obs-cli up and using it to automate streams on a timed basis.

I downloaded and installed the .deb from https://github.com/obsproject/obs-websocket - specifically the 4.9-compat. No websocket menu appeared in OBS when started. I then thought that maybe I had to install the 5.0.5 as well, since it said that 4.9-compat provides legacy support. And success! The websocket menu appears in OBS. However, when I fire up obs-cli and try to send requests it tells me that it doesn't understand the messages and that I may have a server-client version mismatch.

I realise version 27 is old news, but, as I understand it, obs-cli doesn't yet support the 5 sockets in the latest OBS, so installing the flatpak version 29 doesn't look to be much help to what I want to do.

Am I missing some trick?

Thanks in advance for any pointers anyone can give me.
 

AaronD

Active Member
The protocol is indeed different and incompatible from 4.9 to 5.0. I found that out when I was still using a Python script to synchronize scene switches between two instances of OBS. One library works for 4.9, and a different one works for 5.0. I got it working, but now that the Advanced Scene Switcher plugin has the features to support it, I'm doing it that way instead, all inside of OBS.

What are you trying to do?
 

davyboy

New Member
Thanks for responding. I'm not married to any particular version of OBS for it. I want to be able to start/stop streaming/recording and change scenes on demand at certain times of certain days and have a defined scene sequence on each day. My plan was to use obs-cli commands in cron, but I'm falling at the first hurdle.

I didn't think that Advanced Scene Switcher had that granular a scheduler, but I read now that it does. Maybe I can get around it with Advanced Scene Switcher by just starting OBS with --startstreaming from cron and then killing it when I want to end the stream?
 

AaronD

Active Member
Maybe I can get around it with Advanced Scene Switcher by just starting OBS with --startstreaming from cron and then killing it when I want to end the stream?
I think you could do *everything* in AdvSS. Just keep OBS running, and it does the rest. The cron job, then, is just for PC maintenance: update, reboot, start OBS @reboot, etc.
 

AaronD

Active Member
By the way, if you add the PPA (sudo apt-add-repository ppa:obsproject/obs-studio), then the normal update tools will get you v29 automatically. You may or may not want that. I did, on UStudio 22.04 LTS, and it seems to work fine for me.

Do be aware though, that v27 was the last to use the outdated version of Qt (graphics library). v28 and newer use a version that is actively supported again...which breaks almost all plugins. They'll fail to load, and thus save their settings when OBS closes, and then all of their settings are gone, even if you update the plugins later. So back them up *before* upgrading (screenshots if nothing else), upgrade both OBS and all the plugins at the same time, THEN start OBS for the first time, and re-import the backup(s) as necessary.
 
Top