Search code examples
node.jsffmpegfluent-ffmpeg

Ffmpeg x11grab exported video 16:9 is distorded


using fluent ffmepg with ffmpeg version 3.4.4.

Capturing screen using x11grab with that setup :

videoCommand
.addInput(display)
.addInputOptions('-y', '-f' , 'x11grab' , '-draw_mouse', '0')
.aspect('16:9')
.withSize('768x432')
.withFpsInput(60)
.withFpsOutput(60)
.output(base_path+'/'+process.argv[3]+'.mp4')

It works great except that video image is distorded, like in the second picture below.

1 - image that x11 is displaying enter image description here

2 - image in the resulting video enter image description here

3- Properties of the exported video enter image description here

Tried to use .keepDAR() option for ffmpeg but i got a 4:3 video.

This is ffmpeg log : i don't know from where that 640*480 is coming

enter image description here


Solution

  • as an input option : ie : '-s' , '768x432'

    .addInputOptions('-y', '-f' , 'x11grab' , '-draw_mouse', '0' , '-s' , '768x432')