-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
48 lines (34 loc) · 981 Bytes
/
main.py
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import os
from time import sleep
import shutil
def python_files_caller():
i = 1
while i <= 4:
os.system("python " + str(i) + ".py")
sleep(0.25)
i += 1
try:
#first calls for python files
python_files_caller()
print("Python files have been run without any error.")
#remove out directory
shutil.rmtree("out")
sleep(0.25)
#rename akici.mp4 to input.mp4
os.remove("./input.mp4")
os.rename('./akici.mp4','./input.mp4')
sleep(0.25)
print("out folder is removed and akici.mp4 is renamed to input.mp4")
print("Calling python files again")
#again calling python files
python_files_caller()
sleep(0.25)
print("Python files have been run without any error.")
#akici.mp4 is now 60 FPS.
#removing out folder again.
print("60 FPS video is ready")
shutil.rmtree("out")
sleep(0.25)
except Exception:
print("Error. Here is the error message:")
print(e)