Bug Summary
Video export fails when a text overlay uses the default built-in font.
File
src/lib/text-overlay.ts (around line 91)
Current Code
let filter = `drawtext=text='${escapedText}':x=${pixelX}:y=${pixelY}:fontsize=${overlay.fontSize}:fontcolor=${overlay.color}:fontweight=${fontWeightParam}`;
if (overlay.fontFamily) {
const safeFontName = overlay.fontFamily.replace(/[^a-zA-Z0-9-]/g, "");
filter += `:fontfile='${safeFontName}'`;
}
Root Cause
The drawtext filter's fontfile parameter expects a valid font file path that exists inside FFmpeg's virtual filesystem.
However, the default overlay uses:
which generates:
No file named Arial is written into the FFmpeg filesystem, causing drawtext initialization to fail.
Steps to Reproduce
- Upload any valid video.
- Open the Text Overlay tool.
- Click "Add Text".
- Leave the default font unchanged.
- Export as MP4, WebM, MKV, or GIF.
Actual Behavior
FFmpeg receives an invalid drawtext filter:
The font file cannot be found, causing export failure.
Expected Behavior
Text overlays using built-in/default fonts should export successfully without requiring a font file path.
Impact
- Default text overlays can break exports.
- Users encounter failed exports without providing invalid input.
- The text overlay workflow becomes unusable for many users.
Suggested Fix
- Do not set
fontfile for built-in fonts.
- Allow FFmpeg to use its default font when no custom font file exists.
- For custom fonts, write the uploaded font into FFmpeg's virtual filesystem and reference the actual file path.
Why This Is a Bug
The application's default UI creates an invalid FFmpeg argument automatically. A standard user workflow can fail without any malformed input.
ASSIGN TO ME UNDER GSSOC2026 /ASSIGN/GSSOC2026
Bug Summary
Video export fails when a text overlay uses the default built-in font.
File
src/lib/text-overlay.ts(around line 91)Current Code
Root Cause
The
drawtextfilter'sfontfileparameter expects a valid font file path that exists inside FFmpeg's virtual filesystem.However, the default overlay uses:
fontFamily: "Arial"which generates:
No file named
Arialis written into the FFmpeg filesystem, causing drawtext initialization to fail.Steps to Reproduce
Actual Behavior
FFmpeg receives an invalid drawtext filter:
The font file cannot be found, causing export failure.
Expected Behavior
Text overlays using built-in/default fonts should export successfully without requiring a font file path.
Impact
Suggested Fix
fontfilefor built-in fonts.Why This Is a Bug
The application's default UI creates an invalid FFmpeg argument automatically. A standard user workflow can fail without any malformed input.
ASSIGN TO ME UNDER GSSOC2026 /ASSIGN/GSSOC2026