Phoe2004 commited on
Commit
298b437
Β·
verified Β·
1 Parent(s): 2f707e7

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -1314,7 +1314,7 @@ def _build_video(vpath, cmb, mpath, ad, vd, crop, flip, col, wmk, out_file,
1314
  # ── Step 2: Sync β€” stretch or compress video to exactly match audio duration ──
1315
  # setpts = (ad/vd) * PTS β†’ video plays slow if audio longer, fast if audio shorter
1316
  # No loop, no freeze, no trim needed β€” video fills exactly audio duration
1317
- sync_r = ad / (vd - 0.15) # ratio: >1 = slow down, <1 = speed up
1318
 
1319
  base_filters = [
1320
  f'setpts={sync_r:.6f}*PTS',
 
1314
  # ── Step 2: Sync β€” stretch or compress video to exactly match audio duration ──
1315
  # setpts = (ad/vd) * PTS β†’ video plays slow if audio longer, fast if audio shorter
1316
  # No loop, no freeze, no trim needed β€” video fills exactly audio duration
1317
+ sync_r = ad / (vd - 0.12) # ratio: >1 = slow down, <1 = speed up
1318
 
1319
  base_filters = [
1320
  f'setpts={sync_r:.6f}*PTS',