Opened 5 years ago

Closed 5 years ago

#715 closed enhancement (fixed)

gif encoder: support transparency

Reported by: ami_stuff Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: gif alpha
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

the output gif file from "ffmpeg -i 11.png -pix_fmt rgb24 11.gif" conversion is not transparent.

C:\>ffmpeg -i 11.png
ffmpeg version N-35295-gb55dd10, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov 30 2011 00:52:52 with gcc 4.6.2
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope
ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
  libavutil    51. 29. 1 / 51. 29. 1
  libavcodec   53. 39. 1 / 53. 39. 1
  libavformat  53. 22. 0 / 53. 22. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 50. 0 /  2. 50. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, image2, from '11.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, pal8, 275x84, 25 tbr, 25 tbn, 25 tbc
At least one output file must be specified

Attachments (1)

11.png (3.9 KB) - added by ami_stuff 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by ami_stuff

comment:1 Changed 5 years ago by cehoyos

  • Priority changed from normal to wish
  • Type changed from defect to enhancement
  • Version changed from unspecified to git-master

I sent a patch to ffmpeg-devel that allows to use
ffmpeg -i 11.png -vcodec gif -f image2 out.gif

rgb24 by definition does not support transparency.

comment:2 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords gif alpha added
  • Reproduced by developer set
  • Resolution set to fixed
  • Status changed from new to closed

This works now for ffmpeg -i 11.png -f image2 out.gif
There are two gif encoders, only one supports pal8 output, the other only supports RGB24 which by definition does not support transparency.

Note: See TracTickets for help on using tickets.