-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (26 loc) · 1.45 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
generate:
convert 1.jpg -resize 2000x1125 -background White -gravity center -extent 2000x1125 -threshold 60% out.bmp
convert out.bmp -negate -morphology Thinning:-1 Skeleton out2.bmp
convert out2.bmp -negate out3.bmp
convert out3.bmp -shave 1x1 -bordercolor black -border 1 -rotate 90 out4.bmp
potrace -b svg -o preprocessed.svg out4.bmp
python3 run.py --svgin preprocessed.svg --svgout processed.svg --animate 1.mp4
ffmpeg -i 1.mp4 -vf "transpose=2" -y movie.mp4
rm out4.bmp out3.bmp out2.bmp out.bmp 1.mp4
wincheck:
python37 run.py --svgin out.svg --svgout output2.svg
windows:
imconvert 1.jpg -resize 2000x1125 -background White -gravity center -extent 2000x1125 -threshold 60% out.bmp
imconvert out.bmp -negate -morphology Thinning:-1 Skeleton out2.bmp
imconvert out2.bmp -negate out3.bmp
imconvert out3.bmp -shave 1x1 -bordercolor black -border 1 -rotate 90 out4.bmp
potrace -b svg -o preprocessed.svg out4.bmp
python37 run.py --svgin preprocessed.svg --svgout processed.svg --animate 1.mp4
ffmpeg -i 1.mp4 -vf "transpose=2" -y movie.mp4
rm out4.bmp out3.bmp out2.bmp out.bmp 1.mp4
gifit:
ffmpeg -i 2.mp4 -vf "fps=10,scale=800:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 1 -y output.gif
ffmpeg -i output.gif -y 4.mp4
ffmpeg -i 4.mp4 -filter:v "crop=800:500:0:300" -y 5.mp4
ffmpeg -i 5.mp4 -vf "fps=10,scale=800:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 1 -y output2.gif
rm 4.mp4 5.mp4