Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,11 @@ def transcode_video(video_file, output_file, output_format, output_fps):
|
|
16 |
The path to the transcoded file.
|
17 |
"""
|
18 |
|
|
|
|
|
|
|
|
|
|
|
19 |
# Transcode the video file.
|
20 |
ffmpeg.input(video_file).output(output_file, format=output_format, fps=output_fps).run()
|
21 |
|
|
|
16 |
The path to the transcoded file.
|
17 |
"""
|
18 |
|
19 |
+
# Create a folder to save the transcoded video file to.
|
20 |
+
output_dir = os.path.dirname(output_file)
|
21 |
+
if not os.path.exists(output_dir):
|
22 |
+
os.makedirs(output_dir)
|
23 |
+
|
24 |
# Transcode the video file.
|
25 |
ffmpeg.input(video_file).output(output_file, format=output_format, fps=output_fps).run()
|
26 |
|