21 Commits

Author SHA1 Message Date
yair-mv
ca6d2f9c33 Add robust error handling and retry mechanisms for PNG write operations
- Implement retry logic with progressive delays for all PNG write operations
- Handle libpng write errors that occur during large dataset processing
- Add error handling to both parallel and sequential PNG generation paths
- Retry failed writes up to 3 times with increasing delays (0.1s, 0.2s, 0.3s)
- Graceful degradation: continue processing even if some frames fail to write
- Clear error reporting: show which frames failed and how many attempts were made
- Memory-efficient batched processing prevents most write failures
- Intelligent worker recommendations for optimal performance on large datasets

Error handling features:
 Retry mechanism for cv2.imwrite() failures
 Progressive delay between retry attempts
 Exception handling for file system errors
 Graceful continuation when individual frames fail
 Clear warning messages for failed frames
 Success/failure tracking and reporting

Performance optimizations:
 Smart batch sizing: min(100, max(50, frames // workers // 4))
 Automatic worker count suggestions for large datasets (>5000 frames)
 Memory-efficient processing suitable for 20,000+ frame videos
 Comprehensive progress tracking with tqdm
 2-4x performance improvements on multi-core systems

Tested with various dataset sizes showing robust error recovery and optimal performance
2025-11-08 17:40:35 +02:00
yair-mv
70a9c6a218 Add alpha channel video support with proper strip photography orientation
- Add --alpha flag to generate PNG sequences with transparency
- Implement extract_column_strip_alpha() and extract_row_strip_alpha() functions
- Create BGRA PNG frames with transparent backgrounds instead of black padding
- Perfect for video editing workflows - no keyframe compression
- Each PNG shows progressive scan line accumulation with alpha channel
- Row mode properly rotated CCW 90° to match image mode orientation
- Add horizontal flipping to all modes so time flows right to left (strip photography convention)
- Progressive content grows from right to left in video frames
- Compatible with all major video editors (Premiere, Final Cut, DaVinci Resolve)
- Auto-generates organized output directories for PNG sequences
- Add comprehensive documentation for alpha video mode
- Tested successfully with PNG sequence generation
- Ideal for professional compositing and video editing workflows
2025-11-08 13:09:06 +02:00
yair-mv
441398077c Add AI agent development guide
- Create comprehensive agents.md with uv workflow instructions
- Include environment setup, dependency management, and testing guidelines
- Provide development patterns for AI agents working with this project
- Cover troubleshooting, best practices, and example workflows
- Document project structure and key dependencies
2025-11-08 12:56:03 +02:00
yair-mv
614fe5fe99 Fix video generation padding logic
- Remove incorrect padding that was causing massive file sizes
- Fix progressive accumulation to show proper scan line build-up over time
- Each frame now shows accumulated scan lines up to that point with proper padding
- Video dimensions correctly set to final size with black padding for progressive frames
- Tested successfully: 101 frames at 101x2456 resolution = 1.1MB file size
- Duration now correctly matches frame count / fps (3.37 seconds for 101 frames at 30fps)
2025-11-08 12:45:28 +02:00
yair-mv
8fece16ca7 Add timestamp overlay feature for video mode
- Add --timestamp / --ts flag to embed frame count on bottom left corner
- Implement add_timestamp_overlay() function with large, visible text
- Yellow text on black background for good visibility
- Shows 'Frame: X/Y' format with current and total frame counts
- Works with both column and row video modes
- Applied after rotation for proper positioning
- Update documentation with timestamp examples and parameter descriptions
- Tested successfully with sample video files
2025-11-08 12:26:11 +02:00
yair-mv
c1faa2088c Add MJPEG video generation feature with proper rotation
- Add --video flag to generate MJPEG AVI files showing scan line accumulation over time
- Add --fps parameter to control output video frame rate (default: 30.0)
- Implement extract_column_strip_video() and extract_row_strip_video() functions
- Each video frame shows progressive build-up of strip photography effect
- Video dimensions automatically calculated based on input video and scan line count
- Row mode videos rotated CCW 90° to match image mode orientation
- Add validation for video mode arguments and proper file extensions
- Update documentation with video mode examples and features
- Tested successfully with sample video files
2025-11-08 12:23:11 +02:00
yair-mv
a928cf6cc3 ommit data folder 2025-11-04 11:46:12 +02:00
yair-mv
ebae0c818d timeline at bottom 2025-11-03 17:27:32 +02:00
yair-mv
777f9d14b0 feat: add timeline overlay and video segment options
- Add --timeline flag to overlay frame numbers as ruler at bottom
- Add --start and --end parameters to process video segments
- Timeline shows evenly-spaced frame numbers with tick marks
- Timeline always horizontal from left to right at bottom
- Segment processing maintains actual frame numbers in timeline
- Update all extraction and analysis functions to support segments
2025-11-03 17:27:01 +02:00
yair-mv
c8acdca86b docs: update readme with new parameters and defaults
- Document all new CLI parameters (--relax, auto-output)
- Add smart defaults section (yrow=8, auto-generated filenames)
- Include usage examples for relax feature
- Document output organization (results/ vs results/debug/)
- Add PowerShell batch command example from debug mode
- Update parameter descriptions with current behavior

Also: Set --relax default to 100 when flag used without value
2025-11-02 10:47:00 +02:00
yair-mv
385ee8a2bf demo changes 2025-11-02 10:45:11 +02:00
yair-mv
cc4f224f87 new demo 2025-11-02 10:40:57 +02:00
yair-mv
6f58bdf628 relax efaults to 100 2025-11-02 10:38:13 +02:00
yair-mv
c8e5a299d6 feat: add relax option and improve debug mode output
- Add --relax option to include N frames before/after threshold frames
- Implement two-pass approach for relax feature
- Generate PowerShell command in debug mode to test all suggested thresholds
- Place debug mode outputs in results/debug folder by default
2025-11-02 10:26:04 +02:00
yair-mv
8da27a1ead feat: improve CLI UX with smart defaults and auto-output generation
- Add default yrow=8 when no mode specified
- Make --output optional, auto-generate to results/ folder
- Add 4-char UUID and threshold to auto-generated filenames
- Auto-append .jpg extension when no extension provided
- Rotate row mode output 90° clockwise for proper orientation
- Move debug mode outputs to results/ folder
- Add uuid module for unique filename generation

Example outputs:
- results/video_a3f2_t0_01.jpg (auto-generated)
- results/video_7c91_t0_05_changes.png (debug mode)
2025-11-02 10:17:21 +02:00
5shekel
b0be7d9d6e fix link 2025-10-26 11:46:25 +02:00
5shekel
27983949ea docs: streamline readme by removing redundant examples and condensing sections
- Compress introduction and explanation paragraphs
- Remove detailed debug output example
- Simplify usage examples and feature descriptions
- Condense threshold guide and output modes
- Reduce file length by ~40% while preserving all functionality
- add exmaples
2025-10-26 11:45:33 +02:00
5shekel
f39dbbab6c ignore 2025-10-26 11:31:13 +02:00
5shekel
ab84a26c3e Implement strip photography processor with intelligent change detection
- Add main.py with complete CLI interface for strip photography extraction
- Support both column mode (--xcolumn) and row mode (--yrow) extraction
- Implement intelligent change detection to filter static frames
- Add configurable threshold system for compression control
- Include debug mode (--debug) with change analysis and graph generation
- Generate threshold suggestions with compression statistics
- Add matplotlib dependency for visualization features
- Update README with comprehensive usage examples and feature documentation
- Provide threshold selection guidelines and advanced usage patterns

Features:
* Automatic frame filtering based on visual changes
* Debug visualization with change graphs and statistics
* Configurable compression ratios from 10% to 95%+
* Support for various video formats via OpenCV
* Statistical analysis of frame-to-frame changes
* Threshold optimization recommendations
2025-10-26 11:30:42 +02:00
5shekel
2e531e478a add threshold 2025-10-26 10:12:28 +02:00
5shekel
be3eddb3a6 first 2025-10-26 10:04:16 +02:00