#2158(avfilter:new): overlay filter does not work with pal8 transparency
#2158: overlay filter does not work with pal8 transparency -------------------------------------+------------------------------------- Reporter: cehoyos | Owner: Type: defect | Status: new Priority: normal | Component: avfilter Version: git- | Keywords: overlay master | alpha Blocked By: | Blocking: Reproduced by developer: 0 | Analyzed by developer: 0 -------------------------------------+------------------------------------- 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 }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2158> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2158: Transparency gets lost on conversion from pal8 to yuva* ------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: alpha | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+----------------------------------- Changes (by cehoyos): * keywords: overlay alpha => alpha * status: new => open * component: avfilter => swscale Comment: 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*. {{{ $ /ffmpeg -i pal8_alpha.png -pix_fmt yuva420p -vcodec ffv1 out.avi ffmpeg version N-49257-g77b740a Copyright (c) 2000-2013 the FFmpeg developers built on Jan 25 2013 02:57:07 with gcc 4.7 (SUSE Linux) configuration: --enable-gpl --disable-indev=jack libavutil 52. 15.103 / 52. 15.103 libavcodec 54. 90.100 / 54. 90.100 libavformat 54. 61.104 / 54. 61.104 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 33.100 / 3. 33.100 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 Input #0, image2, from 'pal8_alpha.png': Duration: 00:00:00.04, start: 0.000000, bitrate: N/A Stream #0:0: Video: png, pal8, 174x98, 25 tbr, 25 tbn, 25 tbc [ffv1 @ 0x2c23f40] Storing alpha plane, this will require a recent FFV1 decoder to playback! Output #0, avi, to 'out.avi': Metadata: ISFT : Lavf54.61.104 Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuva420p, 174x98, q=2-31, 200 kb/s, 25 tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (png -> ffv1) Press [q] to stop, [?] for help frame= 1 fps=0.0 q=0.0 Lsize= 11kB time=00:00:00.04 bitrate=2195.6kbits/s video:5kB audio:0kB subtitle:0 global headers:0kB muxing overhead 108.232170% }}} The output is opaque. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2158#comment:1> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#2158: Transparency gets lost on conversion from pal8 to yuva* ------------------------------------+----------------------------------- Reporter: cehoyos | Owner: Type: defect | Status: closed Priority: normal | Component: swscale Version: git-master | Resolution: fixed Keywords: alpha | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ------------------------------------+----------------------------------- Changes (by michael): * status: open => closed * resolution: => fixed * reproduced: 0 => 1 Comment: Fixed in 034b31df2cd05751f7242887192292777f779bbd -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2158#comment:2> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg