[FFmpeg-trac] #4443(undetermined:new): Transparency gets lost when using palettegen / paletteuse
FFmpeg
trac at avcodec.org
Tue Apr 7 16:58:47 CEST 2015
#4443: Transparency gets lost when using palettegen / paletteuse
-------------------------------------+-------------------------------------
Reporter: cehoyos | Owner:
Type: defect | Status: new
Priority: normal | Component:
Version: git- | undetermined
master | Keywords: alpha
Blocked By: | Blocking:
Reproduced by developer: 0 | Analyzed by developer: 0
-------------------------------------+-------------------------------------
When using palettegen / paletteuse to encode to pal8, transparency gets
lost.
{{{
$ ffmpeg -i alpha.png -vf palettegen pal.png
ffmpeg version N-71320-gc4b2017 Copyright (c) 2000-2015 the FFmpeg
developers
built with gcc 4.7 (SUSE Linux)
configuration: --enable-gpl
libavutil 54. 22.100 / 54. 22.100
libavcodec 56. 34.100 / 56. 34.100
libavformat 56. 29.100 / 56. 29.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 13.101 / 5. 13.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, png_pipe, from 'alpha.png':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, pal8, 21x21 [SAR 5:6 DAR 5:6], 25 tbr, 25
tbn, 25 tbc
Output #0, apng, to 'pal.png':
Metadata:
encoder : Lavf56.29.100
Stream #0:0: Video: apng, rgba, 16x16 [SAR 1:1 DAR 1:1], q=2-31, 200
kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc56.34.100 apng
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> apng (native))
Press [q] to stop, [?] for help
[Parsed_palettegen_0 @ 0x35ec900] 4(+1) colors generated out of 4 colors;
ratio=1.000000
[apng @ 0x35f9040] Only a single frame so saving as a normal PNG.
frame= 1 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.04 bitrate=
24.2kbits/s
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 30.107527%
}}}
{{{
$ ffmpeg -i alpha.png -i pal.png -lavfi paletteuse out.gif
ffmpeg version N-71320-gc4b2017 Copyright (c) 2000-2015 the FFmpeg
developers
built with gcc 4.7 (SUSE Linux)
configuration: --enable-gpl
libavutil 54. 22.100 / 54. 22.100
libavcodec 56. 34.100 / 56. 34.100
libavformat 56. 29.100 / 56. 29.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 13.101 / 5. 13.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, png_pipe, from 'alpha.png':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, pal8, 21x21 [SAR 5:6 DAR 5:6], 25 tbr, 25
tbn, 25 tbc
Input #1, png_pipe, from 'pal.png':
Duration: N/A, bitrate: N/A
Stream #1:0: Video: png, rgba, 16x16, 25 tbr, 25 tbn, 25 tbc
Output #0, gif, to 'out.gif':
Metadata:
encoder : Lavf56.29.100
Stream #0:0: Video: gif, pal8, 21x21 [SAR 5:6 DAR 5:6], q=2-31, 200
kb/s, 25 fps, 100 tbn, 25 tbc (default)
Metadata:
encoder : Lavc56.34.100 gif
Stream mapping:
Stream #0:0 (png) -> paletteuse:default
Stream #1:0 (png) -> paletteuse:palette
paletteuse -> Stream #0:0 (gif)
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=0.0 Lsize= 1kB time=00:00:00.04 bitrate=
185.0kbits/s
video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4443>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list