Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -414,6 +414,9 @@ def generate_audio_core(video_file, caption):
|
|
| 414 |
status = log_step("📹 Step 2: Checking video duration...")
|
| 415 |
|
| 416 |
duration = get_video_duration(mp4_path)
|
|
|
|
|
|
|
|
|
|
| 417 |
log_step(f"⏱️ Step 2 cost: {time.time() - step_start:.2f}s")
|
| 418 |
|
| 419 |
# ---- Step 3: Extract video frames ----
|
|
|
|
| 414 |
status = log_step("📹 Step 2: Checking video duration...")
|
| 415 |
|
| 416 |
duration = get_video_duration(mp4_path)
|
| 417 |
+
if duration > 15:
|
| 418 |
+
#yield log_step(f"❌ Video duration {duration:.1f}s exceeds the 15s limit. Please upload a shorter video."), None
|
| 419 |
+
return log_step(f"❌ Video duration {duration:.1f}s exceeds the 15s limit. Please upload a shorter video."), None
|
| 420 |
log_step(f"⏱️ Step 2 cost: {time.time() - step_start:.2f}s")
|
| 421 |
|
| 422 |
# ---- Step 3: Extract video frames ----
|