How to increase video speed and frame rate without duplicating frames

12,309

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
Share:
12,309

Related videos on Youtube

Pilot_51
Author by

Pilot_51

Updated on September 18, 2022

Comments

  • Pilot_51
    Pilot_51 almost 2 years

    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
    
  • Gyan
    Gyan almost 8 years
    ffmpeg -r 6000 -i in_30.avi -c:v h264 -an -r 60 out.avi should do the same thing.
  • DavidPostill
    DavidPostill over 7 years
    This is really a comment and not an answer to the original question. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. Please read Why do I need 50 reputation to comment? What can I do instead?
  • Gyan
    Gyan over 7 years
    In any case, the command OP used does not "increase the definition" of the video.