Skip to content

Conversation

@majiayu000
Copy link

Fixes #581

Changes

  • Add frame count parameter (:1:0) to ffmpeg loop filter for window bar and border radius mask
  • Required for FFmpeg 7.0+ which requires the size parameter when using infinite loop

The loop filter syntax is loop=loop_count:size:start. The bar and mask are single-frame PNG images, so size=1 with start=0 is correct.

🤖 Generated with Claude Code

The FFmpeg loop filter requires the size parameter to specify the number
of frames to loop. Without this parameter, FFmpeg emits the warning
"Number of frames to loop is not set!" and may produce empty or invalid
GIF output, especially with long recordings.

This fixes the loop filter in WithWindowBar and WithBorderRadius methods
by changing `loop=-1` to `loop=-1:1:0` (infinite loop, 1 frame, start at 0).

Fixes charmbracelet#581

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: majiayu000 <[email protected]>
@majiayu000 majiayu000 requested a review from a team as a code owner December 30, 2025 18:55
@majiayu000 majiayu000 requested review from kujtimiihoxha and tauraamui and removed request for a team December 30, 2025 18:55
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.

empty gif after ffmpeg error "Number of frames to loop is not set"

1 participant