Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#6813 closed defect (fixed)

Transparency broken when encoding animated gif

Reported by: Carl Eugen Hoyos Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: gif alpha webp animated
Cc: nirel.didi@gmail.com Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

$ ffmpeg -i transparency.apng out.gif
ffmpeg version N-88605-g991eca0 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl --cc=/usr/local/gcc-6.3.0/bin/gcc
  libavutil      56.  0.100 / 56.  0.100
  libavcodec     58.  1.100 / 58.  1.100
  libavformat    58.  2.100 / 58.  2.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  0.101 /  7.  0.101
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Input #0, apng, from 'transparency.apng':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: apng, pal8(pc), 300x180, 4 fps, 4 tbr, 100k tbn, 100k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (apng (native) -> gif (native))
Press [q] to stop, [?] for help
Output #0, gif, to 'out.gif':
  Metadata:
    encoder         : Lavf58.2.100
    Stream #0:0: Video: gif, pal8, 300x180, q=2-31, 200 kb/s, 4 fps, 100 tbn, 4 tbc
    Metadata:
      encoder         : Lavc58.1.100 gif
frame=   93 fps=0.0 q=-0.0 Lsize=    1190kB time=00:00:23.01 bitrate= 423.5kbits/s speed= 473x
video:1188kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.126995%

Output file is broken.

Attachments (1)

transparency.apng (1.1 MB ) - added by Carl Eugen Hoyos 6 years ago.

Download all attachments as: .zip

Change History (10)

by Carl Eugen Hoyos, 6 years ago

Attachment: transparency.apng added

comment:1 by fractalawareness, 6 years ago

Is there any workaround for this issue?

comment:2 by Stanislav Slesarev, 6 years ago

this fix could make life of a whole team easier, please help us!

comment:3 by Carl Eugen Hoyos, 6 years ago

I believe this patch allows encoding animated gifs with transparency:
https://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/220518.html

in reply to:  3 comment:4 by fractalawareness, 6 years ago

Replying to cehoyos:

I believe this patch allows encoding animated gifs with transparency:
https://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/220518.html

I'm using the latest nightly static build ffmpeg version N-91330-ga990184007 available from https://www.ffmpeg.org/download.html and still getting no transparency in gifs from apng or mov with alpha channel.

comment:6 by Elon Musk, 5 years ago

Resolution: fixed
Status: newclosed

comment:7 by Nirel d, 5 years ago

Cc: nirel.didi@gmail.com added
Keywords: webp animated added
Priority: normalimportant
Resolution: fixed
Status: closedreopened

Hey,
It's still doesn't work for animated webp :/

ffmpeg -i test.gif animation.webp

For example, I want to convert this gif - https://imgur.com/tCSn2No to webP,

The output for now is - https://media.giphy.com/media/UqevOuKr66xO04zRBa/giphy.gif

how can I achieve that using ffmpeg?

comment:8 by Elon Musk, 5 years ago

Resolution: invalid
Status: reopenedclosed

comment:9 by Elon Musk, 5 years ago

Resolution: invalidfixed

Please do not reopen this ticket with unrelated bug.

Note: See TracTickets for help on using tickets.