Skip to content

Instantly share code, notes, and snippets.

@jsfag
Created August 28, 2022 10:15
Show Gist options
  • Save jsfag/20dc6232777ddb344de7981da3f877fc to your computer and use it in GitHub Desktop.
Save jsfag/20dc6232777ddb344de7981da3f877fc to your computer and use it in GitHub Desktop.
FFMPEG converts all *.PNG without alpha to *.JPG in the current directory.
for %%i in (*.png) do ffmpeg -y -i "%%i" -vf format=yuva444p,geq='if(lte(alpha(X,Y),16),255,p(X,Y))':'if(lte(alpha(X,Y),16),128,p(X,Y))':'if(lte(alpha(X,Y),16),128,p(X,Y))' "%%~ni".jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment