Skip to content

fix(gui, screencast, videocut): Phantom Spirit 120 Vision EVO support confirmation, BulkLCD screencast fix, GIF support, and video cut zoom/pan - #271

Open
alan7383 wants to merge 5 commits into
Lexonight1:mainfrom
alan7383:fix/grandvision-screencast-videocut
Open

fix(gui, screencast, videocut): Phantom Spirit 120 Vision EVO support confirmation, BulkLCD screencast fix, GIF support, and video cut zoom/pan#271
alan7383 wants to merge 5 commits into
Lexonight1:mainfrom
alan7383:fix/grandvision-screencast-videocut

Conversation

@alan7383

@alan7383 alan7383 commented Aug 13, 2026

Copy link
Copy Markdown

Summary

This PR resolves several issues identified while testing and confirming hardware support for the Thermalright Phantom Spirit 120 Vision EVO (87AD:70DB, 3.95-inch IPS 480×480 screen, Wire.BULK, PM 4, SUB 4 A1LF10V):

  1. Hardware Support Confirmation for Phantom Spirit 120 Vision EVO:

    • Resolved the open tester request in doc/TESTERS_WANTED.md for the Phantom Spirit 120 Vision.
    • Confirmed 100% operational on hardware: real-time sensor metrics (CPU/GPU temperature, clocks), animated video/GIF playback, custom text/sensor overlays, theme saving/loading, mask toggles, and Wayland/PipeWire screencasting.
    • Updated documentation (README.md, doc/REFERENCE_DEVICES.md, doc/TESTERS_WANTED.md).
  2. Fix BulkLCD Screencast Wire Format:

    • In LCDHandler.on_screencast_frame, build_screencast_frame was called without profile=device.profile. On BulkLCD devices requiring JPEG compression, this caused frames to fall back to uncompressed RGB565 (460KB/frame), breaking live hardware screencasting.
    • Suppressed static theme preview rebuilds (rebuild_preview, _render_and_send, and _DeviceRenderObserver) while Screencast is active to prevent the default theme from overriding the screencast stream.
    • Added spectacle fallback capture support on KDE Wayland with output file readiness polling.
  3. Native Animated GIF Background Support:

    • Added .gif to _VIDEO_EXTS, _VIDEO_CANDIDATES, and theme save/load allowlists so animated GIFs can be loaded directly into background/media playback.
    • Handled QImage instances in QtRenderer.from_raw_rgb24.
  4. Video Cutter (UCVideoCut) Fixes & Zoom/Pan Enhancements:

    • Fixed fit-height / fit-width aspect ratio scaling and FFmpeg export (replaced forced -s 480x480 distortion with proper force_original_aspect_ratio and center crop).
    • Added interactive mouse wheel zoom (1.0× to 5.0×) in the preview area.
    • Added interactive mouse pan / drag on the preview to position and frame the crop area.
    • ExportWorker now applies the exact zoom level and pan offsets in the FFmpeg filter chain.
  5. Fix Gallery / Custom Background Override Persistence Across App Restarts:

    • In LCDHandler._cleanup_device, StopVideo was called unconditionally upon GUI close, which wiped DeviceSettings.background_path to None in trcc.json. Added keep_override=True to StopVideo so tearing down the GUI does not delete user preferences.
    • In RestoreLastTheme, check if background_path is set and replay PlayVideo on startup so custom and cloud gallery video backgrounds resume playing immediately instead of falling back to the base theme background.
  6. trcc doctor Udev Path Detection Fix:

    • In health.py:check_udev_rules_linux(), search for 99-trcc-lcd.rules (the canonical filename installed by distro packages and _udev.py) as well as standard distro /usr/lib/udev/rules.d/ paths, fixing a false-positive [WARN] warning on system health checks.

Changes by Component

  • src/trcc/ui/gui/lcd_handler.py:
    • Pass profile=device.profile to build_screencast_frame.
    • Gate rebuild_preview() and _render_and_send() when screencast is active.
    • Pass keep_override=True to StopVideo during _cleanup_device.
  • src/trcc/ui/gui/trcc_app.py:
    • Skip preview reset in _on_bus_frame_sent when screencast is active.
  • src/trcc/ui/gui/uc_video_cut.py:
    • Add mouse wheel zoom and mouse drag/pan handlers.
    • Implement dynamic aspect ratio and zoom/crop filters for FFmpeg export and preview.
  • src/trcc/ui/screen_overlay.py:
    • Add spectacle command support with file existence check for KDE Wayland.
  • src/trcc/core/commands/_helpers.py, src/trcc/services/display.py, src/trcc/services/theme.py:
    • Add .gif extension to video candidate and save/load sets.
  • src/trcc/core/commands/theme.py:
    • Replay PlayVideo for persisted background_path in RestoreLastTheme.
  • src/trcc/core/commands/device.py:
    • Add keep_override parameter to StopVideo.
    • Skip clearing background_path when keep_override=True.
  • src/trcc/adapters/render/qt.py:
    • Support QImage in from_raw_rgb24.
  • src/trcc/adapters/diagnostics/health.py, src/trcc/adapters/system/linux.py:
    • Include 99-trcc-lcd.rules and distro /usr/lib/udev/rules.d/ in health check candidate paths.
  • src/trcc/app.py, src/trcc/core/commands/device.py:
    • Skip theme re-render in RenderAndSend and _DeviceRenderObserver when screencast region is set.
  • README.md, doc/REFERENCE_DEVICES.md, doc/TESTERS_WANTED.md:
    • Document verified support for Phantom Spirit 120 Vision EVO (87AD:70DB).

Checklist

  • Tested on hardware (Thermalright Phantom Spirit 120 Vision EVO - 87AD:70DB)
  • Code compiles and syntax checked (python -m py_compile)
  • Screencast verified on Wayland (PipeWire & Spectacle fallback)
  • Video trimming & zoom/crop verified on hardware
  • Gallery & custom video persistence verified across app restart
  • trcc doctor health check passes cleanly (0 fail / 0 warn)

@alan7383 alan7383 changed the title fix(gui, screencast, videocut): fix BulkLCD screencast, add GIF support, and add zoom/pan in video cut fix(gui, screencast, videocut): GrandVision 360 AIO support confirmation, BulkLCD screencast fix, GIF support, and video cut zoom/pan Aug 13, 2026
@alan7383 alan7383 changed the title fix(gui, screencast, videocut): GrandVision 360 AIO support confirmation, BulkLCD screencast fix, GIF support, and video cut zoom/pan fix(gui, screencast, videocut): Phantom Spirit 120 Vision EVO support confirmation, BulkLCD screencast fix, GIF support, and video cut zoom/pan Aug 13, 2026
@alan7383
alan7383 force-pushed the fix/grandvision-screencast-videocut branch from 1aeaf4a to 0cb34d1 Compare August 13, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant