Skip to content

Instantly share code, notes, and snippets.

@rebooting
Last active March 18, 2023 11:14
Show Gist options
  • Select an option

  • Save rebooting/8b80729a196a7245eb3324ab2353ed8c to your computer and use it in GitHub Desktop.

Select an option

Save rebooting/8b80729a196a7245eb3324ab2353ed8c to your computer and use it in GitHub Desktop.
resize image with only ffmpeg ( if you don't want to install ImageMagick)
```
#!/bin/sh
for file in *.png
do
ffmpeg -i $file -vf scale=720:-1 "Small-$file.png"
done
```
@rebooting
Copy link
Author

rebooting commented Mar 18, 2023

To convert PNG to JPEG with quality option:
where qscale 2 - 31

for file in *.png 
do  
	
	ffmpeg -i $file -vf scale=720:-1 -qscale:v 8 "Small-$file.jpg"
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment