Opened 7 months ago

Closed 7 months ago

#6252 closed defect (fixed)

Doesn't get apng duration correctly

Reported by: hxuanyu Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: apng
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I have an animated png file generated by APNG Assembler 2.91 which has 10 frames, each frame duration is 1/25 seconds, so total duration is 10/25 seconds.

But when using ffprobe to dump the video frame info
$ ffprobe.exe animatedfps25.png -show_frames -select_streams v>v
ffprobe version N-84014-g9e6b269 Copyright (c) 2007-2017 the FFmpeg developers

built with gcc 6.3.0 (GCC)

frame duration got is 0.06667 second and total duration is 0.6667 second.

Using ffprobe -loglevel debug we can see in the output

[apng @ 00000000024e2560] decode_fctl_chunk: sequence_number: 0, width: 768, height: 576, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0
[apng @ 00000000024e2560] decode_fctl_chunk: sequence_number: 1, width: 618, height: 293, x_offset: 77, y_offset: 141, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 1
[apng @ 00000000024e2560] decode_fctl_chunk: sequence_number: 3, width: 614, height: 285, x_offset: 77, y_offset: 141, delay_num: 1, delay_den: 15, dispose_op: 2, blend_op: 1
[apng @ 00000000024e2560] decode_fctl_chunk: sequence_number: 5, width: 624, height: 293, x_offset: 78, y_offset: 141, delay_num: 1, delay_den: 15, dispose_op: 2, blend_op: 1
[apng @ 00000000024e2560] decode_fctl_chunk: sequence_number: 7, width: 624, height: 285, x_offset: 78, y_offset: 141, delay_num: 1, delay_den: 15, dispose_op: 2, blend_op: 1
[apng @ 00000000024e2560] decode_fctl_chunk: sequence_number: 9, width: 627, height: 293, x_offset: 77, y_offset: 141, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 1
[apng @ 00000000024e2560] decode_fctl_chunk: sequence_number: 11, width: 627, height: 292, x_offset: 77, y_offset: 142, delay_num: 1, delay_den: 15, dispose_op: 2, blend_op: 1
[apng @ 00000000024e2560] decode_fctl_chunk: sequence_number: 13, width: 627, height: 292, x_offset: 77, y_offset: 142, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 1
[apng @ 00000000024e2560] decode_fctl_chunk: sequence_number: 15, width: 624, height: 291, x_offset: 78, y_offset: 143, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 1
[apng @ 00000000024e2560] decode_fctl_chunk: sequence_number: 17, width: 623, height: 290, x_offset: 79, y_offset: 144, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 1

But I'm quite sure in fcTL num = 1, den = 0x19.

I've attached the apng file for your reference.

Attachments (2)

Capture.PNG (13.2 KB) - added by hxuanyu 7 months ago.
animated25.png (139.2 KB) - added by hxuanyu 7 months ago.

Download all attachments as: .zip

Change History (5)

Changed 7 months ago by hxuanyu

Changed 7 months ago by hxuanyu

comment:1 Changed 7 months ago by hxuanyu

Hi, because of the size limit of upload file, I've made a smaller apng. The problem is same though.

Here's the output by ffprobe -loglevel debug

[apng @ 0000000000642560] decode_fctl_chunk: sequence_number: 0, width: 10, height: 10, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0
[apng @ 0000000000642560] decode_fctl_chunk: sequence_number: 1, width: 10, height: 10, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0
[apng @ 0000000000642560] decode_fctl_chunk: sequence_number: 3, width: 10, height: 10, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0
[apng @ 0000000000642560] decode_fctl_chunk: sequence_number: 5, width: 10, height: 10, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0
[apng @ 0000000000642560] decode_fctl_chunk: sequence_number: 7, width: 10, height: 10, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0
[apng @ 0000000000642560] decode_fctl_chunk: sequence_number: 9, width: 10, height: 10, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0
[apng @ 0000000000642560] decode_fctl_chunk: sequence_number: 11, width: 10, height: 10, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0
[apng @ 0000000000642560] decode_fctl_chunk: sequence_number: 13, width: 10, height: 10, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0
[apng @ 0000000000642560] decode_fctl_chunk: sequence_number: 15, width: 10, height: 10, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0
[apng @ 0000000000642560] decode_fctl_chunk: sequence_number: 17, width: 10, height: 10, x_offset: 0, y_offset: 0, delay_num: 1, delay_den: 15, dispose_op: 0, blend_op: 0

Here is the frame info dumped out

[FRAME]
media_type=video
stream_index=0
key_frame=1
pkt_pts=53336
pkt_pts_time=0.533360
pkt_dts=53336
pkt_dts_time=0.533360
best_effort_timestamp=53336
best_effort_timestamp_time=0.533360
pkt_duration=6667
pkt_duration_time=0.066670
pkt_pos=720
pkt_size=80
width=10
height=10
pix_fmt=pal8
sample_aspect_ratio=N/A
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=1
pkt_pts=60003
pkt_pts_time=0.600030
pkt_dts=60003
pkt_dts_time=0.600030
best_effort_timestamp=60003
best_effort_timestamp_time=0.600030
pkt_duration=6667
pkt_duration_time=0.066670
pkt_pos=800
pkt_size=119
width=10
height=10
pix_fmt=pal8
sample_aspect_ratio=N/A
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
TAG:Software=APNG Assembler 2.91
[/FRAME]

comment:2 Changed 7 months ago by jamrial

  • Component changed from undetermined to avformat
  • Keywords apng added
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:3 Changed 7 months ago by jamrial

  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.