Created
October 1, 2017 09:07
-
-
Save jemsgit/7e45514fe49a227681dcc7c0058e0316 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| echo "Введите rate раскадровки" | |
| read VideoRate | |
| echo "Введите ширину новых изображений" | |
| read WIDTH | |
| echo "Введите rate для gif" | |
| read GIfrate | |
| Filename=$1; | |
| DestName='resized_im'; | |
| VideoImages='frames'; | |
| mkdir $DestName; | |
| mkdir $VideoImages; | |
| ffmpeg -i "$Filename" -r "$VideoRate" "$VideoImages"/image_%010d.png; | |
| echo "Раскадровка завершена. Ресайзинг..." | |
| cd $VideoImages | |
| for i in *.png; do convert $i -resize "$WIDTH" ../"$DestName"/$i; done | |
| echo "Ресайз завершен. Конвертирование..." | |
| cd ../$DestName; | |
| convert -delay "$GIfrate" -layers optimize *.png ../animation2.gif; | |
| cd .. | |
| rm -rf $DestName; | |
| rm -rf $VideoImages; | |
| echo "Успешно" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment