Skip to content

fix: preserve selected subtitle colors - #210

Merged
LauraGPT merged 1 commit into
mainfrom
codex/fix-subtitle-color-135
Aug 31, 2026
Merged

fix: preserve selected subtitle colors#210
LauraGPT merged 1 commit into
mainfrom
codex/fix-subtitle-color-135

Conversation

@LauraGPT

Copy link
Copy Markdown
Collaborator

Summary

  • render subtitle text with Pillow RGBA instead of MoviePy 1.0.3's external ImageMagick TextClip path
  • preserve the existing SubtitlesClip timing, bottom-center placement, clipping, and FFmpeg video encoding
  • resolve the bundled subtitle font relative to the package and declare Pillow as a direct runtime dependency
  • add pixel-level coverage for black, white, green, and red, plus a composed-video-frame regression

Context

Related to #135. Two users reported that every subtitle color choice exported as white. The UI value already reached TextClip(color=font_color), so this change removes the external rasterizer from that contract and produces a transparent RGBA clip with the selected color directly.

This PR deliberately does not close #135. The issue should remain open until a reporter verifies an exported video in their original environment.

Verification

  • red test: the new renderer test failed to collect on exact main because no deterministic subtitle renderer existed
  • 24 passed across subtitle rendering, release contract, recognition compatibility, and duplicate-text matching
  • py_compile passed for the renderer and video clipper
  • pip check reported no broken requirements on MoviePy 1.0.3 / NumPy 1.26.4 / Pillow 12.3.0
  • git diff --check passed
  • one-second MP4 export and decode contained 1,297 red subtitle pixels and 0 white pixels

Exact signed+DCO head: c0d390d238b539030719533e9b702872284be3d6.

Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
@LauraGPT
LauraGPT requested a review from lyblsgo August 31, 2026 04:56
@LauraGPT LauraGPT added the bug Something isn't working label Aug 31, 2026
@LauraGPT
LauraGPT merged commit 6a887ef into main Aug 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

字幕颜色改不了

1 participant