Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#3052 closed defect (fixed)

ffmpeg losing GIF last frame delay during encoding

Reported by: hackPNZ Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: fps
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:

Converting GIF files into WebM video and getting the file without delay after the last frame.

How to reproduce:

ffmpeg -i deal.gif deal.webm
ffmpeg version N-57130-g1d4476d Copyright (c) 2000-2013 the FFmpeg developers
  built on Oct 16 2013 11:33:08 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-libvpx
  libavutil      52. 46.101 / 52. 46.101
  libavcodec     55. 35.100 / 55. 35.100
  libavformat    55. 19.102 / 55. 19.102
  libavdevice    55.  4.100 / 55.  4.100
  libavfilter     3. 88.101 /  3. 88.101
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.103 /  0. 17.103
Input #0, gif, from 'deal.gif':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: gif, bgra, 430x181, 2.63 fps, 100 tbr, 100 tbn, 100 tbc
[libvpx @ 0x210d560] v1.2.0
Output #0, webm, to 'deal.webm':
  Metadata:
    encoder         : Lavf55.19.102
    Stream #0:0: Video: vp8 (libvpx), yuva420p, 430x181, q=-1--1, 200 kb/s, 1k tbn, 100 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (gif -> libvpx)
Press [q] to stop, [?] for help
frame=    9 fps=0.0 q=0.0 Lsize=      36kB time=00:00:00.89 bitrate= 329.9kbits/s
video:35kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.805775%

Attachments (1)

deal.gif (243.6 KB) - added by hackPNZ 6 years ago.

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by hackPNZ

comment:1 follow-up: Changed 6 years ago by cehoyos

Is this only reproducible using an external library (libvpx) or also with one of FFmpeg's internal encoders?

comment:2 in reply to: ↑ 1 Changed 6 years ago by hackPNZ

Replying to cehoyos:

Is this only reproducible using an external library (libvpx) or also with one of FFmpeg's internal encoders?

Actually, I tried to convert GIF to avi and got the same result.

comment:3 Changed 5 years ago by cehoyos

  • Reproduced by developer set
  • Status changed from new to open
$ ffmpeg -i deal.gif out.avi
ffmpeg version N-60911-g2673357 Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 26 2014 01:13:47 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  1.103 /  4.  1.103
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, gif, from 'deal.gif':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: gif, bgra, 430x181, 2.63 fps, 100 tbr, 100 tbn, 100 tbc
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf55.33.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 430x181, q=2-31, 200 kb/s, 100 tbn, 100 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (gif -> mpeg4)
Press [q] to stop, [?] for help
frame=    9 fps=0.0 q=15.6 Lsize=      54kB time=00:00:00.89 bitrate= 495.2kbits/s
video:46kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead 16.554190%

comment:4 Changed 4 years ago by cehoyos

  • Keywords fps added

comment:5 Changed 4 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed

Fixed in c5092025901b37aa5de4f290afb61fc5377eb79d
note that in case of avi this currently needs -vsync cfr

Last edited 4 years ago by michael (previous) (diff)

comment:6 Changed 4 years ago by cehoyos

Needs -vsync cfr also for mkv / webm output.

Note: See TracTickets for help on using tickets.