Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ def convert_video(video_file: File, quality, aspect_ratio, video_url):
|
|
54 |
output_path += ".m3u8"
|
55 |
|
56 |
# Set the output path to the temp directory
|
57 |
-
output_path = f"{temp_dir}{output_path}"
|
58 |
|
59 |
ffmpeg_command = f"ffmpeg -i {video_file} -c:v libx264 -crf {quality} -f hls -aspect {aspect_ratio} {output_path}"
|
60 |
|
@@ -67,6 +67,8 @@ def convert_video(video_file: File, quality, aspect_ratio, video_url):
|
|
67 |
print("ffmpeg is not installed.")
|
68 |
return None
|
69 |
|
|
|
|
|
70 |
# Return the output file directly
|
71 |
return components.Video(output_path)
|
72 |
|
|
|
54 |
output_path += ".m3u8"
|
55 |
|
56 |
# Set the output path to the temp directory
|
57 |
+
output_path = f"{temp_dir}/{output_path}"
|
58 |
|
59 |
ffmpeg_command = f"ffmpeg -i {video_file} -c:v libx264 -crf {quality} -f hls -aspect {aspect_ratio} {output_path}"
|
60 |
|
|
|
67 |
print("ffmpeg is not installed.")
|
68 |
return None
|
69 |
|
70 |
+
time.sleep(2)
|
71 |
+
|
72 |
# Return the output file directly
|
73 |
return components.Video(output_path)
|
74 |
|