JS6969 commited on
Commit
1f358f3
·
verified ·
1 Parent(s): a4a12a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -128,7 +128,7 @@ def step3_encode(
128
  pct = min(100.0, (current / total_frames) * 100.0)
129
  yield None, f"Encoding… {current}/{total_frames} frames", render_progress(pct, f"Encoding {pct:.0f}%")
130
  else:
131
- yield None, "Encoding…", render_progress(50.0, "Encoding…"))
132
 
133
  ret = proc.wait()
134
  out_file = Path(frames_dir) / ("output.mp4" if fmt in ("h264", "h265") else "output.webm")
@@ -138,7 +138,7 @@ def step3_encode(
138
  err = proc.stderr.read() if proc.stderr else ""
139
  except Exception:
140
  pass
141
- yield None, f"Encoding failed.\n\n{err}", render_progress(0.0, "Failed"))
142
  return
143
 
144
  yield str(out_file), f"Video created: {out_file.name}", render_progress(100.0, "Encoding complete")
 
128
  pct = min(100.0, (current / total_frames) * 100.0)
129
  yield None, f"Encoding… {current}/{total_frames} frames", render_progress(pct, f"Encoding {pct:.0f}%")
130
  else:
131
+ yield None, "Encoding…", render_progress(50.0, "Encoding…")
132
 
133
  ret = proc.wait()
134
  out_file = Path(frames_dir) / ("output.mp4" if fmt in ("h264", "h265") else "output.webm")
 
138
  err = proc.stderr.read() if proc.stderr else ""
139
  except Exception:
140
  pass
141
+ yield None, f"Encoding failed.\n\n{err}", render_progress(0.0, "Failed")
142
  return
143
 
144
  yield str(out_file), f"Video created: {out_file.name}", render_progress(100.0, "Encoding complete")