Skip to content

Bug: concat does not probe inputs and silently writes broken files for mismatched clips #206

Closed

Description

@TMHSDigital

Why it matters

concat uses the concat demuxer with stream copy, which requires identical codec, size, pixel format and audio layout. Nothing checks this, so mismatched inputs produce a file that exits 0 but is broken. The agent reports success and the user finds out later.

Evidence

  • src/tools/concat.ts:119-130: inputs are written to a list file with no ffprobe comparison.
  • Repro: a 320x240 clip with no audio plus a 640x480 clip with audio exits 0. The header says 320x240, the resolution changes mid-stream, and the second clip's audio is lost.

Suggested approach

Probe every input and compare the video codec, width, height, pix_fmt, fps, whether there is audio, sample rate and channels. On a mismatch, either fail with a clear message naming the differing field, or fall back automatically to the re-encoding path in assemble_highlights (hard cuts) and say so in the result.

Done when

  • The mismatched pair above either errors clearly or yields a valid file with both clips' audio and video (integration test).

Activity

  1. added
    bug
    effort: small
    impact: medium
    on Oct 25, 2026
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

    bugeffort: smallimpact: mediumpriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions