From d3b561ee3a58fef2d23235d8937cb283ff92a99a Mon Sep 17 00:00:00 2001 From: fanxb Date: Mon, 7 Nov 2022 21:31:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E9=9F=B3=E9=A2=91?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 59a30b9..84b5a4e 100644 --- a/index.js +++ b/index.js @@ -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);