Skip to content

[BUG] Audio sync issue with video cuts #15

Description

@clencyc

Problem

When users cut/trim video clips, the audio goes out of sync. Audio continues from original timeline instead of trimmed timeline.

Steps to Reproduce

  1. Upload a video with audio
  2. Trim the video (remove first 10 seconds)
  3. Play video - audio is out of sync with video

Expected Behavior

Audio should start from the trim point, not from original position

Current Behavior

Audio is 10 seconds ahead of video

Environment

  • Browser: Chrome 125.x
  • OS: macOS/Windows
  • Video codec: H.264

Possible Root Cause

Audio and video processed separately without syncing trim times

Files to Check

  • LiveEditBackend/video_processor.py - video trimming logic
  • components/VideoGenerator.tsx - video playback

Solution Ideas

  • Ensure audio and video use same trim offset
  • Test with FFmpeg: merge video + audio with same timing
  • Verify Gemini API returns aligned timestamps

Acceptance Criteria

  • Audio stays in sync with video after trim
  • Works with different audio/video codecs
  • Tested with multiple video durations
  • No audio artifacts or pops

Difficulty: Medium

Estimated time: 3-4 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions