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

Trouble with paths that have spaces in them #78

Open
Jacob-Mahoney opened this issue Jun 26, 2020 · 6 comments
Open

Trouble with paths that have spaces in them #78

Jacob-Mahoney opened this issue Jun 26, 2020 · 6 comments

Comments

@Jacob-Mahoney
Copy link

Jacob-Mahoney commented Jun 26, 2020

Title is pretty self-explanatory. I'm having trouble with paths that have spaces in them.

import ffmpeg from "ffmpeg"

try {
    let process = new ffmpeg("C:\\Users\\JR\\Desktop\\new folder\\test.m4a");
    process.then(video => {
        video.save("C:\\Users\\JR\\Desktop\\test.mp3", (error, file) => {
            if (!error) {
                console.log("converted!");
            } else {
                console.log("uh oh error: " + error);
            }
        });
    },
    error => {
        console.log("Error: " + error);
    });
} catch (error) {
    console.log(error.code);
    console.log(error.msg);
}

Below are all the variations I've tried. They all result in either an error from the module itself saying "The input file does not exist" or an error from ffmpeg saying "No such file or directory".

let process = new ffmpeg("C:\\Users\\JR\\Desktop\\new folder\\test.m4a");

let process = new ffmpeg('C:\\Users\\JR\\Desktop\\new folder\\test.m4a');

let process = new ffmpeg('"C:\\Users\\JR\\Desktop\\new folder\\test.m4a"');

let process = new ffmpeg("C:/Users/JR/Desktop/new folder/test.m4a");

let process = new ffmpeg('C:/Users/JR/Desktop/new folder/test.m4a');

let process = new ffmpeg("C:\\Users\\JR\\Desktop\\new\ folder\test.m4a");

let process = new ffmpeg('C:\\Users\\JR\\Desktop\\new\ folder\test.m4a');

And probably several other variations that I'm forgetting. Any ideas?

@Jacob-Mahoney Jacob-Mahoney changed the title Trouble getting it to work with paths that have spaces in them Trouble with paths that have spaces in them Jun 26, 2020
@tuananhl
Copy link

Nice. Same issue

@tugrul512bit
Copy link

tugrul512bit commented Apr 25, 2021

Also with paranthesis even when its encodeURI(name)'d.

World of Warcraft - Warlords of Draenor Cinematic(1).mp4

even if I append+prepent the file path with (") characers.

"'"+path.join(__dirname,uri)+"'"

@anselanza
Copy link

Ouch, yes, having the same problem. Anybody at least find a workaround?

@paulkre
Copy link

paulkre commented Nov 11, 2021

How is this still not fixed?

@anselanza
Copy link

Going to clone the repo and see if I can hunt this one down for myself!

@anselanza
Copy link

I think I fixed it: #87

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

No branches or pull requests

5 participants