Skip to content

Commit

Permalink
another upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Starbuck7410 committed Mar 14, 2020
1 parent 8bde961 commit 5adfbd7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ for (let j = 0; j < folders.length; j++) {
}
for (let i = 0; i < files.length; i++) {
let input = "\"" + files[i] + "\"";
let output = "\"" + files[i].slice(0, directory.length) + " AAC" + files[i].slice(directory.length, -4) + "m4a" + "\"";
if (files[i].word.slice(-5) == ".flac") {
let output = "\"" + files[i].slice(0, directory.length) + " AAC" + files[i].slice(directory.length, -5) + ".m4a" + "\"";
} else {
let output = "\"" + files[i].slice(0, directory.length) + " AAC" + files[i].slice(directory.length, -4) + ".m4a" + "\"";
}
exec("ffmpeg -i " + input + " -map 0:0 -c:a aac -b:a 285k " + output);
console.log("FFM-Pegging file " + (i + 1) + " out of " + files.length);
console.log(((i / files.length) * 100) + "% complete.");
Expand Down

0 comments on commit 5adfbd7

Please sign in to comment.