Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#6000 closed defect (duplicate)

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

Reported by: native-api 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 native-api 2 years ago.
verbose log for avi
ffmpeg-20161206-214737-mp4.log (36.6 KB) - added by native-api 2 years ago.
verbose log for mp4
CADRE.gif (906.3 KB) - added by cehoyos 2 years ago.

Download all attachments as: .zip

Change History (5)

Changed 2 years ago by native-api

verbose log for avi

Changed 2 years ago by native-api

verbose log for mp4

Changed 2 years ago by cehoyos

comment:1 Changed 2 years ago by cehoyos

  • Component changed from undetermined to ffmpeg
  • Keywords fps added
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of ticket #3052.

comment:2 Changed 2 years ago by native-api

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.