Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Machine now sleeps during encoding #334

Closed
dongafford opened this issue Apr 26, 2022 · 7 comments
Closed

Machine now sleeps during encoding #334

dongafford opened this issue Apr 26, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@dongafford
Copy link

Fastflix 4.8.1 and lower kept my machine from sleeping during encodes. With Fastflix 4.9.1, the application no longer keeps my machines from sleeping during encodes. Encodes appear to resume without issue after waking from sleep.

This behavior happens on my laptop and desktop. I didn't use 4.9.0, so it could also be in that version. I can work-around with power settings, but I did appreciate this option.

@cdgriffith cdgriffith added the bug Something isn't working label Apr 26, 2022
@cdgriffith
Copy link
Owner

That is definitely due to the new queue system with 4.9.0+ I have it set the command for it not to sleep during encodes still, but only for each command it runs. I didn't think it would chose to sleep in the second between command when there would still be some CPU usage ☹️

Thanks for letting me know, I can change where that logic is run hopefully pretty simply, can work on that in the next few day!

@dongafford
Copy link
Author

Thanks for jumping on these so fast. I was actually seeing the machine go to sleep during the encode.

I came back to say that when I did an uninstall / reinstall and cleared out the old log files, the cover files, and queue.yaml file the issue went away. I was seeing a message on one machine that the queue file was unusable and that's what sent me down this path. Maybe I had too many log files in there? I might have had close to 150 logs, ~50 temp folders, and 2600 cover files on one of the machines as I was doing a lot of extras encoding.

I usually upgrade in place with the installer. This time I went from 4.8.1 to 4.9.1 directly.

I will load up a bunch of Blu-Ray "extra" files tonight and see if I can cause it to sleep at some point. I'd say hold off on making changes until I let you know what I see tomorrow. I think clearing out the directory might have fixed it.

@dongafford
Copy link
Author

OK. I have an issue where one of my machines will do whatever is in the After Conversion option box after every encode.

I have two machines I use to do encodes. My main encoding machine is a laptop with an AMD Ryzen 7 5000 series processor. That one seems to still show the issue. When it finishes an encode, it does whatever I have set in the "After Conversion" box. I had it set to hibernate after conversion and it diligently did that every time it finished a file. I set the After Conversion option to None and it appears to be working as advertised. This sounds like it may be related to your post.

My other machine is a desktop with an i7 9700. I will use it from time to time for encoding. That machine did exhibit the issue I originally reported, but once I cleared everything out, it has stopped doing that. The After Conversion option behaves as expected and only does the action after the queue is completed.

Let me know if you need me to check anything.

@dongafford
Copy link
Author

dongafford commented Apr 26, 2022

Now I'm completely confused. I disabled the Windows power plan settings on my laptop to disable the computer going to sleep while plugged in and Fastflix encoded for about 3 hours then the computer went to sleep. In checking the logs, Fastflix started the encode, ran for 4 seconds, then the computer went to sleep.

I have no after conversion steps. I'm going to finish the queue and then do a complete uninstall / reinstall wiping out the Fastflix directory under AppData. If that doesn't work, I'll drop back to 4.8.1

Here's a snippet of the logs:

2022-04-26 03:34:36,293 - frame= 1 fps=0.0 q=0.0 size= 14kB time=00:00:00.59 bitrate= 194.3kbits/s speed=11.9x
2022-04-26 03:34:36,806 - frame= 44 fps=0.0 q=32.0 size= 14kB time=00:00:02.02 bitrate= 57.4kbits/s speed=3.43x
2022-04-26 03:34:37,323 - frame= 64 fps= 58 q=29.1 size= 14kB time=00:00:02.66 bitrate= 43.6kbits/s speed=2.42x
2022-04-26 03:34:37,816 - frame= 82 fps= 51 q=25.9 size= 14kB time=00:00:03.41 bitrate= 34.0kbits/s speed=2.13x
2022-04-26 03:34:38,385 - frame= 103 fps= 49 q=27.8 size= 14kB time=00:00:03.99 bitrate= 29.1kbits/s speed=1.89x
2022-04-26 03:34:38,941 - frame= 123 fps= 46 q=27.9 size= 32kB time=00:00:04.69 bitrate= 56.1kbits/s speed=1.77x
2022-04-26 03:34:39,389 - frame= 139 fps= 44 q=27.1 size= 512kB time=00:00:05.22 bitrate= 802.6kbits/s speed=1.65x
2022-04-26 03:34:40,115 - frame= 156 fps= 40 q=28.4 size= 512kB time=00:00:05.80 bitrate= 722.9kbits/s speed=1.49x
2022-04-26 06:59:41,109 - frame= 163 fps=0.0 q=29.5 size= 512kB time=00:00:05.97 bitrate= 702.1kbits/s speed=0.000485x
2022-04-26 06:59:41,640 - frame= 180 fps=0.0 q=26.5 size= 512kB time=00:00:06.61 bitrate= 634.2kbits/s speed=0.000537x
2022-04-26 06:59:42,148 - frame= 198 fps=0.0 q=29.6 size= 512kB time=00:00:07.14 bitrate= 586.9kbits/s speed=0.000581x
2022-04-26 06:59:42,746 - frame= 213 fps=0.0 q=29.7 size= 512kB time=00:00:07.65 bitrate= 547.7kbits/s speed=0.000622x
2022-04-26 06:59:43,336 - frame= 231 fps=0.0 q=28.7 size= 512kB time=00:00:08.29 bitrate= 505.5kbits/s speed=0.000674x
2022-04-26 06:59:43,828 - frame= 243 fps=0.0 q=29.8 size= 512kB time=00:00:08.68 bitrate= 483.1kbits/s speed=0.000705x
2022-04-26 06:59:44,315 - frame= 256 fps=0.0 q=28.8 size= 512kB time=00:00:09.13 bitrate= 459.4kbits/s speed=0.000742x
2022-04-26 06:59:44,829 - frame= 271 fps=0.0 q=28.9 size= 512kB time=00:00:09.62 bitrate= 435.9kbits/s speed=0.000782x
2022-04-26 06:59:45,345 - frame= 286 fps=0.0 q=28.9 size= 512kB time=00:00:10.09 bitrate= 415.7kbits/s speed=0.00082x
2022-04-26 06:59:45,883 - frame= 303 fps=0.0 q=30.1 size= 512kB time=00:00:10.66 bitrate= 393.2kbits/s speed=0.000866x
2022-04-26 06:59:46,374 - frame= 319 fps=0.0 q=30.1 size= 512kB time=00:00:11.24 bitrate= 373.1kbits/s speed=0.000913x
2022-04-26 06:59:46,862 - frame= 332 fps=0.0 q=30.1 size= 512kB time=00:00:11.67 bitrate= 359.4kbits/s speed=0.000948x

@cdgriffith
Copy link
Owner

I might have had close to 150 logs, ~50 temp folders, and 2600 cover files on one of the machines as I was doing a lot of extras encoding.

Holy cow. The temp folders and covers should be deleted when cleanly exiting the program, so that is worrying to hear. Can at least add a "cleanup temp folders" option in Help like there is "Cleanup old logs" option.

As for the sleeping, my guess is that it detects "oh hey I can sleep!" after an encode, and starts the sleeping. So as the next one starts and says "hey don't go to sleep!" it's already too late and in the process of going to sleep as it starts up a few seconds in.

Re-writing it to send that notice of "ok you can sleep" until after entire queue is done / pause encode is hit.

Thank you for all the details, makes life a lot easier on my end to think through things!

@dongafford
Copy link
Author

I'll make sure to clean the old files out more often. I was doing a lot of small files over the last week or so. Those extras mean I'd do about 20-50 files in the timeframe where I would do one film. I'm not sure why mine weren't being deleted. I'm thinking it might be due to having just upgraded over and over from older versions.

That definitely makes sense about the "hey I can sleep" commands. I think your solution is a good one.

Work's been crazy today, so I haven't had a chance to reinstall. I'll update you later. If there's anything that's a nice to have when reporting these issues, please let me know.

I am enjoying the ignore errors option. I've found that when there is a title name or descriptive name on a track that has a double quote (") in it, FFMPEG (or Fastflix) doesn't like it. I've started converting these to single quote (') to fix the issue as I add the file, but I will sometimes miss those.

cdgriffith added a commit that referenced this issue Apr 27, 2022
* Fixing After Conversion command running after every encoding (thanks to Don Gafford)
cdgriffith added a commit that referenced this issue Apr 27, 2022
* Fixing #334 machine now sleeps during encoding (thanks to Don Gafford)
* Fixing After Conversion command running after every encoding (thanks to Don Gafford)
@cdgriffith
Copy link
Owner

Adding #336 to track the new cleanup option at some point, and #337 for the double quotes.

Hopefully fixing the core of these issues with 4.9.2 https://github.com/cdgriffith/FastFlix/releases/tag/4.9.2

Let me know if you run into any more issues with it! Thanks again for all the details!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants