Git Product home page Git Product logo

simpleobsws's People

Contributors

benedictst avatar chthiele avatar popcorn9499 avatar tt2468 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

simpleobsws's Issues

Consider changing the license to LGPL or MIT

I plan to develop a patch for streamdeck-ui to use Python library for obs-websocket to directly communicate with OBS. streamdeck-ui is licensed under MIT.

The other Python obs-websocket libraries are licensed under MIT. Your library uses GPL which will enforce all application using your library to be under GPL as well. Please consider changing the license to LGPL or even better MIT. Then changes to the library need to be published under LGPL, but applications using the library can use whatever they like.

Docker does not execute requirements.txt

Docker-compose is not executing correctly because the Dockerfile is not referencing the requirements.txt file.

I have fixed to make this work and will submit a PR. @tt2468 can you label the repo with hacktoberfest topic?

Please consider tagging a new release

Hey, it's been a while since a new release was tagged, and the license of the software has also changed in the meantime.

Please consider tagging a new release.

thanks!

Simpleobsws to perform the scene change

Hi !,
i would like to use your software to run a certain scene in obs;
these are the scenes currently loaded in my obs:

request = simpleobsws.Request( "GetSceneList" )

"scenes": [
{
"sceneIndex": 0,
"sceneName": "Scene 5"
},
{
"sceneIndex": 1,
"sceneName": "Scene 4"
},
{
"sceneIndex": 2,
"sceneName": "Scene 3"
},
{
"sceneIndex": 3,
"sceneName": "Scene 2"
},
{
"sceneIndex": 4,
"sceneName": "Scene"
}
]

I would like to use the "set Scene Name" (or another) function to execute, for example, "Scene 5", but I don't understand the syntax of the command itself.
Can you please give me a correct example to run, through your script "sample_request.py", the execution of a certain scene, among those present in obs studio
Many thanks !

warning. asyncio.get_event_loop deprecation

Not sure as of this exact moment the best way to handle this going forward but asyncio.get_event_loop is deprecated starting in python 3.10.

your best bet may be to either not store self.loop in the object and use asyncio.get_running_loop
or in something like connect which seems to be the first thing one may call asyncio.get_running_loop

or better yet replace loop.create_task with asyncio.create_task as functionally for what you are doing these are in fact the same

`ws.wait_until_identified` times out causing `NotIdentifiedError`

Hello, I'm trying to run sample_request.py from the samples, but I can't seem to get a connection to my obs websocket.

When I run sample_request.py this is what I see in the obs logs:

00:55:04.121: ------------------------------------------------
00:55:04.404: [obs-websocket] WSServer::start: Not locked to IPv4 bindings
00:55:04.407: [obs-websocket] server started successfully on port 4444
00:55:04.407: [obs-websocket] IO thread started.
00:55:11.581: [obs-websocket] new client connection from [::ffff:127.0.0.1]:57954
00:56:51.609: [obs-websocket] Websocket connection with client 'Unknown' closed (disconnected). Code is 1006, reason is: 'End of File'

I tried increasing the timeout parameter to wait_until_identified but that only caused a delay before repeating the same behavior.

Any pointers on how to debug this?

System info:
Ubuntu 20.04, using obs-websocket-4.9.1 and simpleobsws installed via pip install which gave me version 1.3.1

var typo `authresult` vs `authResult`

In

authResult = await self.call('Authenticate', {'auth':auth})
if authResult['status'] != 'ok':
await self.disconnect()
raise ConnectionFailure('Server returned error to Authenticate request: {}'.format(authresult['error']))

lines 48 and 49, the var is called authResult, but in line 51 it's referred to as authresult (lowercase r)

I've made this sort of mistake/typo more times than I can remember. If it helps, python's style guide suggests[1] (in large part to set a "standard" so it's easy to remember) that variables be named all lowercase, and use _ separators. In this specific case, that might be auth_result

HTH

[1] https://www.python.org/dev/peps/pep-0008/#function-and-variable-names

Updating Text GDI - "your request type is not valid"

I am attempting to utilize this to make a batch update of text sources and am trying to make a proper change to a single TextGDI and when attempting to do so I am running into this errror.

not sure what I am doing wwrong, I've tried multiple ways and other 'things' and i keep getting "your request type is not valid"
I've tried other requests which are not in the samples and they wont work either?
like GetSourcesList for example

eq = simpleobsws.Request('SetTextGDIPlusProperties', {'source': "Test Text GDI", 'text': "Test Text GDI"})
    ret = await ws.call(req)

requests.append(simpleobsws.Request('GetVersion')) # Build a Request object, then append it to the batch
requests.append(simpleobsws.Request('GetStats')) # Build another request object, and append it
requests.append(simpleobsws.Request('SetTextGDIPlusProperties', {'source': "TEST TEXT GDI", 'text': "Miracle?"}))
ret = await ws.call_batch(requests, halt_on_failure = False) # Perform the request batch
print(ret)
    text = "Testtting"
    data = {"sourceName": "Test Text GDI", "text": text}

    result = await ws.call('SetTextGDIPlusProperties', data) # Make a request with the given data    
    print(result) 

Your request type is not valid

yuan = simpleobsws.Request('TakeSourceScreenshot', {'sourceName':"main", 'saveToFilePath':"D:\\images\\" , 'fileFormat':'png', 'compressionQuality':"-1", 'width':"1920", 'height':"1080"})
ret2 = await ws.call(yuan)
if ret2.ok():
    print("Request succeeded! Response data: {}".format(ret2.responseData))

My code is like this. Is there any problem? Why are errors always displayed. obs-version 27.2.4, obs-websocket version 5, simpleobsws version 1.3.1. thanks!

How to listen on event whilst running different loop at same time

So I am working on this thingy where I use my MIDI Keyboard with drumpads as a kind of streamdeck but than different.

I need to use a:

async def mainloop():
    running = True
    while running:
        for msg in midi_in.iter_pending():
            # do stuff here with msg

What ever I try, it doesn't want to run both at the same time

Here is a list with things I tried:

  • using loop.create_task(mainloop())
  • threading loop.run_forever and running asyncio.run_coroutine_threadsafe(mainloop(), loop)

But yeah I just need to listen on the CurrentProgramSceneChanged and CurrentSceneCollectionChanged events and the events from my midi input.

Please help me out!

P.s. There is some kind of pressure on this, cause it is needed pretty soon!

How can I change scene?

Hi! Sorry to report a bug to ask help how to change scene, may you please share with me an example? Thank you a lot
I've just figured out (after more than one hour) that OBS doesn't support sendkeys ((((( it was very easy to suppose a simple keystroke can solve my problem..
Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.