Jeffgold commited on
Commit
06412df
·
1 Parent(s): 5e7fcc0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -8,7 +8,8 @@ quality = gr.inputs.Dropdown(choices=["18", "23", "28", "32"], label="Quality")
8
  aspect_ratio = gr.inputs.Dropdown(choices=["16:9", "4:3", "3:2", "2:1"], label="Aspect Ratio")
9
 
10
  def convert_video(video_file, quality, aspect_ratio):
11
- output_path = "output.m3u8"
 
12
  ffmpeg_command = f"ffmpeg -i {video_file} -c:v libx264 -crf {quality} -f hls -aspect {aspect_ratio} {output_path}"
13
  subprocess.run(ffmpeg_command, shell=True)
14
 
 
8
  aspect_ratio = gr.inputs.Dropdown(choices=["16:9", "4:3", "3:2", "2:1"], label="Aspect Ratio")
9
 
10
  def convert_video(video_file, quality, aspect_ratio):
11
+ output_path = f"{video_file.name}.m3u8"
12
+
13
  ffmpeg_command = f"ffmpeg -i {video_file} -c:v libx264 -crf {quality} -f hls -aspect {aspect_ratio} {output_path}"
14
  subprocess.run(ffmpeg_command, shell=True)
15