[FFmpeg-user] fade filter crashes ffmpeg

Gyan ffmpeg at gyani.pro
Mon Jul 29 07:57:41 EEST 2019

On 28-07-2019 11:04 PM, Michael Koch wrote:
> Hi all,
> I just tried this command line and it crashes FFmpeg:
> ffmpeg -i meteor308.mp4 -vf fade=in:0:0.5 -q:v 1 -y 308.mp4
> I already know what's wrong. I thought the fade duration is expressed 
> in seconds. But (with this syntax) it must be expressed in frames and 
> must be an integer. It would be nice to get an error message instead 
> of a crash.

Even if an option expects an integer, the parser will accept a 
fractional number and cast it to an integer by truncating it. In this 
case, for nb_frames, 0.5 gets cast to 0, and the first step of filter 
initialization is division by nb_frames. Will add a check.


More information about the ffmpeg-user mailing list