feat:增加音频编码配置

This commit is contained in:
fanxb 2022-11-07 21:31:18 +08:00
parent 5c5098284c
commit d3b561ee3a

View File

@ -65,7 +65,7 @@ async function deal (basePath, maxBitRate = 2500, changeName = false, hardType)
newName = name.substr(0, index) + ".h265" + name.substr(index);
}
let newFilePath = path.join(basePath, newName);
let cmdStr = `ffmpeg.exe ${hwType} ${decodeType} -i "${filePath}" ${encodeType} -maxrate ${bitRate}K -c:a copy "${newFilePath}"`;
let cmdStr = `ffmpeg.exe ${hwType} ${decodeType} -i "${filePath}" ${encodeType} -maxrate ${bitRate}K -acodec aac -strict -2 -ab 256K "${newFilePath}"`;
console.log(cmdStr);
let changeRes = cmd.execSync(cmdStr, { encoding: 'utf-8' });
console.log(changeRes);