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:
2026-01-12 09:06:53 -06:00
committed by GitHub
parent d8af7c878e
commit 8b3fdd14b5
18 changed files with 657 additions and 372 deletions
+14 -5
View File
@@ -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):
-5
View File
@@ -1,5 +0,0 @@
class FFMPEGUI:
@staticmethod
def get_options(system_info):
options = []
return options
+2 -2
View File
@@ -19,8 +19,8 @@ class FFMPEGRenderWorker(BaseRenderWorker):
cmd = [self.engine_path, '-y', '-stats', '-i', self.input_path]
# Resize frame
if self.args.get('x_resolution', None) and self.args.get('y_resolution', None):
cmd.extend(['-vf', f"scale={self.args['x_resolution']}:{self.args['y_resolution']}"])
if self.args.get('resolution', None):
cmd.extend(['-vf', f"scale={self.args['resolution'][0]}:{self.args['resolution'][1]}"])
# Convert raw args from string if available
raw_args = self.args.get('raw', None)