Merge branch 'master' into v4

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
henryruhs
2026-08-10 11:40:29 +02:00
co-authored by Claude Opus 4.8
2 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ def select_frame_range(frame_start : int, frame_end : int, video_fps : Fps) -> L
def prevent_frame_drop() -> List[Command]:
return [ '-vsync', '0' ]
return [ '-fps_mode', 'passthrough' ]
def select_media_range(frame_start : int, frame_end : int, media_fps : Fps) -> List[Command]:
+6 -3
View File
@@ -43,7 +43,7 @@ def create_temp_frames() -> ErrorCode:
return 0
def process_memory_frame(frame_number : int, temp_video_resolution : Resolution) -> VisionFrame:
def process_memory_frame(frame_number : int, temp_video_resolution : Resolution, output_video_resolution : Resolution) -> VisionFrame:
target_vision_frames = select_video_frames(state_manager.get_item('target_path'), frame_number, state_manager.get_item('target_frame_amount'))
target_vision_frame = get_middle(target_vision_frames)
temp_vision_frame = target_vision_frame.copy()
@@ -53,6 +53,9 @@ def process_memory_frame(frame_number : int, temp_video_resolution : Resolution)
temp_vision_frame = process_temp_vision_frame(target_vision_frames, temp_vision_frame, frame_number)
if not (temp_vision_frame.shape[1], temp_vision_frame.shape[0]) == output_video_resolution:
temp_vision_frame = cv2.resize(temp_vision_frame, output_video_resolution)
if state_manager.get_item('temp_pixel_format') == 'bgra':
temp_vision_frame = cv2.cvtColor(temp_vision_frame, cv2.COLOR_BGR2BGRA)
@@ -70,7 +73,7 @@ def process_memory_frames() -> ErrorCode:
temp_frame_range = range(trim_frame_start, trim_frame_end)
if temp_frame_range:
video_writer = video_manager.get_writer(state_manager.get_item('output_path'), temp_video_fps, temp_video_resolution, output_video_resolution, state_manager.get_item('output_video_fps'))
video_writer = video_manager.get_writer(state_manager.get_item('output_path'), temp_video_fps, output_video_resolution, output_video_resolution, state_manager.get_item('output_video_fps'))
with tqdm(total = len(temp_frame_range), desc = translator.get('processing'), unit = 'frame', ascii = ' =', disable = state_manager.get_item('log_level') in [ 'warn', 'error' ]) as progress:
progress.set_postfix(execution_providers = state_manager.get_item('execution_providers'))
@@ -81,7 +84,7 @@ def process_memory_frames() -> ErrorCode:
futures : Deque[Future[VisionFrame]] = deque()
for frame_number in temp_frame_range:
future = executor.submit(process_memory_frame, frame_number, temp_video_resolution)
future = executor.submit(process_memory_frame, frame_number, temp_video_resolution, output_video_resolution)
futures.append(future)
while futures: