1

I have the following requirements for the thumbnails:

  1. scene change should be at least 6% different from the last select=gt(scene\,0.06)
  2. aspect ratio is retained at 1280px width scale='min(1280\, iw):-1'
  3. minimum of 1 second between each thumbnail -r 1
  4. filenames represent the time offset of the thumbnail -vsync 0 -frame_pts 1

This is currently fed into a command as below:

ffmpeg -copyts -i file.mp4 -vf "select=gt(scene\,0.06),scale='min(1280\, iw):-1'" -r 1 -vsync 0 -frame_pts 1 snapshot.1280.%04d.png -f null

However, I am getting errors in the output:

Using -vsync 0 and -r can produce invalid output files

[image2 @ 0x7f804500a000] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 463 >= 463

Should these be something to worry about in the command or should I ignore them?

1 Answer 1

2

If you need a minimum of 1 second between snaps, then you should modify the select expression for that. All the -r does in this command is affect the filename that gets formed due to frame_pts. (You can ignore the "invalid files" warning; meant for a different scenario).

ffmpeg -copyts -i file.mp4 -vf "select=eq(n\,0)+gt(scene\,0.06)*gte(t-prev_selected_t\,1),scale='min(1280\, iw):-1'" -r 1 -vsync 0 -frame_pts 1 snapshot.1280.%04d.png

2
  • Hey Gyan, I must take that back, I re-ran the command but this is giving no output "Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)"
    – jimig
    Commented Oct 18, 2019 at 12:13
  • Cmd edited.....
    – Gyan
    Commented Oct 18, 2019 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .