add debug log
This commit is contained in:
parent
12c3dee7ad
commit
9726f366f3
1 changed files with 6 additions and 1 deletions
|
@ -32,10 +32,15 @@ const getNewFilename = (ogFile: string, part: string) => {
|
||||||
/** Merge all audios track of a video into one */
|
/** Merge all audios track of a video into one */
|
||||||
const mergeAudio = (file: string) => {
|
const mergeAudio = (file: string) => {
|
||||||
const outFile = getNewFilename(file, "(merged audio) ");
|
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}"`
|
`${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;
|
return outFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue