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

fluent-ffmpeg and Waifu2x.parseFramerate can't use the same ffmpeg path #7

Closed
Specy opened this issue Jan 26, 2021 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@Specy
Copy link
Contributor

Specy commented Jan 26, 2021

fluent-ffmpeg expects the path of ffmpeg including the ffmpeg.exe at the end, example:

C:\Users\dione\Desktop\Progetti\electron\scapix\ffmpeg\ffmpeg.exe

and instead the Waifu2x.parseFramerate function expects the path to be

C:\Users\dione\Desktop\Progetti\electron\scapix\ffmpeg\

as it needs to cd to that path.

When i do:

let videoOptions = {
     quality:0,
     noise: noise,
     scale: el.scale,
     ffmpegPath: "C:\Users\dione\Desktop\Progetti\electron\scapix\ffmpeg\ffmpeg.exe"
}
Waifu2x.upscaleVideo(filePath,endPath,videoOptions)

i get the error:

TypeError: Cannot read property '0' of null
[1]     at C:\Users\dione\Desktop\Progetti\electron\scapix\node_modules\waifu2x\dist\waifu2x.js:423:78
[1]     at step (C:\Users\dione\Desktop\Progetti\electron\scapix\node_modules\waifu2x\dist\waifu2x.js:33:23)
[1]     at Object.next (C:\Users\dione\Desktop\Progetti\electron\scapix\node_modules\waifu2x\dist\waifu2x.js:14:53)
[1]     at fulfilled (C:\Users\dione\Desktop\Progetti\electron\scapix\node_modules\waifu2x\dist\waifu2x.js:5:58)

Which produces the stderr "path name not valid"
While if i remove ffmpeg.exe from ffmpegPath i get this error:

 Error: spawn C:\Users\dione\Desktop\Progetti\electron\scapix\ffmpeg ENOENT
[1]     at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
[1]     at onErrorNT (internal/child_process.js:469:16)
[1]     at processTicksAndRejections (internal/process/task_queues.js:84:21) {
[1]   errno: 'ENOENT',
[1]   code: 'ENOENT',
[1]   syscall: 'spawn C:\\Users\\dione\\Desktop\\Progetti\\electron\\scapix\\ffmpeg',
[1]   path: 'C:\\Users\\dione\\Desktop\\Progetti\\electron\\scapix\\ffmpeg',
[1]   spawnargs: [ '-formats' ]
[1] }

coming from fluent-ffmpeg

Fix would be to just remove "ffmpeg.exe" from ffmpegPath

@Moebits Moebits added the bug Something isn't working label Jan 26, 2021
@Moebits
Copy link
Owner

Moebits commented Jan 26, 2021

You were using cd ${ffmpegPath} in the code you provided before, so I thought it was a directory! You can upgrade to v0.3.8.

@Moebits Moebits closed this as completed Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants