What steps will reproduce the problem? 0. wget https://a.appsimg.com/upload/flow/2018/03/06/34/15202980891368.gif -O test.gif 1. gif2webp -q 75 -metadata none -mt -quiet -lossy test.gif -o test.webp 2. open test.gif test.webp with chrome browser then we can see the frame rate to show with huge difference
I think the frame rate should be same.
This occurs at libwebp-0.6.0 on CentOS 7.2 giflib under version 4.1.6-9
The gif file has frames with 0 delay which chrome will force to be 100ms [1]. gif2webp copies this and webp has been treated the same [2], but here we might be losing some of the empty filler frames. The source has 9 frames with resolution > 1x1; the other 25 are filler with 0 duration.
As a workaround webpmux could be used to set the duration for the remaining frames.
That's an option, though it locks us to some renderer implementations. This could also be special cased to prevent frame dropping while still retaining the original duration values.
pascal.m… via monorail
unread,
Mar 22, 2018, 3:24:44 AM3/22/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
So, if i understand the problem correctly, it's unfortunate that the encoded WebP file ends up with *all* frames having duration 0. This should be prevented.
As for matching the expected GIF behaviour, well it indeed tie us to Chrome / Firefox's behaviour if we make frames with duration <= 10ms be forced to 100ms. But a lot of ads and other GIFs out there actually rely on this behaviour. So, few options: * have a -gif-compat flag * or say that if more than 2 (or N) successive frames have a 0-duration, they are actually expected to be fillers and we force 100ms for each.
* ... any other option?
jz… via monorail
unread,
Mar 23, 2018, 1:43:43 AM3/23/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
> So, few options: > * have a -gif-compat flag > * or say that if more than 2 (or N) successive frames have a 0-duration, they are actually expected to be fillers and we force 100ms for each.
close to the 2nd, we could just faithfully reproduce the 0ms frames with a transparent 1x1 frame (34 bytes lossless) instead of dropping the frame.
jz… via monorail
unread,
Mar 24, 2018, 1:51:11 AM3/24/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Actually in looking at the behavior in various transcoding tools and the known behavior in web browsers the change mentioned in comment #4 makes sense.
pascal.m… via monorail
unread,
Mar 24, 2018, 3:04:59 AM3/24/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message