Ticket #1139 (closed defect: fixed)

Opened 14 months ago

Last modified 14 months ago

'fade' filter initial color is not black!

Reported by: ssp43 Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: fade regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Hi!

I've found following bug I think:
I try to create simple video file using a picture:

ffmpeg -loop 1 -f image2 -r 24000/1001 -i any_picture.png -r 24000/1001 -vframes 3168 -vf "fade=in:65:48,fade=out:3120:48" -f yuv4mpegpipe -pix_fmt yuv420p -an -sn -y any.file

And initial color is not black! It happens if I try to use 'fade in' and 'fade out' filters together with any output formats and any video codecs!
At the same time if I do:

ffmpeg -loop 1 -f image2 -r 24000/1001 -i any_picture.png -r 24000/1001 -vframes 3168 -vf "fade=in:65:48" -f yuv4mpegpipe -pix_fmt yuv420p -an -sn -y any.file

Initial color is black (without 'fade out')!

Attachments

any.log Download (2.3 KB) - added by ssp43 14 months ago.
log-file

Change History

Changed 14 months ago by ssp43

log-file

comment:1 Changed 14 months ago by cehoyos

  • Keywords video filter removed
  • Priority changed from important to normal
  • Component changed from FFmpeg to avfilter

Do you think this is a regression?

Is this reproducible with current git head?

comment:2 Changed 14 months ago by ssp43

Yes I do. I think this is a regression.
My ffmpeg version is 0.10 from Packman (for OpenSUSE 11.4). I updated it yesterday on March 27th 2012.

Last edited 14 months ago by ssp43 (previous) (diff)

comment:3 Changed 14 months ago by cehoyos

Please test current git head and please either find the revision introducing the problem or name a working revision.

comment:4 follow-up: ↓ 5 Changed 14 months ago by ssp43

I've just updated ffmpeg to version 0.10.2. The color is the same - dark gray!
ffmpeg version 0.10.2
built on Mar 27 2012 22:41:33 with gcc 4.5.1 20101208 [gcc-4_5-branch revision 167585]
configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libvpx --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libdirac --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100

I don't know a working revision. I've never had to face this problem.

comment:5 in reply to: ↑ 4 Changed 14 months ago by cehoyos

Replying to ssp43:

I've just updated ffmpeg to version 0.10.2. The color is the same - dark gray!

Please test current git head. All released versions have more bugs and less features than current git head, only use a release if you are not a user, but if you have to package FFmpeg for other people.

I don't know a working revision. I've never had to face this problem.

So you changed your mind, it is not a regression?

comment:6 Changed 14 months ago by ssp43

I said I think that this is a regression but I don't know exactly :).
But I know that it is a bug - the color must be black!
I'll try to compile current git head and let you know.
.....
I've downloaded, compiled and linked current git head of ffmpeg.

Last edited 14 months ago by ssp43 (previous) (diff)

comment:7 Changed 14 months ago by cehoyos

Please provide a minimal command line that allows to reproduce the issue together with complete, uncut console output for current git head.

Last edited 14 months ago by cehoyos (previous) (diff)

comment:8 Changed 14 months ago by ssp43

The color is the same - - dark gray!

user@tux:> ffmpeg -loop 1 -f image2 -r 24000/1001 -i any_picture.png -r 24000/1001 -vframes 3168 -vf "fade=in:65:48,fade=out:3120:48" -f yuv4mpegpipe -pix_fmt yuv420p -y any.file
ffmpeg version N-39360-g7a5e587 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 28 2012 15:45:52 with gcc 4.5.1 20101208 [gcc-4_5-branch revision 167585]
  configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libvpx --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libdirac --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype
  libavutil      51. 44.100 / 51. 44.100
  libavcodec     54. 12.100 / 54. 12.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 66.100 /  2. 66.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, image2, from 'any_picture.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgba, 236x1080, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
[buffer @ 0x631020] w:236 h:1080 pixfmt:rgba tb:1/1000000 sar:0/1 sws_param:
[fade @ 0x62bbe0] type:in start_frame:65 nb_frames:48 alpha:0
[fade @ 0x62c740] type:out start_frame:3120 nb_frames:48 alpha:0
[fade @ 0x62c740] auto-inserting filter 'auto-inserted scale 0' between the filter 'Parsed_fade_0' and the filter 'Parsed_fade_1'
[scale @ 0x62da40] w:236 h:1080 fmt:rgba sar:0/1 -> w:236 h:1080 fmt:yuv420p sar:0/1 flags:0x4
Output #0, yuv4mpegpipe, to 'any.file':
  Metadata:
    encoder         : Lavf54.3.100
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 236x1080, q=2-31, 200 kb/s, 90k tbn, 23.98 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> rawvideo)
Press [q] to stop, [?] for help
[yuv4mpegpipe @ 0x630860] Encoder did not produce proper pts, making some up.
frame= 3168 fps= 56 q=0.0 Lsize= 1182821kB time=00:02:12.13 bitrate=73333.3kbits/s dup=0 drop=1                                                      
video:0kB audio:0kB global headers:0kB muxing overhead inf%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

Version 0, edited 14 months ago by ssp43 (next)

comment:9 Changed 14 months ago by cehoyos

  • Keywords regression added
  • Status changed from new to open
  • Version changed from 0.10 to git-master

comment:10 Changed 14 months ago by ssp43

Yes! It works!
Thank you!

comment:11 Changed 14 months ago by saste

  • Analyzed by developer set
  • Status changed from open to closed
  • Resolution set to fixed
  • Reproduced by developer set

Should be fixed in:

commit 95ce0ddcfe99182365e0e57f5f41d7f1a01c57eb
Author: Stefano Sabatini <stefasab@gmail.com>
Date:   Thu Mar 29 00:17:23 2012 +0200

    lavfi/fade: fix black level for non studio-level pixel formats
    
    Fix trac ticket #1139, regression introduced in 8c1fb50d077d5f954.


Thanks for the report.

Note: See TracTickets for help on using tickets.