Skip to content

fix ffmpeg binary path with spaces on Windows - #2423

Open
paresy wants to merge 1 commit into
AlexxIT:masterfrom
paresy:fix-ffmpeg-bin-spaces
Open

fix ffmpeg binary path with spaces on Windows#2423
paresy wants to merge 1 commit into
AlexxIT:masterfrom
paresy:fix-ffmpeg-bin-spaces

Conversation

@paresy

@paresy paresy commented Aug 14, 2026

Copy link
Copy Markdown

The ffmpeg source builds a flat command string ("exec:" + Args.String()) that internal/exec re-parses with shell.QuoteSplit. Since Args.String() wrote the binary path unquoted, a path containing spaces (for example C:\Program Files\ffmpeg\ffmpeg.exe) was split at the first space:

[api.mjpeg] add consumer error=streams: exec: "C:\Program": executable file not found in %PATH%

Quote the path in Args.String() when it contains a space, the same way filters are already quoted, so QuoteSplit keeps it as one argument.

I tested and verified the fix on Windows and also added a small test.

The ffmpeg source builds a flat command string ("exec:" + Args.String())
that internal/exec re-parses with shell.QuoteSplit. Since Args.String()
wrote the binary path unquoted, a path containing spaces (for example
C:\Program Files\ffmpeg\ffmpeg.exe) was split at the first space:

    [api.mjpeg] add consumer error=streams: exec: "C:\Program": executable file not found in %PATH%

Quote the path in Args.String() when it contains a space, the same way
filters are already quoted, so QuoteSplit keeps it as one argument.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@AlexxIT AlexxIT self-assigned this Aug 14, 2026
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.

2 participants