Skip to content

Commit

Permalink
Fixed bug #17 File spaces in path
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceFoon committed Feb 13, 2024
1 parent bc8535c commit 5f09ebb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ console.log(
MM .M M M MM. .MM '88888P8 dP dP dP '88888P' M MMMMM MM '88888P' '88888P8 dP '88888P'
MMMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMMM
MM'""""'YMM dP
M' .mmm. 'M 88
M MMMMMooM .d8888b. 88d888b. dP .dP .d8888b. 88d888b. d8888P .d8888b. 88d888b.
M MMMMMMMM 88' '88 88' '88 88 d8' 88ooood8 88' '88 88 88ooood8 88' '88
M. 'MMM' .M 88. .88 88 88 88 .88' 88. ... 88 88 88. ... 88
MM. .dM '88888P' dP dP 8888P' '88888P' dP dP '88888P' dP
MM'""""'YMM oo
M' .mmm. 'M
M MMMMMooM .d8888b. 88d888b. dP .dP .d8888b. 88d888b. .d8888b. dP .d8888b. 88d888b.
M MMMMMMMM 88' '88 88' '88 88 d8' 88ooood8 88' '88 Y8ooooo. 88 88' '88 88' '88
M. 'MMM' .M 88. .88 88 88 88 .88' 88. ... 88 88 88 88. .88 88 88
MM. .dM '88888P' dP dP 8888P' '88888P' dP '88888P' dP '88888P' dP dP
MMMMMMMMMMM
********************************************************************************************************************
Expand Down
12 changes: 6 additions & 6 deletions Src/converterWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ const path = require("path");
const converterWorker = async ({ inputFile, outputFile, outputFormat }) => {
// console.log("process.env.ComSpec ", process.env.ComSpec);
// console.log("DIRNAME worker", process.cwd(), __dirname, __filename);
// process.chdir(`C:\\snapshot\\Ez-Game-Audio-Conversion\\src`);
// console.log("inputFile", inputFile);
const ffmpegPath = path.join(process.cwd(), `/ffmpeg.exe`);
// console.log("path worker", ffmpegPath);
const ffmpegPath = path.join(process.cwd(), `\\ffmpeg.exe`);
//ffmpegPath = ffmpegPath.replace(/ /g, "\\ ");
console.log("path worker", ffmpegPath);
return new Promise((resolve, reject) => {
const formatConfig = {
//Despite what you read online these are the best codecs and work fine.
//-b:a = contant BR -q:a = variable.
ogg: { codec: "libopus", additionalOptions: ["-b:a", "192k"] }, //-b:a contant BR
//-b:a = constant BR -q:a = variable.
ogg: { codec: "libopus", additionalOptions: ["-b:a", "192k"] },
mp3: { codec: "libmp3lame", additionalOptions: ["-q:a", "3"] },
wav: { codec: "pcm_s16le" },
m4a: { codec: "aac ", additionalOptions: ["-q:a", "1.1"] },
Expand All @@ -22,7 +22,7 @@ const converterWorker = async ({ inputFile, outputFile, outputFormat }) => {

const { codec, additionalOptions = [] } = formatConfig[outputFormat];
const ffmpegCommand = spawn(
ffmpegPath,
`"${ffmpegPath}"`,
[
"-loglevel",
"error", // Sends all errors to stdeer
Expand Down

0 comments on commit 5f09ebb

Please sign in to comment.