Extended sanitizeForPath to remove additional special characters:
- Apostrophes (')
- Double quotes (")
- Backticks (`)
- Exclamation marks (!)
- Question marks (?)
- Ampersands (&) → "and"
Before: ifuckedmybestfriend'sgirlfriend.iso
After: ifuckedmybestfriendsgirlfriend.iso
This prevents filesystem issues and improves filename compatibility
across different operating systems and file sharing platforms.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The frame counter was showing the internal display loop counter (30fps)
instead of the actual video frame number. This caused the UI to show
frame numbers jumping by large increments (e.g., 260→304→348).
Fixed by calculating: actualFrameNumber = currentTime × fps
For a 60fps video:
- At 4.33s: frame 260 (not display counter 130)
- At 5.07s: frame 304 (not display counter 152)
- At 5.80s: frame 348 (not display counter 174)
Now the frame counter accurately reflects the actual video frame number,
progressing smoothly: 0, 1, 2, 3... (every 1/60th second for 60fps video).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Removed unified_ffmpeg_player.go and unified_player_adapter.go
- Updated frame_player_gstreamer.go to remove UnifiedPlayer fallback
- Updated frame_player_default.go to return error when GStreamer unavailable
- Updated PROJECT_STATUS.md: Player module now fully implemented with GStreamer
- Removed critical issues note about Player A/V sync problems
GStreamer is now the sole playback backend, providing stable A/V
synchronization and frame-accurate seeking. The broken FFmpeg pipe-based
UnifiedPlayer has been completely removed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Performance improvements to eliminate choppy playback:
1. Cap display FPS at 30fps:
- Even 60fps videos display at max 30fps
- Reduces UI update overhead significantly
- Human eye can't distinguish >30fps in preview player
- Video plays at full 60fps internally, display throttled
2. Skip duplicate frames:
- Track lastFrameTime from GStreamer
- Only update UI when currentTime changes
- Prevents refreshing same frame multiple times
- Eliminates the "Frame 389 updated 17 times" issue
3. Remove verbose frame logging:
- Removed per-frame debug log (was slowing down UI)
- Keep INFO logs for start/stop events
- Still log errors when they occur
4. Cleaner logging:
- Show both video fps and display fps at startup
- Makes performance characteristics visible
Results:
- Before: Choppy playback, same frame updated repeatedly
- After: Smooth 30fps display, no duplicate updates
- 4K video (3840x2160) now plays smoothly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add convenience script for running VideoTools in debug mode:
- Automatically enables --debug flag
- Outputs to both console and timestamped log file
- Creates logs/ directory with organized debug logs
- Shows log file location before and after run
Usage:
./scripts/run-debug.sh
Logs saved to:
logs/videotools_debug_YYYYMMDD_HHMMSS.log
This makes debugging much easier without typing the full command
with tee redirection every time.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Critical fix for Fyne canvas rendering:
Fyne's canvas.Image has two ways to display content:
1. File field (string path) - takes precedence
2. Image field (image.Image) - used if File is empty
When buildVideoPane creates canvas.Image with NewImageFromFile(),
it sets the File field. Later when frameDisplayLoop sets Image field,
Fyne still tries to render from File path, ignoring the Image data.
Fix: Clear img.File before setting img.Image in frameDisplayLoop.
This allows GStreamer frames to actually display on screen instead
of showing the static placeholder frame.
Without this fix:
- GStreamer extracts frames perfectly (confirmed by logs)
- Frames are set to img.Image and Refresh() is called
- But Fyne still renders the static file, not the dynamic frames
With this fix:
- img.File cleared, so Fyne uses img.Image field
- Dynamic GStreamer frames display in real-time
- Video playback now visible!
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Critical fixes for GStreamer playback:
1. Add preroll waiting in GStreamer.Load():
- Wait for ASYNC_DONE message after setting to PAUSED
- Ensures first frame is ready before playback
- Prevents black screen on load
2. Fix frameDisplayLoop to always pull frames:
- Remove paused check that blocked frame extraction
- Frames now pulled even when paused (enables scrubbing)
- Only update progress bar when playing
3. Add comprehensive logging:
- Log each frame update with size and timestamp
- Debug frame pull errors
- Track paused state during updates
4. Fix initial paused state:
- Explicitly set paused=true after load
- Matches GStreamer's PAUSED state
These changes fix:
- Black screen issue (no frames displaying)
- Scrubbing not working (frames not available when paused)
- Fast duration counting (progress only updates when playing)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Replace unifiedAdapter with gstPlayer in playSession struct
- Update all playSession methods to use GStreamerPlayer:
- Play(), Pause(), Seek(), StepFrame()
- SetVolume(), Stop(), stopLocked(), startLocked()
- GetCurrentFrame()
- Add frameDisplayLoop() to continuously pull frames from GStreamer
- Connect GStreamer frame output to Fyne canvas for display
- Remove all UnifiedPlayerAdapter dependencies
This completes the GStreamer integration for both Player module
and Convert preview system. Both now use the same stable GStreamer
backend for video playback.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Major improvements to UnifiedPlayer:
1. GetFrameImage() now works when paused for responsive UI updates
2. Play() method properly starts FFmpeg process
3. Frame display loop runs continuously for smooth video display
4. Disabled audio temporarily to fix video playback fundamentals
5. Simplified FFmpeg command to focus on video stream only
Player now:
- Generates video frames correctly
- Shows video when paused
- Has responsive progress tracking
- Starts playback properly
Next steps: Re-enable audio playback once video is stable
- Create logging_fixed.go with proper function closure
- Remove duplicate Error/Fatal function definitions
- Fix missing closing braces and orphaned code
- Maintain all logging functionality while fixing syntax
- Add proper error handling and stack trace support
- Organized logging system for easier crash debugging
This should resolve the persistent 'non-declaration statement' errors that were blocking the build.