JayWebtech / JayWebtech/autoshorts

Windows: captions render fails — drive-letter colon in drawtext fontfile breaks the filter chain

Open Beginner friendly
#41 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
821
Forks
171
PR merge metrics
No merged PRs in 30d

Description

Bug: On Windows, "Cut" renders the flat clip but captions are always skipped with:

ffmpeg clip render failed: [AVFilterGraph] No option name near '/Windows/Fonts/SegoeUIb.ttf:text=...'
Error parsing filterchain 'crop=...,drawtext=fontfile='C:/Windows/Fonts/SegoeUIb.ttf':text=...' around: ...

Root cause: build_drawtext_filters in src-tauri/src/lib.rs emits fontfile='C:/Windows/Fonts/SegoeUIb.ttf'. In ffmpeg, drawtext options are :-delimited, and the drive-letter colon in C: terminates the fontfile value early (the surrounding quotes do not protect it on this ffmpeg build). The parser then sees /Windows/Fonts/... as a new option with no =, producing "No option name near ...". macOS/Linux font paths have no drive-letter colon, which is why captions only break on Windows.

Fix (2 lines, verified): escape the colons in the font path:

let escaped_path = normalized_path
    .replace(':', "\\:")
    .replace('\'', "'\\''");
font_option = format!("fontfile='{}':", escaped_path);

This produces fontfile='C\:/Windows/Fonts/SegoeUIb.ttf': which parses and renders correctly (verified end-to-end with ffmpeg 8.1.1 full build on Windows 10/11: the full 52-caption chain renders with exit 0, captions burned in).

Secondary (cosmetic): when a re-cut later succeeds, the clip card still shows the previous failure's render_log — the success path doesn't clear it, which makes it look like the failure persists. Suggest clearing render_log on success.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src-tauri/src/lib.rs at build_drawtext_filters and reproduce the Windows caption render with the reported font path and ffmpeg error. Verify that the full caption chain renders successfully on Windows, then check the successful re-cut path to confirm whether the previous render_log is cleared.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.