Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -94,7 +94,8 @@ def convert_video(video_file, quality, aspect_ratio, video_url, api_key, upload)
|
|
94 |
|
95 |
ffmpeg_command = [
|
96 |
"ffmpeg", "-i", str(input_path), "-c:v", "libx264", "-crf", str(quality),
|
97 |
-
"-vf", f"scale={scale},setsar={aspect_ratio}",
|
|
|
98 |
"-hls_playlist_type", "vod", "-f", "hls", str(output_path)
|
99 |
]
|
100 |
|
|
|
94 |
|
95 |
ffmpeg_command = [
|
96 |
"ffmpeg", "-i", str(input_path), "-c:v", "libx264", "-crf", str(quality),
|
97 |
+
"-vf", f"scale={scale}:force_original_aspect_ratio=decrease,pad=ceil(iw/2)*2:ceil(ih/2)*2,setsar={aspect_ratio}",
|
98 |
+
"-hls_time", "6",
|
99 |
"-hls_playlist_type", "vod", "-f", "hls", str(output_path)
|
100 |
]
|
101 |
|