feat:增加音频编码配置
This commit is contained in:
parent
5c5098284c
commit
d3b561ee3a
2
index.js
2
index.js
@ -65,7 +65,7 @@ async function deal (basePath, maxBitRate = 2500, changeName = false, hardType)
|
|||||||
newName = name.substr(0, index) + ".h265" + name.substr(index);
|
newName = name.substr(0, index) + ".h265" + name.substr(index);
|
||||||
}
|
}
|
||||||
let newFilePath = path.join(basePath, newName);
|
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);
|
console.log(cmdStr);
|
||||||
let changeRes = cmd.execSync(cmdStr, { encoding: 'utf-8' });
|
let changeRes = cmd.execSync(cmdStr, { encoding: 'utf-8' });
|
||||||
console.log(changeRes);
|
console.log(changeRes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user