Skip to content

AI timeline editing: offline video shortening and written summaries (MVP) #341

Backlog

Description

@horner

Outcome

On a current-generation iPhone, turn an approximately ten-minute spoken video into a coherent, editable video under two minutes, entirely offline after media/model setup. Also support a newly written summary of the recording when that is what the user asks for.

The first sprint should establish editorial quality and real-device feasibility, including whether OmniShotCut adds useful visual-boundary information.

MVP experience

  • Start with one imported English talking-head recording, approximately 8–12 minutes, with processing in the foreground.
  • Offer two requests over the same timed transcript:
    • Shorten this video: select original spoken passages, retain their source order, preview and adjust them, then save a separate editable draft and export an MP4 strictly under 120 seconds.
    • Summarize this recording: generate a written summary with supporting source passages/timestamps.
  • Preserve the source project and media. Allow keep/remove and trim corrections before export.
  • Show model readiness, progress, cancellation and actionable failure states. Download/setup happens before the offline run; do not silently fall back to cloud processing.

Proposed implementation

  1. Reuse Pulse's existing on-device Parakeet/Whisper transcription and persisted word timestamps. Source times are in centiseconds; convert explicitly at media boundaries.
  2. Group complete sentences/utterances into stable passage IDs backed by source word ranges.
  3. Use Apple's explicit on-device SystemLanguageModel through a small native bridge for passage selection and written summarization. Check hardware/OS/language/model availability, fit prompts to the reported context budget, and use separate chunk sessions plus a final selection when needed.
  4. Request structured existing passage IDs for the video cut. Validate IDs, source order and nonoverlap in code; merge adjacent selections and add pause-aware boundary padding. Calculate the duration in code rather than trusting model arithmetic. Aim for 110–115 seconds, then enforce the final exported duration below 120 seconds.
  5. Reuse native preview, source-window editing, caption remapping and export. Stage/copy media and create the generated draft atomically using the existing persistence/reference-accounting conventions; avoid sequential destructive split/delete operations on the original.
  6. Keep ASR, selection and optional visual inference sequential to limit memory pressure. Compare the semantic selector against a simple deterministic transcript-selection baseline.

Current reuse points: src/features/transcription/whisper.ts, src/features/transcription/models.ts, src/features/transcription/compose.ts, src/core/types/transcription.ts, src/features/export/editor-merge.ts, modules/pulse-editor/src/PulseEditor.nitro.ts. Follow docs/persistence.md for generated-draft ownership and recovery.

OmniShotCut feasibility experiment

OmniShotCut detects existing shot changes and transitions; it does not select important spoken ideas. A continuous talking-head recording may correctly produce one shot. Its proposed role is optional visual-boundary guidance, evaluated separately from semantic selection.

Reviewed source: 4f8033cbf352e3ce183d32567b51b41250105b74. Recommended v1.5 has 52.8M parameters and approximately 211 MB of checkpoint weights. Input is 100 consecutive RGB frames at 128 × 96 with 10-frame overlap. Code and model weights are MIT-licensed.

  • Establish a pinned desktop reference using local weights, explicit CPU/MPS/CUDA selection and no implicit pretrained-backbone download.
  • Timebox an initial PyTorch → Core ML conversion attempt to one engineering day. Use a tensor-only fixed-shape wrapper; verify reference output parity before FP16 optimization.
  • If conversion succeeds, bundle the converted model in the experimental build and run it through a small Swift bridge.
  • Replace upstream whole-video FFmpeg buffering with native bounded frame decoding, matching normalization, overlap and postprocessing. Preserve frame presentation timestamps for variable-frame-rate sources.
  • Record conversion compatibility, output parity, latency, peak memory and whether the stage improves actual cuts. A failed or inconclusive port is a documented research result; do not mark on-device OmniShotCut complete without device evidence.

Upstream hard-codes CUDA and provides no verified iOS artifact. Whole-video resized RGB buffering alone would be approximately 664 MB for ten minutes at 30 fps. Model conversion and mobile performance are unverified.

Sprint checkpoints

Initial estimate: five engineering days; OmniShotCut conversion is the main schedule uncertainty. Treat these as checkpoints within one cohesive proof of concept, not separate dependent PRs.

  • 1 — Reference and baseline: import the user's recording; benchmark ten-minute single-clip transcription; establish deterministic selection and desktop OmniShotCut outputs.
  • 2 — Mobile model feasibility: complete the bounded conversion experiment and capture the result or reproducible blocker.
  • 3 — Semantic outputs: implement local passage selection and source-backed written summaries.
  • 4 — Review and render: preview/adjust selections, save a separate editable draft, remap captions and export.
  • 5 — Device evaluation: verify offline operation, assess editorial quality, measure resource use, repair the largest failures and decide whether to retain OmniShotCut.

Acceptance and evidence

  • An 8–12 minute real recording produces an MP4 strictly below 120 seconds, verified from the exported file.
  • After initial media/model setup, cold launch, analysis, written summary, cut preview and export succeed in airplane mode with network access disabled.
  • Every selected excerpt maps to valid source passages/timestamps; written summary claims can be checked against supporting passages.
  • The speaker identifies 5–8 essential points before evaluation. Compare retention and coherence with a human two-minute reference and the deterministic baseline.
  • Review complete thoughts, retained qualifications, repetition and audible joins. Record changed meaning or misleading omission as a failure requiring correction.
  • Measure transcription, selection, optional shot detection and export separately, plus peak memory, thermal state and cancellation/retry behavior. Set latency targets after the first target-phone measurement.
  • Verify the original remains intact, generated-draft creation is atomic, source media remains referenced correctly, and a canceled/failed run leaves no partial usable result.
  • Evaluate an uninterrupted take, rambling/repetitive speech and footage containing existing visual cuts.
  • Run relevant source/native checks and capture accessible native UI evidence. Physical sessions must follow the shared iOS testing skill, global lease and verified release procedure; prepare app-visible test-build notes before device deployment.

Review completed; implementation, model conversion and device behavior have not been tested.

Related work and boundaries

Searched open and closed Pulse issues for AI, timeline, OmniShotCut, rough cuts, natural-language editing and summarization. No dedicated offline AI timeline-editing ticket was found.

Initial outputs are original-voice/video excerpts and written text. Synthetic narration/avatar generation, arbitrary natural-language timeline commands, Android parity and multi-project automatic editing are follow-up scope.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions