amiezhang

用brew安装ffmpeg

brew install ffmpeg

然后用npm的包node-ffmpeg: https://www.npmjs.com/package/ffmpeg

用node控制ffmpeg

const ffmpeg = require(\'ffmpeg\');

console.log(\'begin\');

const precess = new ffmpeg(\'./test.mp4\')

precess.then(video => {
    video.setVideoSize(\'750x1334\', false, false, \'#ffffff\').save(\'./your_movie.mp4\', function (error, file) {
        console.log(file)
        console.log(\'saved\')
        if (error) console.log(error);
    });
})

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-09-21
  • 2021-04-14
  • 2021-12-09
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-04-21
猜你喜欢
  • 2021-06-17
  • 2021-12-12
  • 2021-12-06
  • 2021-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-06-30
相关资源
相似解决方案