Spaces:
Runtime error
Runtime error
ercanburak
commited on
Commit
•
edb8447
1
Parent(s):
121d002
use white padding
Browse files
app.py
CHANGED
@@ -108,7 +108,7 @@ padding = 2
|
|
108 |
font_size = 20
|
109 |
num_cols = len(selected_models)
|
110 |
crop_str = "crop=trunc(iw/2)*2:trunc(ih/2)*2"
|
111 |
-
pad_str = "pad=ceil(iw/2)*2+{}:ceil(ih/2)*2+{}:{}:{}".format(padding*2, padding*2, padding, padding)
|
112 |
num_elements = num_rows * num_cols
|
113 |
|
114 |
# remove previous temp data
|
@@ -193,7 +193,8 @@ layout_str = "|".join(layout_parts)
|
|
193 |
|
194 |
# opt = "-c:v libx264 -preset veryslow -crf 18 -c:a copy"
|
195 |
opt = ""
|
196 |
-
opt_fill = ":fill=black"
|
|
|
197 |
# opt_fill = ""
|
198 |
ffmpeg_command_str = "ffmpeg -y " + inputs_str + " -filter_complex \"" + input_scaling_str + ";" + xstack_input_str + "xstack=inputs=" + str(num_inputs) + ":layout=" + layout_str + opt_fill + "\"" + opt + " output.mp4"
|
199 |
print(ffmpeg_command_str)
|
|
|
108 |
font_size = 20
|
109 |
num_cols = len(selected_models)
|
110 |
crop_str = "crop=trunc(iw/2)*2:trunc(ih/2)*2"
|
111 |
+
pad_str = "pad=ceil(iw/2)*2+{}:ceil(ih/2)*2+{}:{}:{}:white".format(padding*2, padding*2, padding, padding)
|
112 |
num_elements = num_rows * num_cols
|
113 |
|
114 |
# remove previous temp data
|
|
|
193 |
|
194 |
# opt = "-c:v libx264 -preset veryslow -crf 18 -c:a copy"
|
195 |
opt = ""
|
196 |
+
# opt_fill = ":fill=black"
|
197 |
+
opt_fill = ":fill=white"
|
198 |
# opt_fill = ""
|
199 |
ffmpeg_command_str = "ffmpeg -y " + inputs_str + " -filter_complex \"" + input_scaling_str + ";" + xstack_input_str + "xstack=inputs=" + str(num_inputs) + ":layout=" + layout_str + opt_fill + "\"" + opt + " output.mp4"
|
200 |
print(ffmpeg_command_str)
|