With command line i can easily capture an Xserver display, trying to reproduce this with 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();
I get
Unrecognized option 'f x11grab'.
I am concerned about the syntax or way to set the input as DISPLAY :99.0 and also to tell ffmpeg that i want x11grab.
Where those has to be set ?
--- EDIT ---
changed to .addInputOptions('-y', '-f x11grab') with 's'
same error
Worked like this :
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();
trick was here :
.addInputOptions('-y', '-f' , 'x11grab')
options needs to be separated