Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5016 closed defect (duplicate)

generating thumbs, repeating frames not working correctly for last frame

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

Description

Summary of the bug:
How to reproduce:
The input is a low framerate 6 frame video displaying 1,2,3,4,5,6 each for 600ms with 3.6s in total

ffmpeg -v 9 -loglevel 99 -y -i 1to6.mp4 -filter_complex fps=fps=50/3.6 out%d.jpg -report 

report is attached as 'onefileperframe.txt'
The output are 15 images with '1', 9 with '2', 8 with '3', 8 with '4', 9 with '5' and 1 with '6'.
I would have expected all frames repeated 8 to 9 times!

The behavior changes when using the tile filter:

ffmpeg -v 9 -loglevel 99 -y -i 1to6.mp4 -filter_complex fps=fps=50/3.6,tile=50x1 out%d.jpg -report 

report is attached as 'withtilefilter.log'
The single output jpg shows only 43 frames. 8 times '1', 9 times '2', 8 times '3', 8 times '4', 9 times '5', and 1 time '6'.

Both variants don't fully work for me here. The first one at least outputs 50 frames but overemphasizes the first frame. The second command doesn't repeat the last frame and doesn't output 50 frames.

Attachments (3)

1to6.mp4 (12.8 KB) - added by sannies 3 years ago.
onefileperframe.log (13.5 KB) - added by sannies 3 years ago.
withtilefilter.log (9.0 KB) - added by sannies 3 years ago.

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by sannies

Changed 3 years ago by sannies

Changed 3 years ago by sannies

comment:1 Changed 3 years ago by cehoyos

  • Component changed from ffmpeg to avfilter
  • Keywords fps added

Use the option -r when increasing the framerate.

comment:2 Changed 3 years ago by cehoyos

  • Resolution set to duplicate
  • Status changed from new to closed

I believe this is a duplicate of the first test case in ticket #2674.

comment:3 follow-up: Changed 3 years ago by sannies

  • Resolution duplicate deleted
  • Status changed from closed to reopened

1st of all: what I describe is perhaps not a single issue.

My first example is not a duplicate:
Using round=up,down,zero or whatever just changes the number of '1' frames from 15 to 16 (round=up), when round=zero only 49 from will be output with 15 times '1' and there will be only 1 frame '6'.

My second example might be something different:
when I use the tile filter different different frames are in the output.

without tile: 15x'1', 9x'2', 8x'3', 8x'4', 9x'5', 1x'6'
with tile: 8x'1', 9x'2', 8x'3', 8x'4', 9x'5', 1x'6'

comment:4 in reply to: ↑ 3 Changed 3 years ago by cehoyos

  • Resolution set to duplicate
  • Status changed from reopened to closed

Replying to sannies:

1st of all: what I describe is perhaps not a single issue.

You can get the behaviour of the command with tile if you use -vsync vfr

comment:5 follow-up: Changed 3 years ago by sannies

thanks, but with -vsync vfr we are exactly where we are with the 2nd command: A video of 3.6s generates only 42 frames/thumbs when they are generated with -vf vps=vps=50/3.6 even though it would make sense to generate 50 frames/thumbs. The last frame is not duplicated as it should?

comment:6 in reply to: ↑ 5 Changed 3 years ago by cehoyos

Replying to sannies:

The last frame is not duplicated as it should?

Yes, this issue is already described in (the first test case of) ticket #2674, see comment:1 for a workaround.

Note: See TracTickets for help on using tickets.