Update api/ltx_server.py
Browse files- 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'-
|
| 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 |
|