Skip to content

Commit ddcddef

Browse files
committed
fix optional import
1 parent a62761d commit ddcddef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1196,14 +1196,14 @@ export function buildIvfHeader(width = 1920, height = 1080, frameRate = 30, four
11961196
return buffer
11971197
}
11981198

1199-
import * as zmq from 'zeromq'
1200-
12011199
export async function ffmpeg(command = 'video', processFn: (_frame: Buffer) => void): Promise<void> {
12021200
const port = 10000 + Math.floor(Math.random() * 10000)
12031201
const cmd = `exec ffmpeg -hide_banner -loglevel warning ${command} zmq:tcp://127.0.0.1:${port}`
12041202
log.debug(`${cmd}`)
12051203
let stderr = ''
12061204

1205+
// eslint-disable-next-line @typescript-eslint/no-require-imports
1206+
const zmq = require('zeromq')
12071207
const sub = new zmq.Subscriber()
12081208
const p = spawn(cmd, {
12091209
shell: true,

0 commit comments

Comments
 (0)