Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -31,11 +31,12 @@ def get_input_path(video_file, video_url, temp_dir):
|
|
31 |
else:
|
32 |
raise ValueError("No input was provided.")
|
33 |
|
34 |
-
def get_output_path(input_path, temp_dir):
|
35 |
"""Returns the path to the output file, creating it if necessary."""
|
36 |
-
output_path = temp_dir / (Path(input_path).stem + ".m3u8")
|
37 |
return output_path
|
38 |
|
|
|
39 |
def get_aspect_ratio(input_path, aspect_ratio):
|
40 |
"""Returns the aspect ratio of the video, calculating it if necessary."""
|
41 |
if aspect_ratio is not None:
|
|
|
31 |
else:
|
32 |
raise ValueError("No input was provided.")
|
33 |
|
34 |
+
def get_output_path(input_path, temp_dir, res):
|
35 |
"""Returns the path to the output file, creating it if necessary."""
|
36 |
+
output_path = temp_dir / (Path(input_path).stem + f"_{res}.m3u8")
|
37 |
return output_path
|
38 |
|
39 |
+
|
40 |
def get_aspect_ratio(input_path, aspect_ratio):
|
41 |
"""Returns the aspect ratio of the video, calculating it if necessary."""
|
42 |
if aspect_ratio is not None:
|