Ajusta projeto para consumir uma fila
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user