How to increase video speed and frame rate without duplicating frames
I have a long video with a frame rate of 30 FPS that I want to convert into a 200x time-lapse with a frame rate of 60 FPS. My only problem is that avconv is unnecessarily duplicating every other frame in the output, making the 60 FPS output effectively 30 FPS. I want every frame to be unique. At a 200x speed increase and 2x frame rate increase, there is no reason to duplicate frames.
For example, the problem is that the output is using source frames like 1,1,21,21,41,41,... when I want it to use frames 1,11,21,31,41,51,...
Here's the command I'm using:
avconv -i input_30fps.avi -vcodec h264 -an -r 60 -vf "setpts=(1/200)*PTS" output_200x_60fps.avi
As happens regularly to me, after spending hours trying to figure it out before asking for help, I find the solution myself just minutes after asking.
It turns out avconv isn't the better replacement to ffmpeg that I thought it was when Linux Mint, IIRC, removed ffmpeg from the official repository in favor of avconv. Anyway, ffmpeg is back and I installed it and found the equivalent command that doesn't duplicate frames:
ffmpeg -i input_30fps.avi -vcodec h264 -an -vf "fps=60, setpts=(1/200)*PTS" output_200x_60fps.avi