JayWebtech / JayWebtech/autoshorts
Windows: captions render fails — drive-letter colon in drawtext fontfile breaks the filter chain
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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