gifski
gifski copied to clipboard
Windows: drag-and-droppable batch files like for pngquant?
So recently I had the luck that I could help out a scientist friend who had gigantic, mostly-empty PNGs of his data with only a handful of colours, by using pngquant to vastly reduce the PNG size without any visible loss.
To my very happy surprise, it came with a drag-and-drop batch file for automatically reducing a large stack of images, and it's pretty simple:
@echo off
set path=%~d0%~p0
:start
"%path%pngquant.exe" --force --verbose --quality=45-85 %1
"%path%pngquant.exe" --force --verbose --ordered --speed=1 --quality=50-90 %1
shift
if NOT x%1==x goto start
I was wondering: could we add the same for the Windows build of gifski? Or maybe even a version that includes ffmpeg to make converting a bunch of videos as simple as dragging/dropping it on the batch file?
In theory yes. In practice, I'm not a Windows programmer, and whenever I try to do something on Windows it makes my cry, so there's zero chance it will come from me.
ffmpeg is pretty hard to compile on any platform. I have no idea how to build that on Windows, and to make it redistributable.
There's a GUI for macOS.
For Windows, your best bet is to install ffmpeg separately and then script it yourself to make temporary PNG frames.
Not a Windows dev either but stuck with it for now.
If you give me some sensible parameters to pass to gifski I could try working out the bat file!
I can also try to make an ffmpeg-one, put it in a sub-folder together with an html file titled [IMPORTANT] Store ffmpeg.exe in this folder.html
which contains this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ffmpeg required</title>
</head>
<body style='text-align: center;font-weight: bold;'>
<p>The drag and drop batch files only work if there is an ffmpeg.exe binary in the same folder. You can download one from:</p>
<p><a href='https://ffmpeg.org/'>https://ffmpeg.org/</a></p>
</body>
</html>
Would be about as basic yet still helpful as the instrutions can get, no?
There's nothing to configure in gifski. You need to specify -o output-path
and PNG frames. https://gif.ski
Well that makes it easier :)
BTW, since generating the downloadable releases doesn't seem to be part of the repo, should I just copy the .bat
file here once I figured it out?
Yes, please drop files in win/
folder, and I'll copy them to the package.
@JobLeonard
FYI, basically anybody can create that kind of frontend easily in a less then hour with external tool/dsl such as AutoHotkey
FYI, basically anybody can create that kind of frontend easily in a less then hour with external tool/dsl such as AutoHotkey
Why dont u do it then if its so easy and quick?
(for the record, I switched back to Linux so I haven't been able to finish this small task (and obviously also completely forgot about it, my bad))
Hey @JobLeonard, I know you might be busy but can you please tell us your progress so far?
Well...
(for the record, I switched back to Linux so I haven't been able to finish this small task (and obviously also completely forgot about it, my bad))
still the same ehh.. well hope you find the time someday to finish it.