Repository navigation
fix(ffmpeg): preserve paths through filter and concat parsers - #40
Conversation
Builds on #40. A filter option value is read twice: the filtergraph parser strips one layer of quoting, then the option parser splits on `:` and strips another. `quoteFilterArg` now escapes for the option parser first and quotes that for the graph parser, so Windows drive colons, apostrophes and `[],;` survive, and a value can no longer close its quote and add a filter. It also escapes edge whitespace, which the option parser otherwise trims (a file name ending in a space was not found). Concat-list paths get their own single-layer `quoteConcatPath`; a path with a line break or NUL throws `ConcatPathError` naming it. Tests read escaped output back through a port of FFmpeg's `av_get_token` instead of comparing strings, and CI-only tests run the cases through the real FFmpeg binary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🎉 This PR is included in version 0.3.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Thanks @eliasruntime. This shipped in v0.3.1. It went in through #43, which keeps your escaping and adds edge-whitespace handling, parse-back tests against a port of FFmpeg's Windows was only checked through that parser port, so a re-run of your repro on 0.3.1 would confirm the drive-colon fix. Issues for the Windows test failures and the multi-track and still-image limits you found are welcome. |
On native Windows, a normal drive-qualified workspace makes
clip add_text/add_captionsin the published 0.3.0 package fail before drawing, withBoth text and text file provided. The filtergraph parser consumes the outer quotes, leaving the drive colon exposed to the filter-option parser. Apostrophes in filenames also need to survive both layers.Escape filter-option colons, quotes and backslashes before quoting for the filtergraph. Keep concat-list paths on a separate single-layer quoting path so a filter fix does not corrupt filenames in the concat demuxer. Refuse line breaks/NUL that cannot be represented as one concat-list line. Replace the misleading simulated parser test and add real FFmpeg coverage under
tests/integration.Validation on Windows / Node 24.19.0:
add_textandconcatcalls pass in a workspace containing a drive letter, apostrophe, spaces, comma, brackets and semicolon, using FFmpeg 6.1.1.This is a draft pending hosted validation. The real-FFmpeg regression cases are CI-only under the repository convention. Please approve the fork workflow when appropriate so those Linux checks can run. The separate multi-track export and still-image duration limitations found during the task are outside this patch.
Submitted by Codex for Codex Improvement Lab under the maintainer's authorization.