OrangeJedi / Aerial

Apple TV screen saver for Windows
MIT License
715 stars 26 forks source link

Idle during video playback still triggering Aerial #114

Closed SquaredCircle84 closed 1 year ago

SquaredCircle84 commented 2 years ago

Running Aerial 1.0.2 on Windows 10. It seems that video playback does not suspend Aerial from triggering when idle. In other words, I could be watching a video on YouTube, Netflix, etc., and Aerial will still activate when I haven't moved the mouse.

OscBacon commented 2 years ago

+1, experienced the same with Netflix

OrangeJedi commented 2 years ago

I have been able to reproduce this bug. It makes sense why it is happening and I'll be looking into ways to fix it ASAP. There are some good thoughts in #113 on a solution and I'll keep the technobabble over there. Thanks for pointing this out!

SquaredCircle84 commented 2 years ago

I have been able to reproduce this bug. It makes sense why it is happening and I'll be looking into ways to fix it ASAP. There are some good thoughts in #113 on a solution and I'll keep the technobabble over there. Thanks for pointing this out!

Thank you! Apologies for not seeing #113. I wouldn't have posted this if I had noticed it.

OrangeJedi commented 2 years ago

It's far from a fix, but in v1.1.0 I added a temporary suspend feature to Aerial's tray menu that can help mitigate this issue. I'm still on the lookout for a real way to get around this.

SquaredCircle84 commented 2 years ago

It's far from a fix, but in v1.1.0 I added a temporary suspend feature to Aerial's tray menu that can help mitigate this issue. I'm still on the lookout for a real way to get around this.

Appreciate your efforts in looking to get this issue resolved!

OscBacon commented 2 years ago

Same, thanks!

On Sat, Nov 12, 2022, 22:33 SquaredCircle84 @.***> wrote:

It's far from a fix, but in v1.1.0 https://github.com/OrangeJedi/Aerial/releases/tag/v1.1.0 I added a temporary suspend feature to Aerial's tray menu that can help mitigate this issue. I'm still on the lookout for a real way to get around this.

Appreciate your efforts in looking to get this issue resolved!

— Reply to this email directly, view it on GitHub https://github.com/OrangeJedi/Aerial/issues/114#issuecomment-1312546304, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEDMUDEIXBT4RU7BTWXJP3WH7PIBANCNFSM6AAAAAARR63Q2Q . You are receiving this because you commented.Message ID: @.***>

LeeBuckland commented 1 year ago

Just sharing a thought here, since I am also experiencing this issue. Have you considered creating a native Windows screensaver that will just launch your screensaver? One decent article about this is https://sites.harding.edu/fmccown/screensaver/screensaver.html

OrangeJedi commented 1 year ago

@LeeBuckland Great thoughts. Originally Aerial was launched as a native Windows screensaver but we had a lot of performance issues. (see #36). Launching it as a separate app might get around that. However, I've also heard that the screensaver API might be changing or going away soon as it is so archaic.

I'll take a look at if using a screensaver.scr would be ideal for launching Aerial and not backtracking.

ThinkSalat commented 1 year ago

I don't have really any domain knowledge here but I have a thought about a potential work around. As it appears the screensaver api can't handle files the likes of which Aerial uses, I can think of 2 potential solutions:

  1. run a daemon that activates whenever the screensaver activates - have it deactivate the screensaver and activate aerial instead. Then the user can simply set their preferred screensaver time - aerial daemon will detect it, cancel the screensaver and run aerial instead.

  2. Potentially the screensaver API has a cache/memory allotment that causes the performance issues. I'm just guessing here, but there could potentially be a way to increase this allotment to the size of the largest video. Just a couple thoughts as the temporary suspension really is a poor workaround imo.

sebekhtc commented 1 year ago

Why not to simply create .scr that will trigger the video in the current app?

darkj2k commented 1 year ago

Why not to simply create .scr that will trigger the video in the current app?

I second this.

ThinkSalat commented 1 year ago

@OrangeJedi is this what you'd tried when you referenced #36? Making a .scr with the videos?

OrangeJedi commented 1 year ago

@ThinkSalat Pretty much. When I first made Aerial is was a .scr file that used the Window's screensaver API to run. However, when running as a screensaver Aerial had lots of performance issue (frame stuttering, excessive CPU usage, etc.) which you can read about in #36. That's why I switched it to a self launching application in v1.0.0 .

You can still run Aerial as a .scr file, you just need to rename it. Simply find Aerial.exe (it should be at "C:\Users\%username%\AppData\Local\Programs\aerial\"), copy it, then rename it to Aerial.scr, and right-click and select the install option. Be sure to close any version of Aerial you already have running and to turn off the auto-launch feature (in the advanced menu).

If this is working well for you let me know, I could possibly include a Aerial.scr file for future releases without an auto launch feature for those interested and who aren't having #36 style problems.

ThinkSalat commented 1 year ago

This is great! Works fine for me. Not noticing frame stutters or cpu usage spiking

Message ID: @.***>

sebekhtc commented 1 year ago

This works for me too, just don't move the aerial.scr from the original location (keep where aerial.exe is). I made that mistake as old aerial.scr could be run straight from C:\Windows folder.

jorbig commented 1 year ago

This works for me as well, but after a while the screensaver hangs and just freezes for the remaining time... Not sure how to debug this problem.

OrangeJedi commented 1 year ago

Ok, I released a .scr file with in v1.2.1 that will solve the problem. I also added code so that if Aerial is ran as an admin it will detect if an app is preventing the computer from sleeping (playing video, etc.). Both solutions have their disadvantages, but the issue is now officially solved.

Thanks for all the feedback and help fixing this!

WillPresley commented 1 year ago

@OrangeJedi Cheers for the addition of this check when running as an Admin! That is very helpful and seems to work.

I do have a question, is there a good way to essentially combine 'Running as Admin' and 'Launching Minimized to the Tray at Boot'? I can put it in a Startup folder or start it through Task Manager to get it to run as Admin at startup. But I'm not positive on getting it minimized automatically to the tray icon, and retaining that functionality of the icon.