Opened 4 months ago

Last modified 2 weeks ago

#7923 open defect

alpha info is lost during transcode to gif from apng or animated webp

Reported by: gbp.gap Owned by: richardpl
Priority: normal Component: avfilter
Version: git-master Keywords: paletteuse
Cc: onemda@gmail.com, michael@niedermayer.cc Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg -i alpha.apng alpha.gif
ffmpeg version N-93899-g1d74150
built on gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16)

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (5)

alpha.apng (232.4 KB) - added by gbp.gap 4 months ago.
input apng file
org_git.gif (78.7 KB) - added by gbp.gap 4 months ago.
output gif file
alpha.gif (78.7 KB) - added by gbp.gap 4 months ago.
output gif file
alpha.webp (41.6 KB) - added by gbp.gap 4 months ago.
input webp file
alpha_pale.gif (104.9 KB) - added by gbp.gap 4 months ago.
the output gif with paletteuse

Download all attachments as: .zip

Change History (14)

Changed 4 months ago by gbp.gap

input apng file

Changed 4 months ago by gbp.gap

output gif file

Changed 4 months ago by gbp.gap

output gif file

Changed 4 months ago by gbp.gap

input webp file

comment:1 Changed 4 months ago by gbp.gap

the issue can be reproduced by the command below:

ffmpeg -i alpha.webp alpha.gif

comment:2 Changed 4 months ago by richardpl

  • Resolution set to wontfix
  • Status changed from new to closed

You need to use filters(palettegen, paletteuse) to get it working.

comment:3 Changed 4 months ago by gbp.gap

  • Resolution wontfix deleted
  • Status changed from closed to reopened

With the command with palettegen,paletteuse as below, the unexpected red boundary lines are produced, which is different with the input apng file alpha.apng

./ffmpeg -i alpha.apng -filter_complex "[0]split[a][b];[a]palettegen[p];[b][p]paletteuse " alpha_pale.gif

Changed 4 months ago by gbp.gap

the output gif with paletteuse

comment:4 Changed 4 months ago by gbp.gap

BTW, please ignore the org_gif.gif which is the same file of alpha.gif. i don't know how to remove it. :(
-Mike

comment:5 Changed 4 months ago by gbp.gap

More comments:

Richard,

Thanks for your quick reply! your suggestion (palettegen, paletteuse) can remove the background and bring the alpha alive, but it causes some defects (red lines) as described above.

Any suggestion?

-Mike

comment:6 Changed 4 months ago by richardpl

There is already another bug open for that.

comment:7 Changed 4 months ago by gbp.gap

Richard,

Could you merge the bug into the ticket as you mentioned? or provide the link of the ticket you mentioned?

Thanks!

BTW, I tried to change the title of the ticket, but failed. If you need me to submit another for the bug, please let me know.

-Mike

comment:8 Changed 4 months ago by gbp.gap

  • Owner set to richardpl
  • Status changed from reopened to open

comment:9 Changed 2 weeks ago by cehoyos

  • Component changed from avcodec to avfilter
  • Keywords paletteuse added; apng gif alpha webp removed

The red boundaries look like an issue unrelated to gif and apng.

Last edited 2 weeks ago by cehoyos (previous) (diff)
Note: See TracTickets for help on using tickets.