mirror of
https://github.com/blw1138/Zordon.git
synced 2026-06-09 13:39:24 -05:00
Add Job Window Redesign (#128)
* Initial refactor of add_job_window * Improved project naming and fixed Blender engine issue * Improve time representation in main window * Cleanup Blender job creation * Send resolution / fps data in job submission * More window improvements * EngineManager renaming and refactoring * FFMPEG path fixes for ffprobe * More backend refactoring / improvements * Performance improvements / API refactoring * Show current job count in add window UI before submission * Move some UI update code out of background thread * Move some main window UI update code out of background thread
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
|
||||
from src.engines.core.base_engine import *
|
||||
@@ -20,8 +21,7 @@ class FFMPEG(BaseRenderEngine):
|
||||
return FFMPEGRenderWorker
|
||||
|
||||
def ui_options(self):
|
||||
from src.engines.ffmpeg.ffmpeg_ui import FFMPEGUI
|
||||
return FFMPEGUI.get_options(self)
|
||||
return []
|
||||
|
||||
def supported_extensions(self):
|
||||
help_text = (subprocess.check_output([self.engine_path(), '-h', 'full'], stderr=subprocess.STDOUT,
|
||||
@@ -45,10 +45,19 @@ class FFMPEG(BaseRenderEngine):
|
||||
return version
|
||||
|
||||
def get_project_info(self, project_path, timeout=10):
|
||||
"""Run ffprobe and parse the output as JSON"""
|
||||
try:
|
||||
# Run ffprobe and parse the output as JSON
|
||||
# resolve ffprobe path
|
||||
engine_dir = os.path.dirname(self.engine_path())
|
||||
ffprobe_path = os.path.join(engine_dir, 'ffprobe')
|
||||
if self.engine_path().endswith('.exe'):
|
||||
ffprobe_path += '.exe'
|
||||
if not os.path.exists(ffprobe_path): # fallback to system install (if available)
|
||||
ffprobe_path = 'ffprobe'
|
||||
|
||||
# run ffprobe
|
||||
cmd = [
|
||||
'ffprobe', '-v', 'quiet', '-print_format', 'json',
|
||||
ffprobe_path, '-v', 'quiet', '-print_format', 'json',
|
||||
'-show_streams', '-select_streams', 'v', project_path
|
||||
]
|
||||
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, text=True,
|
||||
@@ -78,7 +87,7 @@ class FFMPEG(BaseRenderEngine):
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
print(f"An error occurred: {e}")
|
||||
print(f"Failed to get FFMPEG project info: {e}")
|
||||
return None
|
||||
|
||||
def get_encoders(self):
|
||||
|
||||
Reference in New Issue
Block a user