Skip to content

Commit 57e7b55

Browse files
fixup: Format Python code with Black
1 parent 3ad42ba commit 57e7b55

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

utils/ffmpeg_install.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
def ffmpeg_install_windows():
88
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+
)
1012
ffmpeg_zip_filename = "ffmpeg.zip"
1113
ffmpeg_extracted_folder = "ffmpeg"
1214

@@ -49,7 +51,9 @@ def ffmpeg_install_windows():
4951
os.remove(os.path.join(ffmpeg_extracted_folder, "README.txt"))
5052
os.rmdir(ffmpeg_extracted_folder)
5153

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+
)
5357
except Exception as e:
5458
print(
5559
"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():
96100
def ffmpeg_install():
97101
try:
98102
# 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+
)
100106
except FileNotFoundError as e:
101107
# Check if there's ffmpeg.exe in the current directory
102108
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.")
105113
resp = input(
106114
"We can try to automatically install it for you. Would you like to do that? (y/n): "
107115
)
@@ -114,9 +122,7 @@ def ffmpeg_install():
114122
elif os.name == "mac":
115123
ffmpeg_install_mac()
116124
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.")
120126
exit()
121127
else:
122128
print("Please install FFmpeg manually and try again.")

0 commit comments

Comments
 (0)