Spaces:
Paused
Paused
import gradio as gr | |
import ffmpeg | |
def transcode_video(video_file): | |
"""Transcodes a video file to m3u8 using ffmpeg. | |
Args: | |
video_file: The path to the video file to transcode. | |
Returns: | |
The path to the transcoded m3u8 file. | |
""" | |
# Create an output file. | |
output_file = "output.m3u8" | |
# Transcode the video file. | |
ffmpeg.input(video_file).output(output_file).run() | |
# Return the path to the transcoded file. | |
return output_file | |
gr.Interface(transcode_video).launch() | |