Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,11 +83,8 @@ def process_video(
|
|
| 83 |
# Calculate dimensions
|
| 84 |
if auto_resize:
|
| 85 |
width, height = calculate_resolution(original_width, original_height)
|
| 86 |
-
gr.Info(f"Auto-resized from {original_width}x{original_height} to {width}x{height} (preserving aspect ratio)")
|
| 87 |
else:
|
| 88 |
width, height = manual_width, manual_height
|
| 89 |
-
if abs((original_width/original_height) - (width/height)) > 0.1:
|
| 90 |
-
gr.Warning(f"Output aspect ratio ({width}x{height}) differs significantly from input ({original_width}x{original_height}). Video may appear stretched.")
|
| 91 |
else:
|
| 92 |
raise gr.Error("Could not load video or video is empty")
|
| 93 |
|
|
@@ -105,7 +102,6 @@ def process_video(
|
|
| 105 |
|
| 106 |
# Ensure we have the right number of frames
|
| 107 |
if len(video) < num_frames:
|
| 108 |
-
gr.Warning(f"Video has only {len(video)} frames, using all available frames.")
|
| 109 |
num_frames = len(video)
|
| 110 |
|
| 111 |
# Generate edited video
|
|
|
|
| 83 |
# Calculate dimensions
|
| 84 |
if auto_resize:
|
| 85 |
width, height = calculate_resolution(original_width, original_height)
|
|
|
|
| 86 |
else:
|
| 87 |
width, height = manual_width, manual_height
|
|
|
|
|
|
|
| 88 |
else:
|
| 89 |
raise gr.Error("Could not load video or video is empty")
|
| 90 |
|
|
|
|
| 102 |
|
| 103 |
# Ensure we have the right number of frames
|
| 104 |
if len(video) < num_frames:
|
|
|
|
| 105 |
num_frames = len(video)
|
| 106 |
|
| 107 |
# Generate edited video
|