EuuIia commited on
Commit
f6247c3
·
verified ·
1 Parent(s): cd79fef

Update api/ltx_server.py

Browse files
Files changed (1) hide show
  1. api/ltx_server.py +3 -3
api/ltx_server.py CHANGED
@@ -529,10 +529,10 @@ class VideoService:
529
  # --- FADE_FIM ---
530
  if i < total_partes - 1:
531
  video_fade_fim = os.path.join(pasta, f"{base}_fade_fim_{i}.mp4")
 
532
  cmd_fim = (
533
- f'ffmpeg -y -hide_banner -loglevel error '
534
- f'-i "{base}" -vf "trim=start_frame={end_frame},setpts=PTS-STARTPTS" '
535
- f'-an "{video_fade_fim}"'
536
  )
537
  subprocess.run(cmd_fim, shell=True, check=True)
538
 
 
529
  # --- FADE_FIM ---
530
  if i < total_partes - 1:
531
  video_fade_fim = os.path.join(pasta, f"{base}_fade_fim_{i}.mp4")
532
+ end_frame = self._get_total_frames(base)-poda
533
  cmd_fim = (
534
+ f'ffmpeg -y -hide_banner -loglevel error -i "{base}" '
535
+ f'-vf "trim=start_frame={end_frame},setpts=PTS-STARTPTS" -an "{video_fade_fim}"'
 
536
  )
537
  subprocess.run(cmd_fim, shell=True, check=True)
538