add debug log

This commit is contained in:
Mylloon 2023-07-30 02:03:40 +02:00
parent 12c3dee7ad
commit 9726f366f3
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -32,10 +32,15 @@ const getNewFilename = (ogFile: string, part: string) => {
/** Merge all audios track of a video into one */
const mergeAudio = (file: string) => {
const outFile = getNewFilename(file, "(merged audio) ");
child_process.exec(
const child = child_process.exec(
`${ffmpegPath} -i "${file}" -filter_complex "[0:a]amerge=inputs=2[a]" -ac 1 -map 0:v -map "[a]" -c:v copy "${outFile}"`
);
/* debug */
child.stderr.on("data", (err) => {
console.log("stderr", err.toString());
});
return outFile;
};