marklagendijk / obs-scene-execute-command-script

OBS script for executing any CLI command whenever whenever a scene is activated
MIT License
28 stars 6 forks source link

Obs #3

Closed iands10 closed 3 years ago

iands10 commented 3 years ago

Hi since I have downloaded the latest version of obs studio the scripts have stopped working. Have you got any advice?

marklagendijk commented 3 years ago

Can you try the following:

  1. Change scenes a few times
  2. Open the script log (Tools -> Script -> Script Log Button)

Please copy the output here.

iands10 commented 3 years ago

Thanks for getting back to me. I shall look tomorrow when I am setting up for my livestream on sunday

iands10 commented 3 years ago

I tried switching scenes quite a few times but the command print screen was not appearing

marklagendijk commented 3 years ago

I just tested with the latest version of OBS, and everything works as expected. Please check the script log as I described above. If an error occurs, it may appear there.

Try using a simple command as pause to check that it is executing commands.

iands10 commented 3 years ago

here is the script log. [scene_execute_command 2.lua] Activating Closing Titles. Command execution is disabled for this scene. [scene_execute_command 1.lua] Activating Closing Titles. Command execution is disabled for this scene. [scene_execute_command.lua] Activating Closing Titles. Command execution is disabled for this scene. [scene_execute_command 2.lua] Activating Musician 4 (R). Executing command: [scene_execute_command 2.lua] onvif-ptz goto-preset --baseUrl=http://192.168.1.109:8899 -u=admin -p=~ --preset=4 [scene_execute_command 1.lua] Activating Musician 4 (R). Command execution is disabled for this scene. [scene_execute_command.lua] Activating Musician 4 (R). Command execution is disabled for this scene.

marklagendijk commented 3 years ago

Hmm, it looks like you have the script loaded 3 times, did you do that on purpose. If the output is what you expected, but it isn't working, then try executing the command directly from Command Prompt. If there are any issues with the command you should then see them.

iands10 commented 3 years ago

Yes I’m running 3 separate cameras

KnatteAnka commented 3 years ago

question why not use a batchfile with 2 parameters? one for Ip, one for preset? if the command from above is wrong you have to change below the fix you did to it. https://ss64.com/nt/syntax-args.html StartBat.bat onvif-ptz goto-preset --baseUrl=%1 -u=admin -p=~~~~~ --preset=%2

Command in OBS: c:\Batchfile\StartBat.bat SCENE_VALUE

Scen command: http://192.168.1.109:8899 4

May be run with a debug script: Debug.bat

StartBat.bat http://192.168.1.109:8899 4
echo any Errors?
timeout 60