pup-recorder 0.3.2 → 0.3.3
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.
- package/README.md +18 -8
- package/dist/_tsup-dts-rollup.d.ts +7 -10
- package/dist/app.cjs +13 -13
- package/dist/chunk-QZHVDBDU.js +2 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/dist/chunk-NKXGLDTD.js +0 -2
package/README.md
CHANGED
|
@@ -7,6 +7,8 @@ pup-recorder — record web pages as video
|
|
|
7
7
|
## SYNOPSIS
|
|
8
8
|
|
|
9
9
|
pup source [-W width] [-H height] [-f fps] [-t duration] [-o file] [-a] [-d]
|
|
10
|
+
[--disable-gpu] [--disable-hw-codec] [--window-tolerant]
|
|
11
|
+
[--use-inner-proxy]
|
|
10
12
|
|
|
11
13
|
## OPTIONS
|
|
12
14
|
|
|
@@ -14,19 +16,25 @@ pup-recorder — record web pages as video
|
|
|
14
16
|
-W, --width <number> default: 1920
|
|
15
17
|
-H, --height <number> default: 1080
|
|
16
18
|
-f, --fps <number> default: 30
|
|
17
|
-
-t, --duration <number> default: 5
|
|
19
|
+
-t, --duration <number> default: 5 (seconds)
|
|
18
20
|
-o, --out-file <path> default: output.mp4
|
|
19
21
|
-a, --with-audio
|
|
20
|
-
-d, --deterministic frame-by-frame
|
|
21
|
-
--use-inner-proxy
|
|
22
|
+
-d, --deterministic frame-by-frame via CDP virtual time
|
|
23
|
+
--use-inner-proxy Bilibili inner proxy
|
|
24
|
+
--disable-gpu force SwiftShader software rendering
|
|
25
|
+
--disable-hw-codec software x265 instead of NVENC/VideoToolbox
|
|
26
|
+
--window-tolerant accept dom-ready when did-stop-loading hangs
|
|
22
27
|
|
|
23
28
|
## ENVIRONMENT
|
|
24
29
|
|
|
25
|
-
PUP_LOG_LEVEL
|
|
26
|
-
PUP_USE_INNER_PROXY
|
|
27
|
-
PUP_DISABLE_GPU
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
PUP_LOG_LEVEL 0=error 1=warn 2=info 3=debug (default: 2)
|
|
31
|
+
PUP_USE_INNER_PROXY 1=on
|
|
32
|
+
PUP_DISABLE_GPU 1=on
|
|
33
|
+
PUP_DISABLE_HW_CODEC 1=on
|
|
34
|
+
PUP_DETERMINISTIC 1=on
|
|
35
|
+
PUP_WINDOW_TOLERANT 1=on
|
|
36
|
+
|
|
37
|
+
CLI flags override environment variables.
|
|
30
38
|
|
|
31
39
|
## API
|
|
32
40
|
|
|
@@ -36,8 +44,10 @@ import { pup } from "pup-recorder";
|
|
|
36
44
|
const result = await pup(source, {
|
|
37
45
|
width, height, fps, duration, outFile,
|
|
38
46
|
withAudio, deterministic, useInnerProxy,
|
|
47
|
+
disableGpu, disableHwCodec, windowTolerant,
|
|
39
48
|
signal, onProgress,
|
|
40
49
|
});
|
|
50
|
+
// => { written, jank, outFile, options }
|
|
41
51
|
```
|
|
42
52
|
|
|
43
53
|
## SEE ALSO
|
|
@@ -20,6 +20,7 @@ import { Socket } from 'net';
|
|
|
20
20
|
import { SoftwareScaleContext } from 'node-av';
|
|
21
21
|
import { SpawnOptions } from 'child_process';
|
|
22
22
|
import { Stream } from 'node-av';
|
|
23
|
+
import { WebFrameMain } from 'electron';
|
|
23
24
|
import z from 'zod';
|
|
24
25
|
|
|
25
26
|
/** Insert emulation prevention bytes (00 00 03) for Annex B compliance. */
|
|
@@ -103,8 +104,6 @@ export declare function buildRust(): Promise<void>;
|
|
|
103
104
|
|
|
104
105
|
export declare function buildStegoHTML(targetURL: string, size: Size): string;
|
|
105
106
|
|
|
106
|
-
export declare function buildTickInjector(): string;
|
|
107
|
-
|
|
108
107
|
export declare function buildUnifiedExtradata(opts: UnifiedExtradataOptions): Buffer;
|
|
109
108
|
|
|
110
109
|
export declare const canIUseGPU: Promise<boolean>;
|
|
@@ -193,10 +192,6 @@ declare const defaultRenderOptions: RenderOptions;
|
|
|
193
192
|
export { defaultRenderOptions }
|
|
194
193
|
export { defaultRenderOptions as defaultRenderOptions_alias_1 }
|
|
195
194
|
|
|
196
|
-
export declare function doEject(): string;
|
|
197
|
-
|
|
198
|
-
export declare function doProcess(timestampMs: number): string;
|
|
199
|
-
|
|
200
195
|
export declare function drainPackets(ctx: CodecContext, pkt: Packet, stream: Stream, muxer: FormatMuxer): Promise<void>;
|
|
201
196
|
|
|
202
197
|
export declare function electronOpts(disableGpu: boolean): Promise<string[]>;
|
|
@@ -597,15 +592,17 @@ export { sleep as sleep_alias_1 }
|
|
|
597
592
|
/** Split Annex B bitstream into NAL units. */
|
|
598
593
|
export declare function splitNalUnits(bitstream: Buffer): NalUnit[];
|
|
599
594
|
|
|
600
|
-
export declare function startStego(
|
|
595
|
+
export declare function startStego(frame: WebFrameMain): Promise<void>;
|
|
601
596
|
|
|
602
597
|
export declare const STEGO_TICK_CHANNEL = "stego-tick";
|
|
603
598
|
|
|
604
|
-
export declare function stopStego(
|
|
599
|
+
export declare function stopStego(frame: WebFrameMain): Promise<void>;
|
|
605
600
|
|
|
606
|
-
export declare
|
|
601
|
+
export declare function swapBuffer(frame: WebFrameMain, expected: number): Promise<void>;
|
|
602
|
+
|
|
603
|
+
export declare function tick(frame: WebFrameMain | undefined, timestampMs: number): Promise<void>;
|
|
607
604
|
|
|
608
|
-
export declare
|
|
605
|
+
export declare const TICK_SYMBOL = "__pup_tick__";
|
|
609
606
|
|
|
610
607
|
export declare interface UnifiedExtradataOptions {
|
|
611
608
|
baseExtradata: Buffer;
|