Opened 12 years ago
Closed 11 years ago
#2158 closed defect (fixed)
Transparency gets lost on conversion from pal8 to yuva*
Reported by: | Carl Eugen Hoyos | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | swscale |
Version: | git-master | Keywords: | alpha |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
http://thread.gmane.org/gmane.comp.video.ffmpeg.user/43291
I will attach a pal8 png sample that contains transparency, the overlay filter assumes an opaque image.
$ ffmpeg -i tests/lena.pnm -i pal8_alpha.png -filter_complex overlay out.png ffmpeg version N-49026-g96d1b7f Copyright (c) 2000-2013 the FFmpeg developers built on Jan 19 2013 09:39:02 with gcc 4.7 (SUSE Linux) configuration: --enable-gpl --disable-indev=jack --enable-libx264 libavutil 52. 15.100 / 52. 15.100 libavcodec 54. 89.100 / 54. 89.100 libavformat 54. 61.101 / 54. 61.101 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 32.101 / 3. 32.101 libswscale 2. 1.103 / 2. 1.103 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 Input #0, image2, from 'tests/lena.pnm': Duration: 00:00:00.04, start: 0.000000, bitrate: N/A Stream #0:0: Video: ppm, rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc Input #1, image2, from 'pal8_alpha.png': Duration: 00:00:00.04, start: 0.000000, bitrate: N/A Stream #1:0: Video: png, pal8, 174x98, 25 tbr, 25 tbn, 25 tbc Output #0, image2, to 'out.png': Metadata: encoder : Lavf54.61.101 Stream #0:0: Video: png, rgba, 256x256, q=2-31, 200 kb/s, 90k tbn, 25 tbc Stream mapping: Stream #0:0 (ppm) -> overlay:main Stream #1:0 (png) -> overlay:overlay overlay -> Stream #0:0 (png) Press [q] to stop, [?] for help frame= 1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A video:134kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.016078%
The following works as expected:
$ ffmpeg -i pal8_alpha.png -pix_fmt rgba rgba_alpha.png $ ffmpeg -i tests/lena.pnm -i rgba_alpha.png -filter_complex overlay out.png
Attachments (1)
Change History (3)
by , 12 years ago
Attachment: | pal8_alpha.png added |
---|
comment:1 by , 12 years ago
Component: | avfilter → swscale |
---|---|
Keywords: | overlay removed |
Status: | new → open |
Summary: | overlay filter does not work with pal8 transparency → Transparency gets lost on conversion from pal8 to yuva* |
comment:2 by , 11 years ago
Reproduced by developer: | set |
---|---|
Resolution: | → fixed |
Status: | open → closed |
Note:
See TracTickets
for help on using tickets.
I incorrectly assumed the overlay filter would accept pal8 as input, the real problem is that the transparency gets lost on conversion from pal8 to yuva*.
The output is opaque.