Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def convert_video(video_file: File, quality, aspect_ratio):
|
|
38 |
if video_file is None:
|
39 |
output_path = gr.inputs.Textbox(label="Video URL")
|
40 |
else:
|
41 |
-
output_path = f"{temp_dir}/{Path(video_file).
|
42 |
|
43 |
ffmpeg_command = f"ffmpeg -i {video_file or output_path} -c:v libx264 -crf {quality} -f hls -aspect {aspect_ratio} {temp_dir}/{output_path}"
|
44 |
subprocess.run(ffmpeg_command, shell=True)
|
|
|
38 |
if video_file is None:
|
39 |
output_path = gr.inputs.Textbox(label="Video URL")
|
40 |
else:
|
41 |
+
output_path = f"{temp_dir}/{Path(video_file).name}.m3u8"
|
42 |
|
43 |
ffmpeg_command = f"ffmpeg -i {video_file or output_path} -c:v libx264 -crf {quality} -f hls -aspect {aspect_ratio} {temp_dir}/{output_path}"
|
44 |
subprocess.run(ffmpeg_command, shell=True)
|