Carlos s
commited on
Update api/ltx_server.py
Browse files- api/ltx_server.py +3 -4
api/ltx_server.py
CHANGED
|
@@ -516,10 +516,9 @@ class VideoService:
|
|
| 516 |
# --- FADE_FIM ---
|
| 517 |
if i < total_partes - 1:
|
| 518 |
video_fade_fim = os.path.join(pasta, f"{base}_fade_fim_{i}.mp4")
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
)
|
| 523 |
subprocess.run(cmd_fim, shell=True, check=True)
|
| 524 |
video_anterior_fade_fim = video_fade_fim
|
| 525 |
print(f"[DEBUG] Fade_fim preparado -> {video_fade_fim}")
|
|
|
|
| 516 |
# --- FADE_FIM ---
|
| 517 |
if i < total_partes - 1:
|
| 518 |
video_fade_fim = os.path.join(pasta, f"{base}_fade_fim_{i}.mp4")
|
| 519 |
+
totalframes = self.gettotalframes(videoclone)
|
| 520 |
+
startframe = totalframes - poda
|
| 521 |
+
cmd_fim = f'ffmpeg -y -hide_banner -loglevel error -i "{videoclone}" -vf "trim=start_frame={startframe},setpts=PTS-STARTPTS" -an "{videofadefim}"'
|
|
|
|
| 522 |
subprocess.run(cmd_fim, shell=True, check=True)
|
| 523 |
video_anterior_fade_fim = video_fade_fim
|
| 524 |
print(f"[DEBUG] Fade_fim preparado -> {video_fade_fim}")
|