[FFmpeg-user] fade filter crashes ffmpeg

Michael Koch astroelectronic at t-online.de
Mon Jul 29 11:29:22 EEST 2019


Am 29.07.2019 um 06:57 schrieb Gyan:
>
>
> 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.

thank you!

By the way, is it possible to make a fade-out at the end of a video 
without knowing the video length?
I mean that the start time of the fade-out is automatically set to 
(video_length - fade_duration).

Michael


More information about the ffmpeg-user mailing list