Spaces:
Paused
Paused
Update app.py
Browse files82 unmodified lines838485868788899091929311 unmodified lines10510610710810911011182 unmodified lines# Calculate dimensionsif auto_resize:width, height = calculate_resolution(original_width, original_height)gr.Info(f"Auto-resized from {original_width}x{original_height} to {width}x{height} (preserving aspect ratio)")else:width, height = manual_width, manual_heightif abs((original_width/original_height) - (width/height)) > 0.1:gr.Warning(f"Output aspect ratio ({width}x{height}) differs significantly from input ({original_width}x{original_height}). Video may appear stretched.")else:raise gr.Error("Could not load video or video is empty")11 unmodified lines# Ensure we have the right number of framesif len(video) < num_frames:gr.Warning(f"Video has only {len(video)} frames, using all available frames.")num_frames = len(video)# Generate edited video82 unmodified lines838485868788899011 unmodified lines10210310410510610782 unmodified lines# Calculate dimensionsif auto_resize:width, height = calculate_resolution(original_width, original_height)else:width, height = manual_width, manual_heightelse:raise gr.Error("Could not load video or video is empty")11 unmodified lines# Ensure we have the right number of framesif len(video) < num_frames:num_frames = len(video)# Generate edited video
app.py-4