6
6
7
7
def ffmpeg_install_windows ():
8
8
try :
9
- ffmpeg_url = "https://github.com/GyanD/codexffmpeg/releases/download/6.0/ffmpeg-6.0-full_build.zip"
9
+ ffmpeg_url = (
10
+ "https://github.com/GyanD/codexffmpeg/releases/download/6.0/ffmpeg-6.0-full_build.zip"
11
+ )
10
12
ffmpeg_zip_filename = "ffmpeg.zip"
11
13
ffmpeg_extracted_folder = "ffmpeg"
12
14
@@ -49,7 +51,9 @@ def ffmpeg_install_windows():
49
51
os .remove (os .path .join (ffmpeg_extracted_folder , "README.txt" ))
50
52
os .rmdir (ffmpeg_extracted_folder )
51
53
52
- print ("FFmpeg installed successfully! Please restart your computer and then re-run the program." )
54
+ print (
55
+ "FFmpeg installed successfully! Please restart your computer and then re-run the program."
56
+ )
53
57
except Exception as e :
54
58
print (
55
59
"An error occurred while trying to install FFmpeg. Please try again. Otherwise, please install FFmpeg manually and try again."
@@ -96,12 +100,16 @@ def ffmpeg_install_mac():
96
100
def ffmpeg_install ():
97
101
try :
98
102
# Try to run the FFmpeg command
99
- subprocess .run (['ffmpeg' , '-version' ], check = True , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
103
+ subprocess .run (
104
+ ["ffmpeg" , "-version" ], check = True , stdout = subprocess .PIPE , stderr = subprocess .PIPE
105
+ )
100
106
except FileNotFoundError as e :
101
107
# Check if there's ffmpeg.exe in the current directory
102
108
if os .path .exists ("./ffmpeg.exe" ):
103
- print ('FFmpeg is installed on this system! If you are seeing this error for the second time, restart your computer.' )
104
- print ('FFmpeg is not installed on this system.' )
109
+ print (
110
+ "FFmpeg is installed on this system! If you are seeing this error for the second time, restart your computer."
111
+ )
112
+ print ("FFmpeg is not installed on this system." )
105
113
resp = input (
106
114
"We can try to automatically install it for you. Would you like to do that? (y/n): "
107
115
)
@@ -114,9 +122,7 @@ def ffmpeg_install():
114
122
elif os .name == "mac" :
115
123
ffmpeg_install_mac ()
116
124
else :
117
- print (
118
- "Your OS is not supported. Please install FFmpeg manually and try again."
119
- )
125
+ print ("Your OS is not supported. Please install FFmpeg manually and try again." )
120
126
exit ()
121
127
else :
122
128
print ("Please install FFmpeg manually and try again." )
0 commit comments