Opened 7 years ago

Closed 7 years ago

Last modified 3 years ago

#6000 closed defect (duplicate)

Converting animated GIF to a format other that MP4 cuts some frames

Reported by: Ivan Pozdeev Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords: fps
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Converting animated GIF to a format other that MP4 cuts the last frame (at least).

The sample GIF has the last frame's duration of 10370ms, totaling ~0:25. The resulting video is ~0:15.
Reproduced for AVI and MKV; other formats probably affected, too.
Likely related to #4235.

How to reproduce:

% ffmpeg.exe -y -i sample.gif -c:v mpeg4 videoout.avi
ffmpeg version N-78758-g5156578
built with gcc 5.3.0 (GCC)

Also reproduced on ffmpeg version N-80901-gfebc862 built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3) (http://superuser.com/q/1153435/106224)

Attachments (3)

ffmpeg-20161206-214613-avi.log (36.4 KB ) - added by Ivan Pozdeev 7 years ago.
verbose log for avi
ffmpeg-20161206-214737-mp4.log (36.6 KB ) - added by Ivan Pozdeev 7 years ago.
verbose log for mp4
CADRE.gif (906.3 KB ) - added by Carl Eugen Hoyos 7 years ago.

Download all attachments as: .zip

Change History (6)

by Ivan Pozdeev, 7 years ago

verbose log for avi

by Ivan Pozdeev, 7 years ago

verbose log for mp4

by Carl Eugen Hoyos, 7 years ago

Attachment: CADRE.gif added

comment:1 by Carl Eugen Hoyos, 7 years ago

Component: undeterminedffmpeg
Keywords: fps added
Resolution: duplicate
Status: newclosed

Duplicate of ticket #3052.

comment:2 by Ivan Pozdeev, 7 years ago

This is currently resolved with a workaround, -vsync cfr. Is there some deep reason why it should stay so?

Looks like the GIF decoder should instead produce some "end of stream" marker with a timestamp at the end. Such a thing may be absent from the current object model but it's an intrinsic part of slide show formats by their nature.

(A fake frame at the end instead would also be a workaround 'cuz it would distort the real file structure just like the current workaround does.)

Note: See TracTickets for help on using tickets.