Spaces:
Running on Zero
Running on Zero
download button for all output modes
Browse files
app.py
CHANGED
|
@@ -452,6 +452,7 @@ def process_video(video_path, resolution, despill_val, mask_mode,
|
|
| 452 |
if not ok:
|
| 453 |
raise gr.Error("Video encoding failed. No suitable codec found.")
|
| 454 |
output_video = out_path
|
|
|
|
| 455 |
|
| 456 |
elif need_alpha:
|
| 457 |
out_path = os.path.join(tmpdir, "alpha_matte.mp4")
|
|
@@ -461,6 +462,7 @@ def process_video(video_path, resolution, despill_val, mask_mode,
|
|
| 461 |
if not ok:
|
| 462 |
raise gr.Error("Video encoding failed. No suitable codec found.")
|
| 463 |
output_video = out_path
|
|
|
|
| 464 |
|
| 465 |
elif output_mode == "Transparent video (WebM)":
|
| 466 |
out_path = os.path.join(tmpdir, "transparent.webm")
|
|
@@ -470,6 +472,7 @@ def process_video(video_path, resolution, despill_val, mask_mode,
|
|
| 470 |
if not ok:
|
| 471 |
raise gr.Error("WebM encoding failed. ffmpeg with libvpx-vp9 required.")
|
| 472 |
output_video = out_path
|
|
|
|
| 473 |
|
| 474 |
elif output_mode == "PNG sequence (ZIP)":
|
| 475 |
zip_path = os.path.join(tmpdir, "rgba_sequence.zip")
|
|
|
|
| 452 |
if not ok:
|
| 453 |
raise gr.Error("Video encoding failed. No suitable codec found.")
|
| 454 |
output_video = out_path
|
| 455 |
+
output_file = out_path
|
| 456 |
|
| 457 |
elif need_alpha:
|
| 458 |
out_path = os.path.join(tmpdir, "alpha_matte.mp4")
|
|
|
|
| 462 |
if not ok:
|
| 463 |
raise gr.Error("Video encoding failed. No suitable codec found.")
|
| 464 |
output_video = out_path
|
| 465 |
+
output_file = out_path
|
| 466 |
|
| 467 |
elif output_mode == "Transparent video (WebM)":
|
| 468 |
out_path = os.path.join(tmpdir, "transparent.webm")
|
|
|
|
| 472 |
if not ok:
|
| 473 |
raise gr.Error("WebM encoding failed. ffmpeg with libvpx-vp9 required.")
|
| 474 |
output_video = out_path
|
| 475 |
+
output_file = out_path
|
| 476 |
|
| 477 |
elif output_mode == "PNG sequence (ZIP)":
|
| 478 |
zip_path = os.path.join(tmpdir, "rgba_sequence.zip")
|