Skip to content

CJK caption support, Windows fixes, EDL-level style/audio overrides#103

Open
Jerryxumaomao wants to merge 4 commits into
browser-use:mainfrom
Jerryxumaomao:feat/cjk-captions-and-windows-fixes
Open

CJK caption support, Windows fixes, EDL-level style/audio overrides#103
Jerryxumaomao wants to merge 4 commits into
browser-use:mainfrom
Jerryxumaomao:feat/cjk-captions-and-windows-fixes

Conversation

@Jerryxumaomao

@Jerryxumaomao Jerryxumaomao commented Jul 5, 2026

Copy link
Copy Markdown

Four improvements from editing a real Chinese vertical-video (XHS) project with video-use on Windows. Each commit is independent and revertable.

1. fix: Windows subtitle path escaping (413fcf3)

render.py escaped the drive colon in the subtitles filter path but left raw backslashes, which ffmpeg's filter parser eats (D\:\Users\... → broken). Normalizing to forward slashes fixes subtitle burning on Windows.

2. feat: EDL-level subtitle_style + CJK phrase-level caption chunking (a8161f2)

  • edl.json may now carry a subtitle_style ASS force_style string, overriding SUB_FORCE_STYLE per project (different platforms/languages want different caption looks without patching the helper).
  • Chinese/CJK ASR tokens arrive per-character; the 2-word chunker produced captions like 天 天 / 气 不 with orphaned punctuation. CJK text now accumulates into phrase-level cues (break on CJK punctuation or 10 chars), joined without spaces, punctuation-only tokens act as break markers and are never displayed. Latin behavior unchanged.

3. fix: scale overlays to base resolution before compositing (c401166)

ffmpeg's overlay crops (not scales) oversized inputs. Full-res overlay assets rendered against --preview/--draft bases were silently cropped off-frame. Overlays are now scaled to the probed base dimensions first.

4. feat: EDL-level audio_filter + strip all punctuation from CJK captions (d2a9485)

  • edl.json audio_filter runs before the 30ms edge fades in every segment extract — e.g. afftdn denoise or an EQ chain for muddy on-camera mics.
  • CJK captions now drop ALL punctuation (incl. curly quotes) — cleaner on screen; phrase breaks already encode the rhythm.

Tested end-to-end on Windows 10 (Git Bash + PowerShell), ffmpeg 8.1.2, ElevenLabs Scribe zh transcription, 1728x3072 portrait sources: full pipeline transcribe → EDL → cutaway overlays + PIL animation slots → burned phrase-level Chinese subtitles → loudnorm.

🤖 Generated with Claude Code


Summary by cubic

Add CJK-friendly captions and per-project EDL overrides for subtitle style and audio processing, plus fix Windows subtitle path parsing and overlay cropping. Improves Chinese caption quality and makes Windows renders reliable.

  • New Features

    • EDL subtitle_style to override ASS force_style per project.
    • CJK captions: phrase-level chunking (break on CJK punctuation or 10 chars), no inter-character spaces, all punctuation removed.
    • EDL audio_filter runs before the 30ms edge fades in segment extraction (e.g., afftdn, EQ).
  • Bug Fixes

    • Windows: normalize subtitle file paths to forward slashes inside ffmpeg filters to prevent parsing errors.
    • Scale overlay inputs to the base resolution before compositing to avoid cropping on preview/draft renders.

Written for commit d2a9485. Summary will update on new commits.

Review in cubic

Jerryxumaomao and others added 4 commits July 4, 2026 15:25
…en by filter parser)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…unking

- edl.json 'subtitle_style' overrides SUB_FORCE_STYLE per project
- Chinese ASR tokens (per-character) now group into phrase cues:
  break on CJK punctuation or 10 chars, no inter-char spaces,
  punctuation-only tokens act as break markers and are never displayed

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ffmpeg's overlay filter crops (not scales) oversized inputs — full-res
overlay assets were cropped off-frame on preview/draft renders.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…p ALL punctuation from CJK captions

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

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