This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert mp4 to png array | |
for f in *; do echo "Got '${f}'"; cd ${f}; mkdir ~/Desktop/frames/${f}; ffmpeg -i ${f}.mp4 -vf scale=600:-1 -r 29.97 ~/Desktop/frames/${f}/ffout_"${f%.mp4}%03d.png"; cd ..; done | |
// Convert png array to gif | |
for D in *; do echo "Got '${D}'"; cd ${D}; convert -dispose none -delay 3 -loop 0 ffout* ~/Desktop/gif/${D}.gif; cd ..; done | |
// Scale mp4 to png array at certain size | |
for f in *.mp4; do ffmpeg -i ${f} -vf scale=160:-1 -r 29.97 ~/Desktop/"${f}"; done | |
// PNG array to gif with transparent background |