-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
36 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from shutil import copyfile | ||
from os import listdir | ||
from os.path import isfile, join | ||
|
||
onlyfiles = [f for f in listdir('./new/') if isfile(join('./new/', f))] | ||
onlyfiles.sort() | ||
print(onlyfiles) | ||
|
||
i = 1 | ||
for infile in onlyfiles: | ||
if infile[len(infile)-3:len(infile)] == 'png': | ||
if i <= 9: | ||
suffix = f'00{i}' | ||
elif i <= 99: | ||
suffix = f'0{i}' | ||
else: | ||
suffix = f'{i}' | ||
|
||
copyfile('./new/'+infile, f'./files/image_{suffix}.png') | ||
i += 1 | ||
|
||
# ffmpeg -framerate 1/5 -pattern_type glob -i "./files/*.png" -vf "fps=25" out.mp4 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" |
Binary file not shown.