cursedbelt-server 4.64.0 โ 4.64.1
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.
|
@@ -40,6 +40,10 @@ export declare const faststartArgs: (inPath: string, outPath: string, opts: {
|
|
|
40
40
|
/**
|
|
41
41
|
* Parse one ffmpeg `-progress pipe:1` line into elapsed microseconds, or null if the line
|
|
42
42
|
* carries no out_time. `runFfmpegProgress` turns a stream of these into a 0..99 percent.
|
|
43
|
+
*
|
|
44
|
+
* ๐ด `out_time_ms` is MICROSECONDS too โ ffmpeg's misnomer, printed with the same number as the
|
|
45
|
+
* `out_time_us` line before it. Reading it as milliseconds (ร1000) put every encode at 99% within
|
|
46
|
+
* its first two seconds (forge task 4591).
|
|
43
47
|
*/
|
|
44
48
|
export declare const parseProgressMicros: (line: string) => number | null;
|
|
45
49
|
/** Drop unknown/too-tall rungs (never upscale); always keep at least the source-or-720 rung. */
|
|
@@ -92,12 +92,14 @@ export const faststartArgs = (inPath, outPath, opts) => {
|
|
|
92
92
|
/**
|
|
93
93
|
* Parse one ffmpeg `-progress pipe:1` line into elapsed microseconds, or null if the line
|
|
94
94
|
* carries no out_time. `runFfmpegProgress` turns a stream of these into a 0..99 percent.
|
|
95
|
+
*
|
|
96
|
+
* ๐ด `out_time_ms` is MICROSECONDS too โ ffmpeg's misnomer, printed with the same number as the
|
|
97
|
+
* `out_time_us` line before it. Reading it as milliseconds (ร1000) put every encode at 99% within
|
|
98
|
+
* its first two seconds (forge task 4591).
|
|
95
99
|
*/
|
|
96
100
|
export const parseProgressMicros = (line) => {
|
|
97
|
-
const m = /^
|
|
98
|
-
|
|
99
|
-
return null;
|
|
100
|
-
return line.startsWith('out_time_ms') ? Number(m[1]) * 1000 : Number(m[1]);
|
|
101
|
+
const m = /^out_time_(?:us|ms)=(\d+)/.exec(line);
|
|
102
|
+
return m ? Number(m[1]) : null;
|
|
101
103
|
};
|
|
102
104
|
// โโ HLS adaptive-bitrate ladder โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
103
105
|
// Per-rung video bitrate cap + buffer + audio rate. One source of truth for rung tuning.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cursedbelt-server",
|
|
3
|
-
"version": "4.64.
|
|
3
|
+
"version": "4.64.1",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The app-facing Bun/Hono server tier of the cursedbelt split โ storage, sharing, activity, guard, sync. React-free; cursedbelt-core below it.",
|
|
@@ -77,9 +77,11 @@ describe('faststartArgs', () => {
|
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
describe('parseProgressMicros', () => {
|
|
80
|
-
test('reads out_time_us and out_time_ms
|
|
80
|
+
test('๐ด reads out_time_us and out_time_ms alike โ ffmpeg prints both in ยตs, the same number', () => {
|
|
81
|
+
// ffmpeg 8.1, five seconds in: `out_time_us=5000000` then `out_time_ms=5000000`.
|
|
81
82
|
expect(parseProgressMicros('out_time_us=5000000')).toBe(5_000_000);
|
|
82
|
-
expect(parseProgressMicros('out_time_ms=
|
|
83
|
+
expect(parseProgressMicros('out_time_ms=5000000')).toBe(5_000_000);
|
|
84
|
+
expect(parseProgressMicros('out_time_us=N/A')).toBeNull();
|
|
83
85
|
expect(parseProgressMicros('frame=12')).toBeNull();
|
|
84
86
|
});
|
|
85
87
|
});
|
|
@@ -127,11 +127,14 @@ export const faststartArgs = (
|
|
|
127
127
|
/**
|
|
128
128
|
* Parse one ffmpeg `-progress pipe:1` line into elapsed microseconds, or null if the line
|
|
129
129
|
* carries no out_time. `runFfmpegProgress` turns a stream of these into a 0..99 percent.
|
|
130
|
+
*
|
|
131
|
+
* ๐ด `out_time_ms` is MICROSECONDS too โ ffmpeg's misnomer, printed with the same number as the
|
|
132
|
+
* `out_time_us` line before it. Reading it as milliseconds (ร1000) put every encode at 99% within
|
|
133
|
+
* its first two seconds (forge task 4591).
|
|
130
134
|
*/
|
|
131
135
|
export const parseProgressMicros = (line: string): number | null => {
|
|
132
|
-
const m = /^
|
|
133
|
-
|
|
134
|
-
return line.startsWith('out_time_ms') ? Number(m[1]) * 1000 : Number(m[1]);
|
|
136
|
+
const m = /^out_time_(?:us|ms)=(\d+)/.exec(line);
|
|
137
|
+
return m ? Number(m[1]) : null;
|
|
135
138
|
};
|
|
136
139
|
|
|
137
140
|
// โโ HLS adaptive-bitrate ladder โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|