【问题标题】:Create animated gif from similar consecutive frames with ffmpeg使用 ffmpeg 从相似的连续帧创建动画 gif
【发布时间】:2021-11-13 16:53:47
【问题描述】:

当我想从照片集创建动画 gif 时,ffmpeg 将相似的连续帧合并为一帧。我怎样才能防止这种情况?我的ffmpeg命令如下:

ffmpeg -y -i frame_%03d.png -lavfi "palettegen" outputFilePath

ffmpeg -framerate 1 -y -f image2 -i frame_%03d.png -i paletteFilePath -lavfi "paletteuse" outputFilePath

请指导我。谢谢

【问题讨论】:

    标签: android ffmpeg


    【解决方案1】:

    这是创建动画 GIF 的一次性解决方案:

    ffmpeg -i "frame_%3d.png" -framerate 12 -filter_complex "fps=12,split=2[palette_in][gif];[palette_in]palettegen[palette_out];[gif]fifo[gif_fifo]; [gif_fifo][palette_out]paletteuse" -y output.gif
    

    这里的扩展解释: https://quinbenson.wordpress.com/2019/07/15/ffmpeg-png-to-animated-gif/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-03-19
      • 2016-10-18
      • 2014-03-02
      • 1970-01-01
      • 2012-06-25
      • 1970-01-01
      • 2016-03-17
      • 1970-01-01
      相关资源
      最近更新 更多