Convert:
1 2 3 4 5 6 7 |
// mov to mp4 ffmpeg -i inputfile.mov -c:v libx264 -c:a aac -vf format=yuv420p -movflags +faststart outputfile.mp4; //mp4 to gif ffmpeg -i inputfile.mp4 -pix_fmt rgb24 outputfile.gif; |
Do Loop:
1 2 3 |
//cd to directory for file in *.mp4; do ffmpeg -i "$file" -pix_fmt rgb24 "${file%.mp4}".gif; done |
Do remove space from name file:
1 2 3 |
//cd to directory for file in *.gif; do mv "$file" "${file// /_}"; done |