> The input gif has variable frame delays:
> Frame 1 - no delay
> Frame 2 - 1 sec
> Frame 3 - 2 sec
> Frame 4 - 4 sec
> The generated video file does not maintain these time delay
> between the frames.
It is impossible to show the first frame for "no" time, and this
has an effect on the following frames.
Only constant frame rate mp4 output files are supported by libavformat,
since you didn't provide an output frame rate, FFmpeg tries to
guess one which is not easy for a gif file: It guesses -r 1 because
this is the granularity of the given gif file. Choose a higher frame rate
like -r 10 or -r 25 to show the first frame for a shorter amount of time.
Output frame rates lower than -r 6 will trigger timestamp issues,
the fps filter avoids them but fails outputting the last frame.