Last active
December 25, 2018 10:44
-
-
Save RPing/0fd5cf524a1b551b7da23c01d083dc84 to your computer and use it in GitHub Desktop.
Revisions
-
RPing revised this gist
Dec 25, 2018 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,12 @@ #!/bin/sh # sh gif2mp4.sh <gif url/local file> <loop count> # output file will be out.mp4 ffmpeg -f gif -i $1 -pix_fmt yuv420p -vcodec libx264 tmp.mp4 for (( i = 0; i <= $2; i++ )) do printf "file tmp.mp4\n" >> list.txt done ffmpeg -f concat -i list.txt -c copy out.mp4 rm -f list.txt tmp.mp4 -
RPing created this gist
Dec 25, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ #!/bin/sh ffmpeg -f gif -i $1 -pix_fmt yuv420p -vcodec libx264 tmp.mp4 for i in {1..$2}; do printf "file out.mp4\n" >> list.txt; done ffmpeg -f concat -i list.txt -c copy out.mp4 rm -f list.txt tmp.mp4