Skip to content

Add multi-frame continuity support with enhanced features#1

Open
stevemoraco wants to merge 1 commit intomainfrom
feat/multi-frame-continuity
Open

Add multi-frame continuity support with enhanced features#1
stevemoraco wants to merge 1 commit intomainfrom
feat/multi-frame-continuity

Conversation

@stevemoraco
Copy link
Collaborator

This PR adds comprehensive multi-frame reference support to improve video continuity across segments.

Key Features

Multi-Frame Reference System

  • Support for 1, 8, or 32 reference frames (configurable)
  • Two extraction strategies:
    • evenly_spaced: Frames distributed across entire video timeline
    • end_of_file: Frames from final moments of previous segment
  • Cumulative frame extraction from ALL previous segments combined
  • Animated WebP/APNG format for multi-frame references

Enhanced Reliability

  • Exponential backoff retry with 2-hour time limit
  • Retry on rate limits, server errors, and network failures
  • No arbitrary retry attempt limit
  • Intelligent error handling (no retry on moderation blocks)

Improved Logging

  • Comprehensive markdown log files with timestamps
  • Progress tracking at 25% intervals
  • Detailed segment information and timing
  • Full prompt logging (no truncation)

Python 3.9 Compatibility

  • Pin MoviePy to 1.0.3
  • Use Optional[Path] instead of Path | None
  • Simplified dependency installation

Code Quality

  • Split config into separate cells (imports vs settings)
  • Removed complex MoviePy fallback logic
  • Better error messages and debugging info

Configuration

New config variables:

REFERENCE_FRAMES_COUNT = 8  # 1, 8, 32, or custom
REFERENCE_FRAMES_STRATEGY = "evenly_spaced"  # or "end_of_file"
REFERENCE_FRAMES_FORMAT = "webp"  # or "png"
MAX_TOTAL_RETRY_TIME = 7200  # 2 hours

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

This PR adds comprehensive multi-frame reference support to improve video continuity across segments.

## Key Features

### Multi-Frame Reference System
- Support for 1, 8, or 32 reference frames (configurable)
- Two extraction strategies:
  - `evenly_spaced`: Frames distributed across entire video timeline
  - `end_of_file`: Frames from final moments of previous segment
- Cumulative frame extraction from ALL previous segments combined
- Animated WebP/APNG format for multi-frame references

### Enhanced Reliability
- Exponential backoff retry with 2-hour time limit
- Retry on rate limits, server errors, and network failures
- No arbitrary retry attempt limit
- Intelligent error handling (no retry on moderation blocks)

### Improved Logging
- Comprehensive markdown log files with timestamps
- Progress tracking at 25% intervals
- Detailed segment information and timing
- Full prompt logging (no truncation)

### Python 3.9 Compatibility
- Pin MoviePy to 1.0.3
- Use `Optional[Path]` instead of `Path | None`
- Simplified dependency installation

### Code Quality
- Split config into separate cells (imports vs settings)
- Removed complex MoviePy fallback logic
- Better error messages and debugging info

## Configuration

New config variables:
```python
REFERENCE_FRAMES_COUNT = 8  # 1, 8, 32, or custom
REFERENCE_FRAMES_STRATEGY = "evenly_spaced"  # or "end_of_file"
REFERENCE_FRAMES_FORMAT = "webp"  # or "png"
MAX_TOTAL_RETRY_TIME = 7200  # 2 hours
```

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

Co-Authored-By: Claude <noreply@anthropic.com>
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