-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample.ts
More file actions
46 lines (44 loc) · 1.35 KB
/
example.ts
File metadata and controls
46 lines (44 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import FFmpeg = require('./ffmpeg');
function main() {
// ffmpeg -y -i screen.vb8.webm -vf "setpts=80*PTS" output.webm
let ffmpeg = new FFmpeg.FFmpeg();
ffmpeg.addOptions([
"-y",
"-i", "screen.vb8.webm",
"-vf", "setpts=80*PTS",
// "output.webm"
]);
ffmpeg.setOutputFile("output.webm");
// ffmpeg.addOptions([
// "-y",
// "-r", "240",
// "-f", "x11grab",
// "-draw_mouse", "0",
// "-s", "1920x1080",
// "-i", ":99",
// "-c:v", "libvpx",
// "-b:v", "384k",
// "-qmin", "7",
// "-qmax", "25",
// "-maxrate", "384k",
// "-bufsize", "1000k",
// "-metadata", "title=Selenium Recording",
// "-metadata", "artist=Unaxiom Technologies",
// "-metadata", "album=Selenium Recordings",
// "-metadata", `year=${new Date().getFullYear().toString()}`,
// // "screen.vb8.webm"
// ]);
// ffmpeg.setOutputFile("screen.vb8.webm");
ffmpeg.run();
ffmpeg.setOnCloseCallback(function (code: number, signal: string) {
console.log("Process has been quit from setOnCloseCallback with code -> " + code + " and signal -> " + signal);
});
setTimeout(function () {
try {
ffmpeg.quit();
} catch (e) {
throw (e);
}
}, 5000);
}
main();