EuuIia commited on
Commit
97084c3
·
verified ·
1 Parent(s): 56b020c

Update api/ltx_server.py

Browse files
Files changed (1) hide show
  1. api/ltx_server.py +9 -9
api/ltx_server.py CHANGED
@@ -540,15 +540,15 @@ class VideoService:
540
  return nova_list
541
 
542
  def _concat_mp4s_no_reencode(self, lista_mp4, output_path):
543
- import tempfile, subprocess
544
- with tempfile.NamedTemporaryFile("w", delete=False, suffix=".txt") as f:
545
- for mp4 in lista_mp4:
546
- f.write(f"file '{os.path.abspath(mp4)}'\n")
547
- lista_path = f.name
548
-
549
- print(f"[DEBUG] Concatenando {len(lista_mp4)} partes em {output_path}")
550
- cmd = f'ffmpeg -y -f concat -safe 0 -i "{lista_path}" -c copy "{output_path}"'
551
- subprocess.run(cmd, shell=True, check=True)
552
 
553
 
554
 
 
540
  return nova_list
541
 
542
  def _concat_mp4s_no_reencode(self, lista_mp4, output_path):
543
+
544
+ with tempfile.NamedTemporaryFile("w", delete=False, suffix=".txt") as f:
545
+ for mp4 in lista_mp4:
546
+ f.write(f"file '{os.path.abspath(mp4)}'\n")
547
+ lista_path = f.name
548
+
549
+ print(f"[DEBUG] Concatenando {len(lista_mp4)} partes em {output_path}")
550
+ cmd = f'ffmpeg -y -f concat -safe 0 -i "{lista_path}" -c copy "{output_path}"'
551
+ subprocess.run(cmd, shell=True, check=True)
552
 
553
 
554