[FFmpeg-trac] #549(avfilter:new): Video filter overlay does not preserve alpha
FFmpeg
trac at avcodec.org
Thu Oct 13 10:07:12 CEST 2011
#549: Video filter overlay does not preserve alpha
-------------------------------------+-------------------------------------
Reporter: ehsmeng | Type: defect
Status: new | Priority: normal
Component: avfilter | Version: git-
Keywords: overlay | master
alpha png | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Hi,
I think there might be a bug in ffmpeg/video filter.
If I have a clip with alpha and apply a filter, the alpha goes away. It
used to be preserved until a couple of months ago.
Please find zip with test files attached:
mptpmbp:Desktop ehsmeng$ unzip -t bug.zip
Archive: bug.zip
testing: frameFromWm1.png OK
testing: frameNoWm1.png OK
testing: movie.mov OK
testing: watermark.png OK
testing: withWm.mov OK
testing: withoutWm.mov OK
No errors detected in compressed data of bug.zip.
Thanks,
Marcus
[root at domU-12-31-39-01-90-A1 a]# ffmpeg -i movie.mov -y -vf
'movie=watermark.png,scale=480:270 [wm];[in][wm] overlay=0:0:1 [out]'
-acodec copy -s 480x270 -vcodec png withWm.movffmpeg version git-Tue Oct
11 22:16:04 2011 +0200-be5ac96, Copyright (c) 2000-2011 the FFmpeg
developers
built on Oct 11 2011 17:25:39 with gcc 4.1.2 20070925 (Red Hat 4.1.2-33)
configuration: --enable-gpl --enable-libmp3lame --enable-shared
--enable-nonfree --enable-libx264 --enable-libfaac --disable-mmx --enable-
filter=movie --enable-libvpx --enable-pthreads
libavutil 51. 20. 1 / 51. 20. 1
libavcodec 53. 20. 1 / 53. 20. 1
libavformat 53. 15. 0 / 53. 15. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 6 / 2. 43. 6
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'movie.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.4.0
Duration: 00:00:00.20, start: 0.000000, bitrate: 2920 kb/s
Stream #0:0(eng): Video: png (png / 0x20676E70), bgra, 640x400, 2892
kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
[buffer @ 0x627a30] w:640 h:400 pixfmt:bgra tb:1/1000000 sar:0/1
sws_param:
[movie @ 0x63f030] seek_point:0 format_name:(null) file_name:watermark.png
stream_index:0
[buffersink @ 0x63e960] auto-inserting filter 'auto-inserted scale 0'
between the filter 'Parsed_overlay_2' and the filter 'out'
[scale @ 0x63ea80] w:640 h:400 fmt:bgra -> w:480 h:270 fmt:yuv420p
flags:0x4
[scale @ 0x6400a0] w:640 h:400 fmt:bgra -> w:480 h:270 fmt:yuva420p
flags:0x4
[overlay @ 0x6405d0] main w:480 h:270 fmt:yuv420p overlay x:0 y:0 w:480
h:270 fmt:yuva420p
[overlay @ 0x6405d0] main_tb:1/1000000 overlay_tb:1/25 -> tb:1/1000000
exact:1
[scale @ 0x6415e0] w:480 h:270 fmt:yuv420p -> w:480 h:270 fmt:bgra
flags:0x4
[swscaler @ 0x6beef0] No accelerated colorspace conversion found from
yuv420p to bgra.
Output #0, mov, to 'withWm.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.15.0
Stream #0:0(eng): Video: png (png / 0x20676E70), bgra, 480x270,
q=2-31, 200 kb/s, 25 tbn, 25 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
Stream mapping:
Stream #0.0 -> #0.0 (png -> png)
Press [q] to stop, [?] for help
frame= 5 fps= 0 q=0.0 Lsize= 147kB time=00:00:00.20
bitrate=6023.2kbits/s
video:146kB audio:0kB global headers:0kB muxing overhead 0.463022%
[root at domU-12-31-39-01-90-A1 a]# ffmpeg -i movie.mov -y -acodec copy -s
480x270 -vcodec png withoutWm.mov
ffmpeg version git-Tue Oct 11 22:16:04 2011 +0200-be5ac96, Copyright (c)
2000-2011 the FFmpeg developers
built on Oct 11 2011 17:25:39 with gcc 4.1.2 20070925 (Red Hat 4.1.2-33)
configuration: --enable-gpl --enable-libmp3lame --enable-shared
--enable-nonfree --enable-libx264 --enable-libfaac --disable-mmx --enable-
filter=movie --enable-libvpx --enable-pthreads
libavutil 51. 20. 1 / 51. 20. 1
libavcodec 53. 20. 1 / 53. 20. 1
libavformat 53. 15. 0 / 53. 15. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 6 / 2. 43. 6
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'movie.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.4.0
Duration: 00:00:00.20, start: 0.000000, bitrate: 2920 kb/s
Stream #0:0(eng): Video: png (png / 0x20676E70), bgra, 640x400, 2892
kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
[buffer @ 0x627a30] w:640 h:400 pixfmt:bgra tb:1/1000000 sar:0/1
sws_param:
[scale @ 0x63ea30] w:640 h:400 fmt:bgra -> w:480 h:270 fmt:bgra flags:0x4
Output #0, mov, to 'withoutWm.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.15.0
Stream #0:0(eng): Video: png (png / 0x20676E70), bgra, 480x270,
q=2-31, 200 kb/s, 25 tbn, 25 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
Stream mapping:
Stream #0.0 -> #0.0 (png -> png)
Press [q] to stop, [?] for help
frame= 5 fps= 0 q=0.0 Lsize= 80kB time=00:00:00.20
bitrate=3286.8kbits/s
video:80kB audio:0kB global headers:0kB muxing overhead 0.851795%
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/549>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list