@xiping/node-utils 1.0.69 → 1.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -97,13 +97,14 @@ function buildTranscodeArgs(inputPath, outputPath, format, encoders, forceSoftwa
|
|
|
97
97
|
const isMacOS = os.platform() === "darwin";
|
|
98
98
|
if (!forceSoftware && isMacOS && encoders.hevcVideoToolbox) {
|
|
99
99
|
// macOS 上优先使用 VideoToolbox 硬件编码
|
|
100
|
-
|
|
100
|
+
// 使用固定质量参数,避免完全依赖默认码率/质量导致输出不可控
|
|
101
|
+
args.push("-c:v", "hevc_videotoolbox", "-q:v", "60");
|
|
101
102
|
}
|
|
102
103
|
else if (!forceSoftware && encoders.hevcNvenc) {
|
|
103
|
-
args.push("-c:v", "hevc_nvenc", "-preset", "slow", "-rc", "constqp", "-qp", "
|
|
104
|
+
args.push("-c:v", "hevc_nvenc", "-preset", "slow", "-rc", "constqp", "-qp", "22");
|
|
104
105
|
}
|
|
105
106
|
else if (encoders.libx265) {
|
|
106
|
-
args.push("-c:v", "libx265", "-crf", "
|
|
107
|
+
args.push("-c:v", "libx265", "-crf", "22");
|
|
107
108
|
}
|
|
108
109
|
else {
|
|
109
110
|
throw new Error("没有可用的 HEVC 编码器");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiping/node-utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.70",
|
|
4
4
|
"description": "node-utils",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "The-End-Hero <527409987@qq.com>",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"bugs": {
|
|
26
26
|
"url": "https://github.com/The-End-Hero/xiping/issues"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "61f56a865103626696a6b73c0527c2cb5fc859c1",
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public",
|
|
31
31
|
"registry": "https://registry.npmjs.org/"
|