Android,使用ffmpeg将gif拆分为帧 [英] Android, split gif to frames with ffmpeg
本文介绍了Android,使用ffmpeg将gif拆分为帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将gif文件拆分为任何格式的帧(gif,png,无关紧要).
I need to split my gif file to separate frames of any format (gif, png, doesnt matter).
ffmpeg -i path/to/gif -c:v gif -f image2 path/to/output$03d.gif
此命令实际上将gif分割为多个帧,但是只有第一帧具有正常的质量.所有其他帧看起来像是一些损坏的图像
this command really splits gif to frames, but only first frame have a normal quality. All other frames looks like some damaged images
我使用的图书馆是com.writingminds:FFmpegAndroid:0.3.2
library I use is com.writingminds:FFmpegAndroid:0.3.2
我应该怎么做才能获得所有质量正常的帧
What should Ido to get all frames with normal quality
推荐答案
使用
ffmpeg -i path/to/gif -vsync 0 path/to/output$03d.png
这篇关于Android,使用ffmpeg将gif拆分为帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文