Commit Graph

150 Commits

Author SHA1 Message Date
aaf78bf0da Refactor feature extraction to utilize transformed frames in VideoEditor
This commit enhances the feature extraction process by ensuring that features are extracted from the transformed frame that users see, accounting for all transformations such as cropping, zooming, and rotation. It simplifies the coordinate mapping logic, allowing for accurate feature tracking without the need for manual coordinate adjustments. Feedback messages have been updated to reflect the extraction from the visible area, improving user experience.
2025-09-26 13:40:10 +02:00
43d350fff2 Refactor feature extraction to support cropping in VideoEditor
This commit updates the feature extraction process to handle cropped regions of the original frame, allowing for more accurate feature tracking based on the visible area. It introduces logic to extract features from both cropped and full frames, ensuring that coordinates are correctly mapped back to the original frame space. Feedback messages have been enhanced to inform users about the success or failure of feature extraction, improving the overall user experience.
2025-09-26 13:37:41 +02:00
d1b9e7c470 Enhance feature extraction with coordinate mapping in VideoEditor
This commit modifies the feature extraction process to include a coordinate mapper, allowing for accurate mapping of features from transformed frames back to their original coordinates. It introduces new methods for handling coordinate transformations during cropping and rotation, ensuring that features are correctly stored and retrieved in the appropriate frame space. This improvement enhances the tracking accuracy and overall functionality of the VideoEditor.
2025-09-26 13:24:48 +02:00
c50234f5c1 Refactor feature extraction to use transformed frames in VideoEditor
This commit updates the feature extraction process to utilize the transformed frames that users see, rather than the original frames. It includes a new method for mapping coordinates from transformed frames back to original coordinates, ensuring accurate tracking. Additionally, feedback messages have been improved to reflect the success or failure of feature extraction based on the visible area.
2025-09-26 13:21:59 +02:00
171155e528 Change some fucking keys it invented 2025-09-26 13:13:53 +02:00
710a1f7de3 Maybe implement a feature tracker 2025-09-26 13:10:47 +02:00
5c66935157 Add UTF-8 image loading support in VideoEditor and update dependencies 2025-09-26 11:05:14 +02:00
ea1a6e58f4 Enhance image and screenshot saving quality in VideoEditor
This commit updates the image and screenshot saving functionality in the VideoEditor class to use high-quality JPEG settings. The JPEG quality is set to 95, ensuring better image fidelity when saving processed frames and static images.
2025-09-19 07:17:52 +02:00
0c3e5e21bf Increase window dimensions in ProjectView and VideoEditor to accommodate 1080p videos. Adjust resizing logic to maintain original video quality by resizing the window instead of downscaling the video. Ensure frames fit within canvas bounds for better display. 2025-09-19 07:14:41 +02:00
472efbb9d9 Fix up speed controls to be ws and save to be S 2025-09-18 18:07:23 +02:00
dd2f40460b Max speed at 1 2025-09-18 17:59:55 +02:00
b2c7cf11e9 Fix seeking blyat 2025-09-18 17:58:04 +02:00
e0e5c8d933 Fix autorepeat 2025-09-18 17:54:06 +02:00
04e391551e Remove unused trash 2025-09-18 17:51:29 +02:00
f9f442a2d0 "optimnize" playback by removing retardation 2025-09-18 17:49:09 +02:00
0fd108bc9a Don't seek EVERY GOD DAMN FUCKING FRAME 2025-09-18 17:31:10 +02:00
83ef71934b Enhance tracking marker navigation in VideoEditor
This commit improves the navigation logic in the VideoEditor class for jumping to previous and next tracking markers. It ensures that when at the beginning of the tracking frames, the user jumps to the first marker, and when at the end, they jump to the last marker. Debug statements have been updated to reflect these changes, providing clearer insights during navigation. The specification has also been updated to document the new behavior.
2025-09-17 19:55:31 +02:00
b123b12d0d Refactor motion path logic in VideoEditor for clarity
This commit updates the VideoEditor class to improve the logic for drawing and checking motion paths between tracking points. The comments have been adjusted to clarify the conditions for drawing lines between previous→current and previous→next frames. Additionally, debug statements have been enhanced to provide clearer insights during the snapping process, ensuring better tracking point interactions.
2025-09-17 15:46:39 +02:00
1bd935646e Refactor motion path and snapping logic in VideoEditor
This commit enhances the VideoEditor class by refining the logic for drawing motion paths and checking line snapping between tracking points. It introduces a unified approach to handle both previous→next and previous→current lines, improving the clarity of the visual representation. Additionally, debug statements have been updated to provide better insights during the snapping process, ensuring accurate tracking point interactions. The display update method is also called to refresh the visual state after changes.
2025-09-17 15:44:55 +02:00
c3e0088a60 Refactor point-to-line distance calculation in VideoEditor
This commit refines the distance calculation method in the VideoEditor class by introducing a new function, _point_to_line_distance_and_foot, which computes the distance from a point to an infinite line and returns the foot of the perpendicular. The snapping logic has been updated to utilize this new method, enhancing the accuracy of line snapping between tracking points. Additionally, debug statements have been added to assist in tracking the snapping process and verifying point conversions.
2025-09-17 15:38:57 +02:00
68a1cc3e7d Enhance snapping functionality in VideoEditor to include line snapping
This commit improves the snapping feature in the VideoEditor class by adding the ability to snap new tracking points to the closest point on the line segment between consecutive tracking points, in addition to existing point snapping. The distance calculation logic has been refined, and the specification has been updated to reflect the new snapping behavior, which now operates within a 10px radius for both point and line snapping, enhancing the precision of motion tracking.
2025-09-17 15:12:35 +02:00
498a1911b1 Refactor constants to constants 2025-09-17 15:09:10 +02:00
d068da20f4 Remove some dead code 2025-09-17 15:08:42 +02:00
84a0748f0b Implement snapping functionality for tracking points in VideoEditor
This commit enhances the VideoEditor class by adding a snapping feature that allows users to snap new tracking points to existing points from any frame within a 50px radius. The logic first checks for the removal of existing points before determining if a new point should be added or if it should snap to a nearby point. The specification has been updated to reflect this new snapping behavior, improving the precision of motion tracking.
2025-09-17 15:05:12 +02:00
8c45b30bca Enhance VideoEditor with motion path visualization for tracking points
This commit updates the VideoEditor class to visualize the motion path between previous and next tracking points using yellow arrows. The rendering of tracking points has been modified, with previous points displayed as red circles and next points as magenta circles, both with white borders for better visibility. The specification has been updated to reflect these changes in the display of tracking points and their motion direction.
2025-09-17 14:34:26 +02:00
615a3dce0d Implement methods for retrieving previous and next tracking points in VideoEditor
This commit introduces two new methods, _get_previous_tracking_point and _get_next_tracking_point, to the VideoEditor class. These methods allow for the retrieval of tracking points from the previous and next frames that contain tracking data, enhancing navigation capabilities. The rendering logic has been updated to utilize these methods, ensuring that the previous (red) and next (green) tracking points are displayed correctly during video playback. Additionally, the specification has been updated to reflect these changes in the display of tracking points.
2025-09-17 14:29:11 +02:00
1ce05d33ba Add complete reset functionality to VideoEditor for all transformations
This commit introduces a new method, complete_reset, in the VideoEditor class, allowing users to reset all transformations and settings, including crop, zoom, rotation, brightness, contrast, and motion tracking. The method ensures a clean slate for editing by clearing the transformation cache and saving the state. Additionally, the specification has been updated to include this new functionality, enhancing user control over the editing environment.
2025-09-17 14:12:02 +02:00
1aea3b8a6e Update VideoEditor encoding settings for improved output quality
This commit modifies the encoding parameters in the VideoEditor class, changing the preset to 'veryslow' and adjusting the CRF value to 12 for enhanced video quality. Additionally, it introduces new parameters for profile and level settings, as well as x264 parameters for reference frames and B-frames, optimizing the encoding process for better performance and visual fidelity.
2025-09-17 13:55:13 +02:00
fbac3b0dbb Enhance VideoEditor mouse wheel functionality for zoom and frame seeking
This commit updates the mouse wheel event handling in the VideoEditor class to allow for zooming in and out with Ctrl+scroll, while enabling frame seeking with plain scroll. The specification has been updated to reflect the new mouse wheel behavior, improving user navigation and control during video editing.
2025-09-17 11:49:25 +02:00
b90b5e5725 Merge branch 'motion-track-01' 2025-09-17 11:42:15 +02:00
ed6f809029 Refactor marker navigation in VideoEditor to utilize tracking points
This commit enhances the VideoEditor class by updating the marker navigation methods to focus on tracking points instead of cut markers. The new methods, jump_to_previous_marker and jump_to_next_marker, now utilize a sorted list of frames with tracking points, improving navigation efficiency. Additionally, the documentation has been updated to reflect these changes, providing clearer instructions for users on how to navigate using tracking markers.
2025-09-17 11:41:45 +02:00
8a7e2609c5 Add marker navigation functionality to VideoEditor
This commit introduces keyboard controls for jumping to previous and next markers (cut start or end) in the VideoEditor class. The new functionality enhances user navigation during video editing, allowing for more efficient management of cut points. This addition improves the overall editing experience by providing quick access to key markers in the timeline.
2025-09-17 11:33:40 +02:00
dd1bc12667 Add exact frame seeking functionality to VideoEditor
This commit introduces a new method, seek_video_exact_frame, in the VideoEditor class, allowing users to seek video by exactly one frame, independent of the seek multiplier. The functionality is integrated with keyboard controls for navigating to the previous and next frames, enhancing precision in video editing. This addition improves user control and responsiveness during frame navigation.
2025-09-17 11:23:48 +02:00
9c14249f88 Update VideoEditor configuration for seek multiplier settings
This commit modifies the seek multiplier settings in the VideoEditor class, increasing the SEEK_MULTIPLIER_INCREMENT from 2.0 to 4.0 and expanding the MAX_SEEK_MULTIPLIER from 100.0 to 1000.0. These changes enhance the flexibility and responsiveness of the seeking functionality during video editing.
2025-09-17 11:18:35 +02:00
47ec7fed04 Enhance VideoEditor with previous and next frame tracking point visualization
This commit adds functionality to the VideoEditor class to render tracking points from the previous and next frames with 50% alpha blending. Red circles indicate previous frame points, while green circles represent next frame points, improving the visual feedback during video editing. Additionally, the feedback message duration has been reduced for a more responsive user experience.
2025-09-17 10:42:54 +02:00
e80278a2dd Refactor frame processing in VideoEditor to enhance cropping and rotation handling
This commit updates the frame processing logic in the VideoEditor class to apply rotation before cropping, ensuring accurate handling of frames in rotated space. It introduces effective cropping that accommodates out-of-bounds scenarios by padding with black, improving the visual output during editing. Additionally, debug statements have been refined to provide clearer information on output dimensions and effective crop details, enhancing the overall user experience in video editing.
2025-09-17 09:00:14 +02:00
f1d4145e43 Implement unified display parameters in VideoEditor for improved cropping and zoom handling
This commit introduces a new method, _get_display_params, in the VideoEditor class to centralize the calculation of display parameters, including effective crop dimensions, offsets, and scaling factors. The coordinate mapping methods have been updated to utilize these unified parameters, enhancing the accuracy of point mapping between original and screen coordinates during zoom and cropping operations. This refactor improves code readability and maintainability while ensuring a consistent user experience in video editing.
2025-09-17 08:06:52 +02:00
1d987a341a Refactor visibility calculations in VideoEditor to ensure proper cropping bounds
This commit updates the visibility width and height calculations in the VideoEditor class to use the minimum of the new dimensions and the window dimensions when cropping due to zoom. This change enhances the accuracy of the displayed area during zoom operations, ensuring that the canvas scaling is correctly applied and improving the overall user experience in video editing.
2025-09-17 01:56:16 +02:00
47ce52da37 Refactor coordinate mapping in VideoEditor to improve effective crop handling
This commit updates the coordinate mapping methods in the VideoEditor class to utilize the effective crop dimensions more accurately. It clarifies the calculations for mapping points between rotated frame coordinates and screen coordinates, ensuring consistent behavior during zoom and cropping operations. Additionally, comments have been refined for better understanding of the effective crop application, enhancing code readability and maintainability.
2025-09-17 01:54:04 +02:00
6c86271428 Refactor cropping logic in VideoEditor to utilize effective crop rectangle
This commit updates the cropping functionality in the VideoEditor class to use an effective crop rectangle derived from the current frame. It ensures that the crop is applied correctly within the bounds of the processed frame, enhancing the accuracy of cropping after rotation. Additionally, a visual outline of the effective crop is drawn on the canvas for debugging purposes, improving the user experience during video editing.
2025-09-17 01:51:56 +02:00
d0d2f66b11 Enhance effective crop rectangle calculation in VideoEditor for motion tracking
This commit updates the _get_effective_crop_rect_for_frame method to improve the calculation of the crop rectangle in rotated frame coordinates, incorporating tracking follow functionality. It ensures that the crop rectangle is accurately centered on the interpolated tracking position when motion tracking is enabled. Additionally, comments have been clarified to reflect the use of the effective crop, enhancing code readability and maintainability.
2025-09-17 01:48:49 +02:00
eeaeff6fe0 Enhance tracking point management in VideoEditor with rotated frame coordinates
This commit updates the VideoEditor class to store and manage tracking points in rotated frame coordinates, improving accuracy in overlay rendering and user interactions. It introduces a new method for mapping rotated coordinates to screen space and modifies existing methods to ensure consistent handling of coordinates throughout the editing process. These changes enhance the overall functionality and user experience when working with motion tracking in video editing.
2025-09-17 01:44:58 +02:00
d478b28e0d Refactor cropping and coordinate mapping in VideoEditor to support rotation
This commit modifies the cropping functionality to apply transformations in rotated frame coordinates, ensuring accurate cropping after rotation. It introduces a new method for mapping screen coordinates back to rotated frame coordinates, enhancing the overall cropping experience. Additionally, debug statements are added for better tracking of crop operations, improving the debugging process during development.
2025-09-17 01:42:08 +02:00
b440da3094 Refactor coordinate mapping in VideoEditor for improved zoom and rotation handling
This commit enhances the _map_original_to_screen and _map_screen_to_original methods by clarifying the calculations for zoom and rotation. It introduces new variables for better readability and ensures accurate mapping of coordinates, including adjustments for display offsets. The changes streamline the processing of frame dimensions and improve the overall functionality of the video editing experience.
2025-09-17 01:19:12 +02:00
fdf7d98850 Add motion tracking functionality to VideoEditor
This commit introduces motion tracking capabilities, allowing users to add and remove tracking points on video frames. The tracking state is managed with new attributes, and the crop functionality is enhanced to follow the tracked motion. Additionally, the user interface is updated to reflect the tracking status, and keyboard shortcuts are added for toggling tracking and clearing points. This feature improves the editing experience by enabling dynamic cropping based on motion analysis.
2025-09-17 01:14:26 +02:00
3ee5c1bddc Update spec 2025-09-17 00:18:40 +02:00
1d1d113a92 Refactor tracking point management in VideoEditor and MotionTracker to ensure accurate display coordinates
This commit modifies the handling of tracking points in the VideoEditor and MotionTracker classes by removing the storage of display coordinates. Instead, display coordinates are now calculated dynamically during rendering, ensuring accuracy regardless of crop or rotation states. The changes enhance the consistency of point transformations and improve logging for better debugging and verification of coordinate accuracy during mouse interactions.
2025-09-16 22:07:16 +02:00
e162e4fe92 Refactor tracking point management in VideoEditor and MotionTracker to ensure accurate display coordinates
This commit modifies the handling of tracking points in the VideoEditor and MotionTracker classes by removing the storage of display coordinates. Instead, display coordinates are now calculated dynamically during rendering, ensuring accuracy regardless of crop or rotation states. The changes enhance the consistency of point transformations and improve logging for better debugging and verification of coordinate accuracy during mouse interactions.
2025-09-16 21:34:17 +02:00
cd86cfc9f2 Enhance tracking point management in VideoEditor and MotionTracker with dual coordinate storage
This commit introduces a new TrackingPoint class to encapsulate both original and display coordinates for tracking points, improving the accuracy and consistency of point transformations. The VideoEditor class has been updated to utilize this new structure, allowing for better handling of tracking points during video editing. Additionally, logging has been enhanced to provide clearer insights into the addition and processing of tracking points, while redundant verification steps have been removed for efficiency. This change streamlines the tracking process and improves the overall user experience.
2025-09-16 21:33:28 +02:00
33a553c092 Refine VideoEditor point transformation methods with enhanced consistency and logging
This commit improves the point transformation and untransformation methods in the VideoEditor class by ensuring they match the applied transformations precisely. It adds checks for null points and current display frames, enhancing robustness. Additionally, detailed logging has been introduced to track coordinate adjustments during cropping and transformations, aiding in debugging and ensuring consistent behavior across the coordinate mapping process.
2025-09-16 20:58:54 +02:00