4 ms·
at first i thought this was some sort of wrapper around vips[1] which is extremely powerful, but whose CLI leaves a lot to be desired. even so, i make use of it
by arrakeen 4y ago
at first i thought this was some sort of wrapper around vips[1] which is extremely powerful, but whose CLI leaves a lot to be desired. even so, i make use of it quite a bit. here's how i'd convert the webps to png:
parallel vips copy {} {.}.png ::: *.webp
[1] https://www.libvips.org/API/current/using-cli.html https://www.libvips.org/API/current/using-cli.html
- Uehreka 4y agoHow does this deal with throttling those operations? Like, if I’m converting 100 or 1000 PNGs to Webp, I probably only want 12-ish operations going on at a time so my CPU isn’t context-switching like crazy and the PNGs don’t all load into RAM at once.
- anamexis 4y agoThey're using GNU parallel, which will default to the number of CPU threads available, but which can be tweaked to your liking. https://www.gnu.org/software/parallel/sphinx.html https://www.gnu.org/software/parallel/sphinx.html
- giantrobot 4y agoWhile I love GNU Parallel there's also the venerable (and installed by default) xargs.