node.js - ffmpeg x11grab 导出视频 16 :9 is distorded

标签 node.js ffmpeg fluent-ffmpeg

使用流利的 ffmepg 和 ffmpeg 版本 3.4.4。

使用带有该设置的 x11grab 捕获屏幕:

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')

除了视频图像失真外,它的效果很好,如下面的第二张图片所示。

1 - x11 正在显示的图像
enter image description here

2 - 结果视频中的图像
enter image description here

3- 导出视频的属性
enter image description here

尝试对 ffmpeg 使用 .keepDAR() 选项,但我得到了 4:3 的视频。

这是 ffmpeg 日志:我不知道 640*480 是从哪里来的

enter image description here

最佳答案

作为输入选项:即: '-s' , '768x432'

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

关于node.js - ffmpeg x11grab 导出视频 16 :9 is distorded,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54461875/

相关文章:

node.js - NodeJs - Fluent-FFMPEG 找不到用于 firebase 云功能的 FFMPEG

node.js - http-proxy 模块错误 : Must provide a proper URL as target

node.js - 在 Vagrant box 中安装 npm

ffmpeg使用amix和adelay在歌曲上播放广告

c - 如何使用 FFmpeg 将图像的某些部分合并为一个?

node.js - 流畅的 ffmpeg : Adding gif animation as overlay between x time to y time

javascript - JavaScript .on() 方法是如何定义的?

javascript - 如何像 Grunt 中那样在执行前实现属性预处理?

ffmpeg - "The encoder ' aac ' is experimental but experimental codecs are not enabled"

node.js - FFmpeg 淡出音频过滤器(淡出)没有被应用于迭代地剪辑的轨道