pup-recorder 0.0.20 → 0.0.21
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 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# pup(1)
|
|
1
|
+
# pup-recorder(1)
|
|
2
2
|
|
|
3
3
|
## NAME
|
|
4
4
|
|
|
5
|
-
pup - record web pages as video
|
|
5
|
+
pup-recorder - record web pages as video
|
|
6
6
|
|
|
7
7
|
## SYNOPSIS
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ pup <source> [-w width] [-h height] [-f fps] [-t duration] [-o dir] [-a]
|
|
|
12
12
|
|
|
13
13
|
## DESCRIPTION
|
|
14
14
|
|
|
15
|
-
Captures web
|
|
15
|
+
Captures a web page as video via Electron offscreen rendering. Outputs MP4
|
|
16
16
|
by default; with `-a` outputs WebM (VP9) and MOV (HEVC alpha).
|
|
17
17
|
|
|
18
18
|
## OPTIONS
|
|
@@ -25,7 +25,7 @@ by default; with `-a` outputs WebM (VP9) and MOV (HEVC alpha).
|
|
|
25
25
|
-t, --duration <n> seconds, default 5
|
|
26
26
|
-o, --out-dir <path> default "out"
|
|
27
27
|
-a, --with-alpha-channel
|
|
28
|
-
--use-inner-proxy
|
|
28
|
+
--use-inner-proxy bilibili internal proxy
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## ENVIRONMENT
|
|
@@ -41,35 +41,32 @@ FFMPEG_BIN default "ffmpeg"
|
|
|
41
41
|
```typescript
|
|
42
42
|
import { pup } from "pup-recorder";
|
|
43
43
|
|
|
44
|
-
const { mp4, cover, width, height, fps, duration } =
|
|
45
|
-
"https://example.com",
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
withAlphaChannel: false,
|
|
52
|
-
},
|
|
53
|
-
);
|
|
44
|
+
const { mp4, webm, mov, cover, width, height, fps, duration } =
|
|
45
|
+
await pup("https://example.com", {
|
|
46
|
+
width: 1920, height: 1080, fps: 30, duration: 5,
|
|
47
|
+
withAlphaChannel: false, outDir: "out", useInnerProxy: false,
|
|
48
|
+
cancelQuery: () => boolean,
|
|
49
|
+
onProgress: (pct: number) => void,
|
|
50
|
+
});
|
|
54
51
|
```
|
|
55
52
|
|
|
56
|
-
|
|
53
|
+
`mp4` when `withAlphaChannel` is false; `webm`+`mov` when true.
|
|
57
54
|
|
|
58
55
|
## FILES
|
|
59
56
|
|
|
60
57
|
```
|
|
61
|
-
dist/cli.js
|
|
62
|
-
dist/index.js
|
|
63
|
-
rust/*.node
|
|
64
|
-
x265/*
|
|
58
|
+
dist/cli.js CLI
|
|
59
|
+
dist/index.js library
|
|
60
|
+
rust/*.node native module
|
|
61
|
+
x265/* x265 binaries
|
|
65
62
|
```
|
|
66
63
|
|
|
67
64
|
## EXAMPLES
|
|
68
65
|
|
|
69
|
-
```
|
|
66
|
+
```sh
|
|
70
67
|
pup https://example.com -t 5
|
|
71
68
|
pup file:///path/to/page.html -a
|
|
72
|
-
pup https://example.com -w 1280 -h 720 -f 60
|
|
69
|
+
pup https://example.com -w 1280 -h 720 -f 60 -t 10 -o /tmp/out
|
|
73
70
|
```
|
|
74
71
|
|
|
75
72
|
## SEE ALSO
|