Opened 12 years ago

Closed 12 years ago

#1139 closed defect (fixed)

'fade' filter initial color is not black!

Reported by: Stanislav 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 (1)

any.log (2.3 KB ) - added by Stanislav 12 years ago.
log-file

Download all attachments as: .zip

Change History (12)

by Stanislav, 12 years ago

Attachment: any.log added

log-file

comment:1 by Carl Eugen Hoyos, 12 years ago

Component: FFmpegavfilter
Keywords: video filter removed
Priority: importantnormal

Do you think this is a regression?

Is this reproducible with current git head?

comment:2 by Stanislav, 12 years ago

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 12 years ago by Stanislav (previous) (diff)

comment:3 by Carl Eugen Hoyos, 12 years ago

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

comment:4 by Stanislav, 12 years ago

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.

in reply to:  4 comment:5 by Carl Eugen Hoyos, 12 years ago

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 by Stanislav, 12 years ago

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 12 years ago by Stanislav (previous) (diff)

comment:7 by Carl Eugen Hoyos, 12 years ago

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

Last edited 12 years ago by Carl Eugen Hoyos (previous) (diff)

comment:8 by Stanislav, 12 years ago

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)

Last edited 12 years ago by Stanislav (previous) (diff)

comment:9 by Carl Eugen Hoyos, 12 years ago

Keywords: regression added
Status: newopen
Version: 0.10git-master

comment:10 by Stanislav, 12 years ago

Yes! It works!
Thank you!

comment:11 by Stefano Sabatini, 12 years ago

Analyzed by developer: set
Reproduced by developer: set
Resolution: fixed
Status: openclosed

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.