Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js fluent ffmpeg如何将X11显示设置为输入_Node.js_Ffmpeg_X11_Xvfb_Fluent Ffmpeg - Fatal编程技术网

Node.js fluent ffmpeg如何将X11显示设置为输入

Node.js fluent ffmpeg如何将X11显示设置为输入,node.js,ffmpeg,x11,xvfb,fluent-ffmpeg,Node.js,Ffmpeg,X11,Xvfb,Fluent Ffmpeg,使用命令行,我可以轻松捕获Xserver显示,并尝试使用fluent ffmpeg for node重现该显示 videoCommand.addInput(':99.0+0,150') .withSize('720x480') .withFpsInput(60) .withFpsOutput(60) .addInputOption('-y', '-f x11grab') .outputOptions(['-c:v libx264', '-crf 18' , '-preset veryfast'

使用命令行,我可以轻松捕获Xserver显示,并尝试使用fluent ffmpeg for node重现该显示

videoCommand.addInput(':99.0+0,150')
.withSize('720x480')
.withFpsInput(60)
.withFpsOutput(60)
.addInputOption('-y', '-f x11grab')
.outputOptions(['-c:v libx264', '-crf 18' , '-preset veryfast' , '-t 
 00:00:05'])
.output(base_path+'/video.mp4')
.run();
我明白了

我关心的是将输入设置为DISPLAY:99.0的语法或方式 还要告诉ffmpeg我想要x11grab

那些必须设置在哪里

---编辑---

已更改为.addInputOptions('-y','-f x11grab')) 带“s”

同样的错误是这样的:

videoCommand.addInput(':99.0+0,150')
.withSize('720x480')
.withFpsInput(60)
.withFpsOutput(60)
.addInputOptions('-y', '-f' , 'x11grab')
.outputOptions(['-c:v libx264', '-crf 18' , '-preset veryfast' , '-t 
00:00:05'])
.output(base_path+'/video.mp4')
.run();
诀窍就在这里:

.addInputOptions('-y', '-f' , 'x11grab')
选项需要分开

.addInputOptions('-y', '-f' , 'x11grab')