Opened 5 years ago

Closed 5 years ago

#8584 closed defect (duplicate)

Wrong disposal on first frame of transparent gif

Reported by: RedError Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: gif
Cc: rederrorsuru@gmail.com Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
When creating a transparent gif with ffmpeg, the first frame has a wrong "Gif Disposal" value ("Do Not Dispose" instead of "Restore to Background") and thus is always overlayed on the second frame.

How to reproduce:

ffmpeg -i "slowsmoke.gif" -gifflags 0 -vf "[0:v] split [a][b]; [a] palettegen [p]; [b][p] paletteuse [r]" "slowsmoke ffmpeg.gif" -y

Input:
https://i.ibb.co/mzSx63y/slowsmoke.gif
Output:
https://i.imgur.com/cnd96Wq.gif
ffmpeg version git-2020-03-24-e5d25d1
Downloaded from https://ffmpeg.zeranoe.com/builds/

Transparent gif "slowsmoke.gif" provided in attachment, also available here: https://i.ibb.co/mzSx63y/slowsmoke.gif

Additional details:

  • Gimp shows the second frame as being "combine". Editing that information allows the gif to be fixed. This proves that it is indeed the frame disposal that is in cause.

https://i.imgur.com/GFD9AgG.png

  • -gifflags +offsetting leaves additional traces (by reducing the redraw area), so it's better disabled with -gifflags 0 like I did, but that doesn't actually fix the underlying first frame disposal issue.

https://i.imgur.com/MNtPeA1.gif

  • -gifflags -transdiff or +transdiff doesn't actually do anything for transparent gifs.

Attached:
Report file from ffmpeg
Input image (transparent gif with movement between the first two frames)

Attachments (2)

slowsmoke.gif (752 bytes ) - added by RedError 5 years ago.
Input file (transparent gif with movement between the first two frames)
ffmpeg-20200326-222807.log (17.2 KB ) - added by RedError 5 years ago.
ffmpeg report file (-v 9 -loglevel 99 -report)

Download all attachments as: .zip

Change History (6)

by RedError, 5 years ago

Attachment: slowsmoke.gif added

Input file (transparent gif with movement between the first two frames)

by RedError, 5 years ago

Attachment: ffmpeg-20200326-222807.log added

ffmpeg report file (-v 9 -loglevel 99 -report)

comment:1 by RedError, 5 years ago

Cc: rederrorsuru@gmail.com added

comment:2 by Carl Eugen Hoyos, 5 years ago

Component: ffmpegundetermined
Keywords: disposal tranparency generated GIF files removed

Is this really different from ticket #7902?

in reply to:  2 comment:3 by RedError, 5 years ago

Keywords: disposal tranparency added

Replying to cehoyos:

Is this really different from ticket #7902?

No, you are right.
I had searched for gif disposal because that was the actual problem but it is about the same issue, just explained with less precise terms in #7902.
Should this one just be closed as duplicate, and more infos added under the original ticket? (I don't see a merge option.)

Last edited 5 years ago by RedError (previous) (diff)

comment:4 by Carl Eugen Hoyos, 5 years ago

Keywords: disposal tranparency removed
Resolution: duplicate
Status: newclosed

Please feel free to add any missing information to ticket #7902.

Note: See TracTickets for help on using tickets.