I am trying to use ffmpeg to extract every 30th frame from a video stream. For this, I have consulted all of https://superuser.com/questions/573747/drop-every-even-or-odd-frames-using-ffmpeg How to extract every 10th frame from a video? https://superuser.com/questions/1274661/selecting-one-every-n-frames-from-a-video-using-ffmpeg but neither option works.
The one that comes closest in my case is
$ ffmpeg -i DSCF0001.AVI -vf "select='not(mod(n-1,30))',setpts=N/(30*TB)" output.mkv
This creates a video that, in the beginning, does exactly what I want but then simply freezes at some point and does not continue. On the command line I get, during encoding, this message:
[matroska @ 0x559dfb975d40] Starting new cluster due to timestampte= 356.7kbits/s speed=8.09x
Last message repeated 3 times
[matroska @ 0x559dfb975d40] Starting new cluster due to timestampte= 358.5kbits/s speed=8.09x
Last message repeated 3 times
[matroska @ 0x559dfb975d40] Starting new cluster due to timestampte= 354.1kbits/s speed=8.09x
Last message repeated 3 times
Which may or may not be related to the issue.
What is the correct command line to achieve my goal?