-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ts
50 lines (44 loc) · 1.29 KB
/
test.ts
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
47
48
49
50
import { ffmpeg } from "./mod.ts"
// Create `test_output/`
// Create your own testing assets and change the input options
//Deno.test("Fast encoding test", async () => {
const process = ffmpeg()
.execPath("/usr/bin/ffmpeg")
.input("test_assets/big_buck_bunny.mp4")
.crf(30)
.audioBitrate("196k")
.videoBitrate("2048k")
.format("flv")
.bufsize("2M")
.maxRate("6M")
.copyAudio()
.errDetect("careful")
.threads(2)
.preset("veryfast")
.strict("very")
.rotate(1)
.metadata({ title: "Title", author: "John Doe" })
.overwrite()
.output("test_output/output.flv")
await process.run()
//})
//Deno.test("Encoding for streaming sites", async () => {
const process2 = ffmpeg()
.nativeSourceFrameRate()
.overwrite()
.input("test_assets/earth_zoom_in.mov")
.preset("veryfast")
.maxRate("3000k")
.bufsize("6000k")
.pixelFormat("yuv420p")
.gop(50)
.videoCodec("libx264")
.videoBitrate("3000k")
.audioCodec("aac")
.audioBitrate("160k")
.audioChannels(2)
.format("flv")
.output("test_output/output1.flv")
await process2.run()
console.log(Deno.resources())
//})