请问如何提升渲染速度,122秒的视频使用955秒渲染耗时
您好,向您请教一下 视频时长122秒,使用13个场景,场景中包含虚拟人、图表、背景音乐、文字,渲染耗时750秒; node和ffmpeg的cpu占用率很低,node普遍在40%以下、ffmpeg普遍在30%以下; 配置如下,请问如何降低视频渲染耗时?
环境 ubuntu 2核 2G 版本 ffmpeg v4.4-static、nodejs v16.13.1;
width: 1080,
height: 1920,
clarity: 'high',
fps: 24,
audioLoop: false,
highWaterMark: '20mb',
parallel: 8,
threads: 4
Oh why do you need so many transitions, can you upload the project
抱歉!项目比较重,不太方便拆分,视频渲染代码都是按照官方提供的方法进行使用的; 我可以提供渲染结果:video
Great video, lots of ways to speed things up. https://tnfe.github.io/FFCreator/#/guide/config
vb | 无 | string | ffmpeg vb
-- | -- | -- | --
crf | 无 | number (默认crf) | ffmpeg crf
preset | 无 | string | ffmpeg preset
You can also use animate animation without using too many transition animations
非常感谢您的建议! 我会依次尝试~
目前通过调整highWaterMark速度有了很大的提升;
现在对渲染耗时影响最大的还是 fillNewData (/lain/node_modules/ffcreator/lib/utils/stream.js:45:1)
cc @drawcall
Oh thanks for your analysis, see http://nodejs.cn/api/stream/buffering.html