{ code: 101, msg: 'The input file path must be a string' }
Error occurred in handler for 'loadSong': { code: 101, msg: 'The input file path must be a string' }
```
const loadSong = async (
songPath: Path // a string representing the path to the song
) => {
const decodedPath = decodeURI(songPath);
const [ path, extension ] = decodedPath.split('.');
return new Promise((resolve, reject) => {
if (extension === 'm4a') {
const newPath = path + '.flac';
ffmpeg({
arguments: [ '-i', decodedPath, '-acodec', 'alac', newPath ],
print: data => resolve(data),
printErr: error => {
console.error(error.msg);
reject(error);
}
});
} else {
resolve(decodedPath);
}
});
};
```
Tried using a string literal instead of variables for my arguments and I get the same error.
关闭于 2023-03-11 1 条评论