Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,10 @@ import gradio as gr
|
|
2 |
import ffmpeg
|
3 |
from gradio import outputs
|
4 |
|
5 |
-
def convert_video(video_path):
|
6 |
-
output_path = "output.
|
7 |
-
ffmpeg.input(video_path).output(output_path).run()
|
8 |
|
9 |
gr.Interface(convert_video, inputs="video", outputs=[outputs.Video()]).launch()
|
|
|
|
|
|
2 |
import ffmpeg
|
3 |
from gradio import outputs
|
4 |
|
5 |
+
def convert_video(video_path, quality):
|
6 |
+
output_path = "output.m3u8"
|
7 |
+
ffmpeg.input(video_path).output(output_path, format='hls', video_bitrate=quality).run()
|
8 |
|
9 |
gr.Interface(convert_video, inputs="video", outputs=[outputs.Video()]).launch()
|
10 |
+
|
11 |
+
|