Hey nstechbytes, I noticed an issue with your ShotCap application - it isn't following a capture <interval> close to what is specified at the command line. The source code at the execution point seems alright in that regard, but in practice, things don't go as the command line instructs your application to do (resulting in the GIFs I capture with shotcap and gifski having a much slower animation speed than those captured with, say, licecap).
For example, if you have a Lua timer skin or even a simple current time skin displaying seconds on your screen, and run this command:your shotcap application should use a time interval of at least 0.04 * 1000 ms = 40 ms (give or take, considering how busy is the system) between captures, so the entire capture process for all the 125 images should last at least or around 125 * 40 ms = 5000 ms = 5 seconds. In practice, however, it lasts around 2 seconds, animating the GIF converted from those 125 images (i.e. the output) at an almost twice as slower speed compared to the animation speed of the stuff that was captured (i.e. the input) in my skin, which sets a FPS of 25 for the result (comparable to the frequency at which things were captured, e.g. 1000 ms / 40 ms = 25 FPS).Code:
shotcap -f C.png -r 750,300,416,416 -format png -p -repeat 0.04 125
By the way, it's the same result when using either gifski or ffmpeg to convert those 125 .png images to a .gif image, so it's not the fault of one of them. Also, when using a capture interval of 1 full second at the command line, things seem to work as expected, so my guess is the fact that you declared and retrieved your repeatInterval variable as an int (i.e. integer) instead of a float / double or similar for a fractional value - resulting in shotcap only using integer seconds as the interval between captures. The Sleep function seems to discard fractional ms values in one of its overloads, so you might get away easily with just the variable type modifications - if not, you could convert the value from fractional to integer in place, at the time of executing the said function.
I assure you that this application was not created with those intentions. However, if you bring an issue to my attention and I don't address it, that wouldn't be right. So, I’ve made the necessary updates and resolved the problem.
Link always be:https://shotcap.pages.dev/
Statistics: Posted by nstechbytes — Today, 4:11 pm — Replies 40 — Views 2538