Skip to content

Avoid double-escaping positional filter arguments - #890

Open
M-Colley wants to merge 1 commit into
kkroening:masterfrom
M-Colley:fix/issue-745-filter-arg-double-escape
Open

M-Colley wants to merge 1 commit into
kkroening:masterfrom
M-Colley:fix/issue-745-filter-arg-double-escape

Conversation

@M-Colley

@M-Colley M-Colley commented Dec 1, 2026

Copy link
Copy Markdown

Positional filter arguments in FilterNode._get_filter previously ran through escape_chars(..., "\'=:") twice before filtergraph escaping. Consequently, colons in Windows drive paths such as subtitles filter inputs received extra backslashes and failed to open in FFmpeg. Fixes #745.

This change removes the duplicate escape_chars pass over positional arguments in ffmpeg/nodes.py so positional and keyword options share identical level-1 escaping. Correspondingly, ffmpeg/tests/test_ffmpeg.py adds regression tests covering special-character escaping and Windows drive-letter subtitle paths.

Verified with pytest on ffmpeg/tests/test_ffmpeg.py (54 passed) and Black-compatible formatting checks.

Remove the duplicate escape_chars pass on positional filter arguments
in FilterNode._get_filter so positional and keyword options share
single level-1 escaping before filtergraph escaping.

Fixes kkroening#745
swarvex Bot pushed a commit to marco8154/ffmpeg-python that referenced this pull request Dec 1, 2026
…tus 01.12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
swarvex Bot pushed a commit to marco8154/ffmpeg-python that referenced this pull request Dec 1, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
swarvex Bot pushed a commit to marco8154/ffmpeg-python that referenced this pull request Dec 1, 2026
…(01.12.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
swarvex Bot pushed a commit to marco8154/ffmpeg-python that referenced this pull request Dec 1, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error initializing filter 'subtitles' with args

1 participant