Anton Sergeev
Anton Sergeev

Reputation: 128

ffmpeg GIF to WebM decoding issue

I'm trying to convert GIF files into WebM (ffmpeg, libvpx) and getting some strange ffmpeg behaviour.

ffmpeg is installed on my mac from MacPorts.

Converting with:

ffmpeg -i srcFilename.gif -b:v 600K -qmin 0 -qmax 50 -crf 5 destFilename.webm

if my GIF file has some frame(s) with 1-2s duration somewhere in the middle of animation like this, conversion result is fine - it's playing with the "pause" in the middle.

But if I have GIF like this with "pause" in the last frame, ffmpeg decodes it without a delay.

Have no idea why, spent some time reading ffmpeg manual, trying different conversion options with no success.

Any ideas? Thanks in advance!

Upvotes: 3

Views: 4461

Answers (1)

Anton Sergeev
Anton Sergeev

Reputation: 128

I wrote an email to GIF decoder author and he answered me that he knows about this issue. It's located somewhere deep inside of ffmpeg and he has no idea how to fix it right now.

So, I'm using "dirty hack" in my project - just adding copy of last frame with zero delay to GIF file before encoding.

Upvotes: 2

Related Questions