Ajusta projeto para consumir uma fila

This commit is contained in:
LeoMortari
2025-08-02 12:27:26 -03:00
parent 5bb58c98e5
commit 95d287bafc
3 changed files with 53 additions and 63 deletions

View File

@@ -1,6 +1,4 @@
import os
import subprocess
import unicodedata
from moviepy.video.io.VideoFileClip import VideoFileClip
from moviepy.video.VideoClip import ColorClip
@@ -126,12 +124,15 @@ def process_full_video(filename: str, times: list = None) -> list:
if end is None:
with VideoFileClip(video_path) as clip:
end = clip.duration
print(f"Cortando trecho {idx}: {start}s a {end}s")
temp_path = f"temp/{os.path.splitext(filename)[0]}_{idx}.mp4"
cut_video_new_clip(video_path, start, end, temp_path)
out = process_segment(temp_path, top_text, bottom_text, filename, idx)
processed.append(out)
return processed