sabaatworld / HyperionScreenCap

Screen capture program for Hyperion ambilight. Updated to support DirectX 11, multiple displays and multiple Hyperion servers.
MIT License
118 stars 18 forks source link

[feature request] screen capture after resume from sleep + controlling screen capture through command line #45

Open Dinth opened 3 years ago

Dinth commented 3 years ago

Hi. Just wanted to request a small feature - if the computer goes to sleep with Screen Capture enabled, it should also have Screen Capture enabled after resuming from sleep. Right now sleep disables screen capture (while the app is still running and in taskbar) and switching it back on is not always easy (especially with PCs controlled only with TV remote). It would also be nice to control screen capture (stopping and starting) with command line - this way it could be easily hooked up to a TV remote.

n0valis commented 3 years ago

I have the same problem. Thes uggestion Dinth made does quite make sense. Is there a possibility that this is going to be implemented or most probably not? Thanks.

sabaatworld commented 3 years ago

Does the API thing not work for you?

Dinth commented 3 years ago

Does the API thing not work for you?

Hi @sabaatworld. Is there a way of triggering "Start Capture" in HyperionScreenCap client through API somehow? is there any documentation of that?

sabaatworld commented 3 years ago

Enable API support in it. It should let you start. I don't have documentation but you can look at the code to figure out how to use.

When I get a chance, I'll add some documentation regarding the same to the readme.

Dinth commented 3 years ago

Hi. Im playing with the API at the moment but it doesnt seem it work. It is enabled on API port 9191. When i open http://:9191/API?command=ON&force=False im getting

Bad Request - Invalid Hostname
HTTP Error 400. The request hostname is invalid. 

error

[edit] I have actually done some research and it seems that "hostname" should contain "*" for API to work

public void StartServer(string hostname, string port)
--
… |  
18 | if (_server == null)
19 | {
20 | _server = new RestServer
21 | {
22 | Host = hostname,
sabaatworld commented 2 years ago

I've released a new version today which should fix the issue. Let me know if it works for you.

Dinth commented 2 years ago

Amazing, will test the new version this evening!

papapep514 commented 1 year ago

Anyone have documentation of this API?