Skip to content

Conversation

@remorses
Copy link

Description

This PR provides a minimal reproduction case for the issue where having many clips (more than 30) in a composition causes the player to freeze during playback.

Changes

  • Modified the playground example to create 40 video clips with 3-second duration each
  • Removed all non-essential layers and effects to isolate the issue
  • Uses a sliding window approach to create overlapping clips from a single video source

How to Reproduce

  1. Run the playground with this branch
  2. Start playback
  3. The player will freeze after approximately 4 seconds

Related Issue

This reproduction case demonstrates the issue described in #86

Notes

The freeze happens consistently when there are many clips in the composition, regardless of the video duration. The timing of the freeze is inversely related to the number of clips - more clips cause the freeze to occur sooner.

- Change imports from core-v4 to core in all playground files
- Replace single animated video clip with multiple clips using sequential layer
- Split 20-second video into 50 clips with 4-second minimum duration each
- Use sliding window approach where clips overlap to maintain minimum duration
- Skip clips that would exceed video duration
- This setup helps reproduce browser hanging issue when adding many clips
- Remove all layers except video clips layer
- Remove unused sources (images, audio, captions)
- Remove font loading
- Keep only the essential code for reproducing many clips issue
- Composition now only contains 50 video clips of 4 seconds each
- Set CLIPS to 40 and minClipDuration to 3
- This configuration reliably reproduces the freeze after ~4 seconds of playback
Copilot AI review requested due to automatic review settings November 24, 2025 10:47
Copilot finished reviewing on behalf of remorses November 24, 2025 10:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR creates a minimal reproduction case for issue #86 where having many clips (more than 30) in a composition causes the player to freeze during playback. The changes simplify the playground example by removing all non-essential elements and creating 40 overlapping video clips from a single source using a sliding window approach.

Key Changes:

  • Changed package dependency from @diffusionstudio/core-v4 to @diffusionstudio/core
  • Simplified composition to only include 40 video clips with 3-second duration each, created using a sliding window pattern
  • Removed all other layers, effects, and animations to isolate the freezing issue

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
playground/composition.ts Replaced complex multi-layer composition with simplified reproduction case creating 40 overlapping video clips
playground/timeline.ts Updated import statement to use new package name
playground/render.ts Updated import statement to use new package name
playground/main.ts Updated import statement to use new package name
playground/controls.ts Updated import statement to use new package name
package-lock.json Updated package dependency from @diffusionstudio/core-v4 to @diffusionstudio/core with version 4.0.1

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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