Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows bug fix #11

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Windows bug fix #11

wants to merge 3 commits into from

Conversation

iceberg53
Copy link

That's a fix for the issue FFMPEG exits with code 1 - Invalid Argument.

It introduces the use of functions from the path module (path.basename(), path.resolve(), path.extname(), ...) for handling file paths correctly for both Windows and POSIX operating systems.
The previous implementation fed file paths with invalid characters sequences when running on Windows which caused the bug.

Add explicitly the shell command to run for installing gen-subs to make it easier for
those new to the nodejs ecosystem.
This commit mainly replaces the use of custom string manipulation by
functions from the path module from node ( path.basename(),
path.resolve(), path.extname(), ...) .
It's done to account for Windows OS file paths
("C:\\folder\\subfolder\\file.ext") which are different from POSIX ones
("/home/user/folder/file.ext") .
That difference led to file names with character sequences that caused
an error when calling ffmpeg.
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.

1 participant