Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5016 closed defect (duplicate)

generating thumbs, repeating frames not working correctly for last frame

Reported by: Sebastian Annies 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 Sebastian Annies 8 years ago.
onefileperframe.log (13.5 KB ) - added by Sebastian Annies 8 years ago.
withtilefilter.log (9.0 KB ) - added by Sebastian Annies 8 years ago.

Download all attachments as: .zip

Change History (9)

by Sebastian Annies, 8 years ago

Attachment: 1to6.mp4 added

by Sebastian Annies, 8 years ago

Attachment: onefileperframe.log added

by Sebastian Annies, 8 years ago

Attachment: withtilefilter.log added

comment:1 by Carl Eugen Hoyos, 8 years ago

Component: ffmpegavfilter
Keywords: fps added

Use the option -r when increasing the framerate.

comment:2 by Carl Eugen Hoyos, 8 years ago

Resolution: duplicate
Status: newclosed

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

comment:3 by Sebastian Annies, 8 years ago

Resolution: duplicate
Status: closedreopened

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'

in reply to:  3 comment:4 by Carl Eugen Hoyos, 8 years ago

Resolution: duplicate
Status: reopenedclosed

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 by Sebastian Annies, 8 years ago

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?

in reply to:  5 comment:6 by Carl Eugen Hoyos, 8 years ago

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.