Tag: 副标题

用fluent-ffmpeg添加字幕

我试图把字幕烧成一个video。 这个命令完全可以从命令行运行: ffmpeg -i in.mp4 -vf subtitles=sub.srt:force_style='Fontsize=20' out.mp4 我在服务器端的代码似乎没有太多(虽然创buildtest.mp4) ffmpeg('temp/subtitleVideos/qTWVbM5pkKms_pJbE8OAvH3N.mp4') .outputOptions( '-vf subtitles=temp/subtitleVideos/qTWVbM5pkKms_pJbE8OAvH3N.srt' ) .on('error', function(err) { console.log('Error: ' + err.message); }) .save(path + 'test.mp4'); 我得到以下错误: Error: ffmpeg exited with code 1: Error opening filters!