Initial Commit
This commit is contained in:
parent
6009749402
commit
1f932b8370
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ImagesIn
|
||||||
|
ImagesOut
|
||||||
24
convert.py
Normal file
24
convert.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
|
||||||
|
from os import listdir, system
|
||||||
|
from os.path import isfile, join
|
||||||
|
|
||||||
|
mypath="ImagesIn"
|
||||||
|
|
||||||
|
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
|
||||||
|
|
||||||
|
#print("Here are the files in the Images folder")
|
||||||
|
for f in onlyfiles:
|
||||||
|
# print(f)
|
||||||
|
# print("Converting " + f + " from WebM to GIF.")
|
||||||
|
# system("ffmpeg.exe -i \"ImagesIn\\" + f + "\" \"ImagesOut\\" + f + ".gif\"")
|
||||||
|
print(f[-4:])
|
||||||
|
if f[-4:] == ".mp4":
|
||||||
|
print(f + " is an mp4 file, converting to GIF.")
|
||||||
|
system("ffmpeg.exe -i \"ImagesIn\\" + f + "\" \"ImagesOut\\" + f[:-4] + ".gif\"")
|
||||||
|
elif f[-5:] == ".webm":
|
||||||
|
print(f + " is a WebM file, converting to GIF.")
|
||||||
|
system("ffmpeg.exe -i \"ImagesIn\\" + f + "\" \"ImagesOut\\" + f[:-5] + ".gif\"")
|
||||||
|
|
||||||
|
#print("And that was all the files.")
|
||||||
BIN
ffmpeg.exe
Normal file
BIN
ffmpeg.exe
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user