Summary
concat writes its demuxer list file to the OS temp dir (via tempPath()), and the ffmpeg concat demuxer resolves a relative file '...' entry against the directory of the list file, not the process working directory. So a relative input path that exists relative to cwd passes the existsSync guard but then fails inside ffmpeg with a confusing "No such file or directory" pointing at a temp-dir path.
Where
src/tools/concat.ts checks existsSync(f) (cwd-relative) for each input, then buildConcatListContent(args.inputs) (src/utils/media.ts) writes the inputs verbatim into a list file created by tempPath() (OS temp dir). The mismatch between the existence check (cwd) and the demuxer's resolution base (temp dir) is the bug.
Repro
From a working directory containing a.mp4 and b.mp4:
concat { inputs: ["a.mp4", "b.mp4"] } -> the existsSync guard passes, but ffmpeg reports it cannot find <temp>/a.mp4.
Suggested fix
Resolve each input to an absolute path before writing the list file (e.g. path.resolve(f) in concat.ts, or have buildConcatListContent take pre-resolved absolute paths). This also matches how resolveOutput already makes the output path absolute. Keep the single-quote escaping in buildConcatListContent.
Summary
concatwrites its demuxer list file to the OS temp dir (viatempPath()), and the ffmpeg concat demuxer resolves a relativefile '...'entry against the directory of the list file, not the process working directory. So a relative input path that exists relative to cwd passes theexistsSyncguard but then fails inside ffmpeg with a confusing "No such file or directory" pointing at a temp-dir path.Where
src/tools/concat.tschecksexistsSync(f)(cwd-relative) for each input, thenbuildConcatListContent(args.inputs)(src/utils/media.ts) writes the inputs verbatim into a list file created bytempPath()(OS temp dir). The mismatch between the existence check (cwd) and the demuxer's resolution base (temp dir) is the bug.Repro
From a working directory containing
a.mp4andb.mp4:concat { inputs: ["a.mp4", "b.mp4"] }-> theexistsSyncguard passes, but ffmpeg reports it cannot find<temp>/a.mp4.Suggested fix
Resolve each input to an absolute path before writing the list file (e.g.
path.resolve(f)inconcat.ts, or havebuildConcatListContenttake pre-resolved absolute paths). This also matches howresolveOutputalready makes the output path absolute. Keep the single-quote escaping inbuildConcatListContent.