Skip to content

Feature: Reel mode (9:16), zoom-out blur background, per-section PIP scale #2

@amitayks

Description

@amitayks

Summary

Three related features for vertical video export and enhanced PIP control:

1. Reel Mode (9:16 Vertical Output)

  • New outputMode setting to switch between 16:9 landscape and 9:16 reel
  • Per-section reelCropX property to select which horizontal strip of the 16:9 source to crop
  • Crop overlay in editor preview with draggable repositioning
  • Smooth animated crop transitions between sections (0.3s)
  • Crop preset buttons (left/center/right)

2. Zoom-Out with Blur Background (Reel Mode)

  • Extended zoom range to 0.5–3.0 in reel mode (was 1.0–3.0)
  • When zoom < 1.0, content is scaled down and centered on a darkened background (20% brightness)
  • Smooth transitions when zoom crosses the 1.0 boundary

3. Per-Section PIP Scale

  • pipScale is now a per-keyframe property (0.15–0.50) instead of a global setting
  • Each section can have a different PIP size with smooth animated transitions
  • Two-stage ffmpeg scale pipeline to handle variable-size PIP with round corners

4. Per-Mode State Save/Restore

  • Toggling between 9:16 (reel) and 16:9 (landscape) previously destroyed per-section settings (zoom, pan, PIP position/scale)
  • Now each mode independently remembers its visual state via savedLandscape/savedReel slots on each keyframe
  • Switching modes saves current state and restores the target mode's state (or applies defaults on first entry)

5. Reel Crop Fit-Content Bounds

  • In reel mode with screenFitMode: 'fit', the source video may be narrower than the canvas, creating black bars
  • The crop region now constrains to the actual video content edges instead of the full canvas width
  • When zoom-out and fit mode are combined, both constraints stack: contentW * zoom determines the crop range
  • Prevents black side bars from appearing in the reel output

Bug Fixes

  • resolveOutputSize() now correctly uses sourceHeight parameter
  • Camera black fallback uses correct dimensions per output mode
  • Overlay filter now includes eval=frame for animated PIP positioning
  • snapToNearestCorner() accepts effective canvas dimensions instead of hardcoded globals

Tests

  • Comprehensive unit tests for all new domain normalizers, render filter logic, and render service changes

Related Commits

  • fd70cab — feat: add reel mode (9:16), zoom-out blur background, and per-section PIP scale
  • 06135bc — feat: save/restore per-mode visual state when toggling 9:16/16:9
  • 6596bf0 — feat: constrain reel crop to actual content edges in fit mode
  • 324dffb — feat: add 9-point PIP snap grid with per-section/per-mode persistence
  • f77d245 — fix: reel render crash, zoom-out blur bleed, and per-mode state loss

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions