mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Thumbnail Generation Refactoring (#16)
* Fix file_list and convert save_first_frame to use FFMPEG directly * All thumbnail generation now uses FFMPEG engine
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
import threading
|
||||
|
||||
import requests
|
||||
|
||||
from .ffmpeg_helper import generate_thumbnail, save_first_frame
|
||||
from lib.workers.base_worker import RenderStatus
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
@@ -21,8 +17,8 @@ def generate_thumbnail_for_job(job, thumb_video_path, thumb_image_path, max_widt
|
||||
try:
|
||||
logger.debug(f"Generating video thumbnail for {source}")
|
||||
generate_thumbnail(source_path=source, dest_path=thumb_video_path, max_width=max_width)
|
||||
except Exception as e:
|
||||
logger.error(f"Error generating thumbnail for {source}: {e}")
|
||||
except subprocess.CalledProcessError as e:
|
||||
logger.error(f"Error generating video thumbnail for {source}: {e}")
|
||||
|
||||
try:
|
||||
os.remove(in_progress_path)
|
||||
|
||||
Reference in New Issue
Block a user