Menu

Is there a way to make program restart after a power outage?

2022-02-17
2022-06-18
1 2 3 > >> (Page 1 of 3)
  • Ronald J Kienle

    Ronald J Kienle - 2022-02-17

    I have a huge backlog of files to clear to get my HD space back and I am running Batch 24/7/7 to do so and as a result I can have queues of many hundreds of files at a time. When the power goes out my machine comes back on but Batch doesn't and when I start it the queue is empty.

    I used to use MCEBuddy and it runs as a service that restarts with Windows, maintaining the queue and where it was and restarts encoding. Granted any encodings that were in process restart from the beginning but they do restart and the queue finishes as it would if the machine had not restarted.

    Is there any way to make Batch do this or would it be a possible upgrade for a later release? If I don't catch the restart I can loose a half day of encoding and then I have to figure out which files have finished and build a new queue. Not the end of the world but having Batch restart and remember where it was would be a life saver.

    Thanks as always Abel.

     
  • Abel

    Abel - 2022-02-17

    Hi, I'm about to stop application support for some time, personal circumstances. Creating a service to watch application status is a big task, out of the question. I'll look into some workaround for next release, last one for some time.

    I may add a few quick features like, run on startup, do not re-encode succesfull items, always save and reload current queue if application crashes.

    The point is that if power goes out, and then computer is configured to reboot automatically when it comes back, unless you have automatic login, application will not start again until you enter user/passwd.

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-02-18

    You have to take care of your life first Abel, we appreciate all you do. I hope everything with you is OK.

    This is not the end of the world Abel. I love the program the way it is now, I was just asking, I did not mean to add any stress to your life.

    I already have the machine I use this program on set to auto boot upon power failure and it also auto logs into my user account and emby and such restart for me. That way when I am out of town I can still access my emby programs on my phone without having to call the girlfriend and try to explain to her how to restart everything...LOL.

    I could configure Batch to run as a service myself, I did so for other programs....but when they are started they are then functioning. Batch needs to have a queue and the start button pushed....how to make those two happen are out of my scope of knowledge at this time.

    If you have time to add those features that would be great but if not due to your circumstances then it is not important.

    My only question would then be if those are added is how would I restart the encode process automatically without hitting the start button.

    Thanks Abel.

     
  • Abel

    Abel - 2022-02-18

    HI, thanks for the message. My idea is to combine existing and new settings to achieve this goal. TBI (to be implemented).

    • Enable 'Encoding autorun' (Starts queue automatically whenever files are added).
    • Enable 'Run on startup' (TBI).
    • Enable 'Ignore encoded items' (TBI).
    • Save current queue state every few seconds and reload unfinished one by default unless aborted manually or application closed by user (TBI).

    With all these features enabled, when there's a power outage, on reboot with automatic login, app should load, retrieve current queue state and start encoding, skipping successfully encoded items.

    I think this approach is feasable. As soon as I have a functional beta I'll let you know.
    Cheers

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-02-18

    Thanks Abel. I can test it immediately as soon as I realize it is available. I will run smaller batches of files for now so I can easily have the ability to restart a new queue each day or half day.

     
  • Abel

    Abel - 2022-02-21

    Beta version with experimental features for auto resume after power outage.

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-02-22

    Thanks Abel. Testing now......

    OK, when I queue up the files they start automatically but only sequential....multi-file does not happen.

    When I restart the computer Batch restarts upon Windows loading but the queue is empty.

    Is there something else I need to change in settings besides select "autorun". "Enable encoding autortun" and "multi-file autorun"

    Oh, one other thing....upon autorun will batch remember the Preset you have chosen? Mostly I run my default parameters but there are times I run special presets for things like TV shows etc. with need different settings.

     

    Last edit: Ronald J Kienle 2022-02-22
  • Ronald J Kienle

    Ronald J Kienle - 2022-02-22

    Also....is there any way to delay Batch from starting a bit. I would like my other programs to start first since some like underclocking my GPU directly affect encoding.

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-02-22

    BTW Abel.....I'm not complaining, just reporting back as I said I would.

     
  • Abel

    Abel - 2022-02-23

    No problem, I'll look into it soon.

     
  • Abel

    Abel - 2022-02-28

    New beta version with some fixes.

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-03-01

    Thanks Abel, just tried it. Thanks for adding the delay. But autorun even when multi-file autorun is selected still only starts one encoding process for me and upon a system restart the program loads but immediately shows a dialog box saying "file list empty" and the queue is still empy.

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-03-01

    Bigger problem. Now all my encodes fail. Even when I reverted to the first beta, and then back to 2.7.3....any idea what I could have done? Now nothing works.

    OK I looked at the log and the last line of output for each failed file is:

    Missing argument for option 'hwaccel'.
    Error splitting the argument list: Invalid argument

    But I don't know that this means as I did not change any of my settings or presets.

    I tried a different preset and the results are the same. All encodes fail immediately

    I uninstalled, and re-installed 2.7.3 and the same result. All fail

     

    Last edit: Ronald J Kienle 2022-03-01
  • Ronald J Kienle

    Ronald J Kienle - 2022-03-01

    OK...not sure what I borked but I completely removed Batch and settings, saving my presets ini file, rebooted and reinstalled and now it is working again....albeit 2.7.3

     
  • Abel

    Abel - 2022-03-01

    So many things. Anyway, I'm sharing a full installer with 2.7.5, to check if things start to work as expected. Just a reminder, auto-queue load only works if program crashes, if you abort queue or exit app properly, queue is not reloaded, you would need to save it before closing.

    Regarding auto-multi-file, I think I found the cause.
    Beta 2.7.5 installer

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-03-01

    I did not abort the queue or close the program to test....I hit the restart button on the front of my HTPC case to initiate a hard restart....essentially mimicking a power failure.

    Thanks Abel, will test later when I have a hole in my recording schedule so I can restart without losing a recording.

     
    • Abel

      Abel - 2022-03-01

      Another point, please allow a few seconds before hard-restarting :D. queue is saved after a few seconds.

       
  • Ronald J Kienle

    Ronald J Kienle - 2022-03-01

    OK, I will try again soon

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-03-02

    SUCCESS!! You are a genius Abel. Thanks so much.

    One question. On the delay, is that minutes or seconds? I selected "1" thinking it is a minute but it still started immediately.

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-03-02

    Another quick question. I moved the version of ffmpeg I was using, 4.4.1 Essentials, out of the install directory, installed and then tested and the new features work but my settings are not compatible with ffmpeg build 5 so I replaced it with the file I moved. Upon restart it requested me to verify this version of ffmpeg trusted. I did that.....but the build of ffmpeg being used is no longer visible at the top of the program window....will this come back after another restart?

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-03-02

    BTW....I will test this again in the next day or so when I have a window with no recordings to see how the queue works when it has 30 or so files that have already successfully encoded in it since I have only tested it a few minutes after initiating the queue.

    Thanks again Abel, I am very excited. Now I can go to California for 10 days knowing the 300 files I queue up will be done when I return. Last time I left for 10 days my house lost power within 12 hours of me leaving so nothing happened while I was gone....LOL.

    Much appreciated!!

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-03-02

    Another question....if I choose any preset other than "Default" will Batch remember my choice upon restarting after a power outage?

     
  • Abel

    Abel - 2022-03-02

    You're right, it should reload latest parameters, but loads default instead.
    Fixed here.

     
  • Ronald J Kienle

    Ronald J Kienle - 2022-03-04

    OK, I finally had a window with no recordings and I restarted my machine with Batch running and several days of completed titles in the queue and several more days of files to encode. Upon restart Batch opened not only to an empty queue but the parameters box was empty so I could not tell which files were running after I manually added the files and hit the start button.

    This was before I installed the latest BETA. It is now installed and I will check again as soon as I have 15 or so minutes with no recordings.

     
  • Abel

    Abel - 2022-03-04

    This is being tough to make it resilient. I've found the same issue as yours in some scenarios, blank
    I've made a couple of changes, so queue is never cleared unless it is aborted or application is closed using "Exit" button.

    Tested again, works reloading profile and restarting queue. Better use this one before any other test: FFBatch 2.7.5 B2

     
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.