Compare commits

...

2 Commits

Author SHA1 Message Date
bd1824a7ca Remove spammy prints 2025-09-26 19:44:17 +02:00
4806c95095 Shift 1-2 to go to markers 2025-09-26 19:41:07 +02:00

View File

@@ -1274,7 +1274,7 @@ class VideoEditor:
"""Calculate frame delay in milliseconds based on playback speed""" """Calculate frame delay in milliseconds based on playback speed"""
# Round to 2 decimals to handle floating point precision issues # Round to 2 decimals to handle floating point precision issues
speed = round(self.playback_speed, 2) speed = round(self.playback_speed, 2)
print(f"Playback speed: {speed}") # print(f"Playback speed: {speed}")
if speed >= 1.0: if speed >= 1.0:
# Speed >= 1: maximum FPS (no delay) # Speed >= 1: maximum FPS (no delay)
return 1 return 1
@@ -1654,7 +1654,7 @@ class VideoEditor:
result = self.track_template(self.current_display_frame) result = self.track_template(self.current_display_frame)
if result: if result:
center_x, center_y, confidence = result center_x, center_y, confidence = result
print(f"DEBUG: Template match found at ({center_x}, {center_y}) with confidence {confidence:.2f}") # print(f"DEBUG: Template match found at ({center_x}, {center_y}) with confidence {confidence:.2f}")
template_offset = (center_x, center_y) template_offset = (center_x, center_y)
else: else:
# Cropped mode - use only the cropped region for faster template matching # Cropped mode - use only the cropped region for faster template matching
@@ -1719,7 +1719,7 @@ class VideoEditor:
# Add template matching position # Add template matching position
if template_offset: if template_offset:
positions.append(template_offset) positions.append(template_offset)
print(f"DEBUG: Template matching: ({template_offset[0]:.1f}, {template_offset[1]:.1f})") # print(f"DEBUG: Template matching: ({template_offset[0]:.1f}, {template_offset[1]:.1f})")
# Add feature tracking position # Add feature tracking position
if feature_offset: if feature_offset:
@@ -1730,7 +1730,7 @@ class VideoEditor:
if positions: if positions:
avg_x = sum(pos[0] for pos in positions) / len(positions) avg_x = sum(pos[0] for pos in positions) / len(positions)
avg_y = sum(pos[1] for pos in positions) / len(positions) avg_y = sum(pos[1] for pos in positions) / len(positions)
print(f"DEBUG: Average of {len(positions)} positions: ({avg_x:.1f}, {avg_y:.1f})") # print(f"DEBUG: Average of {len(positions)} positions: ({avg_x:.1f}, {avg_y:.1f})")
return (avg_x, avg_y) return (avg_x, avg_y)
# Fall back to individual tracking methods if no base position # Fall back to individual tracking methods if no base position
@@ -4511,6 +4511,14 @@ class VideoEditor:
self.cut_end_frame = self.current_frame self.cut_end_frame = self.current_frame
print(f"Set cut end at frame {self.current_frame}") print(f"Set cut end at frame {self.current_frame}")
self.save_state() # Save state when cut end is set self.save_state() # Save state when cut end is set
elif key == ord("!"): # Shift+1 - Jump to cut start marker
if not self.is_image_mode and self.cut_start_frame is not None:
self.seek_to_frame(self.cut_start_frame)
print(f"Jumped to cut start marker at frame {self.cut_start_frame}")
elif key == ord("\""): # Shift+2 - Jump to cut end marker
if not self.is_image_mode and self.cut_end_frame is not None:
self.seek_to_frame(self.cut_end_frame)
print(f"Jumped to cut end marker at frame {self.cut_end_frame}")
elif key == ord("N"): elif key == ord("N"):
if len(self.video_files) > 1: if len(self.video_files) > 1:
self.previous_video() self.previous_video()