Opened 5 years ago

Closed 3 years ago

#7923 closed defect (fixed)

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

Reported by: gdh Owned by: Elon Musk
Priority: normal Component: avfilter
Version: git-master Keywords: paletteuse
Cc: onemda@gmail.com, michael@niedermayer.cc, gbp.gap@gmail.com 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 gdh 5 years ago.
input apng file
org_git.gif (78.7 KB ) - added by gdh 5 years ago.
output gif file
alpha.gif (78.7 KB ) - added by gdh 5 years ago.
output gif file
alpha.webp (41.6 KB ) - added by gdh 5 years ago.
input webp file
alpha_pale.gif (104.9 KB ) - added by gdh 5 years ago.
the output gif with paletteuse

Download all attachments as: .zip

Change History (16)

by gdh, 5 years ago

Attachment: alpha.apng added

input apng file

by gdh, 5 years ago

Attachment: org_git.gif added

output gif file

by gdh, 5 years ago

Attachment: alpha.gif added

output gif file

by gdh, 5 years ago

Attachment: alpha.webp added

input webp file

comment:1 by gdh, 5 years ago

the issue can be reproduced by the command below:

ffmpeg -i alpha.webp alpha.gif

comment:2 by Elon Musk, 5 years ago

Resolution: wontfix
Status: newclosed

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

comment:3 by gdh, 5 years ago

Resolution: wontfix
Status: closedreopened

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

by gdh, 5 years ago

Attachment: alpha_pale.gif added

the output gif with paletteuse

comment:4 by gdh, 5 years ago

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 by gdh, 5 years ago

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 by Elon Musk, 5 years ago

There is already another bug open for that.

comment:7 by gdh, 5 years ago

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 by gdh, 5 years ago

Owner: set to Elon Musk
Status: reopenedopen

comment:9 by Carl Eugen Hoyos, 5 years ago

Component: avcodecavfilter
Keywords: paletteuse added; apng gif alpha webp removed

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

Last edited 5 years ago by Carl Eugen Hoyos (previous) (diff)

comment:10 by gdh, 5 years ago

Cc: gbp.gap@gmail.com added

It seems to be the same issue with #7902.
https://trac.ffmpeg.org/ticket/7902

-Mike

comment:11 by Elon Musk, 3 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.