1

I've got a video file with 1.0 FPS (i.e. one frame per second) and would like to re-encode it so that it plays ca 20x faster.

A short 1 FPS sample is here: http://s3.aws.nz/cam-1537668742.mp4

I can play it 20x faster using mplayer like this:

mplayer -speed 20 cam-1537668742.mp4

How can I save it as a video file at this speed?

I tried ffmpeg's setpts filter, it made the playback faster but still at 1 FPS, i.e. it the picture changed only every one second even though more time has lapsed in the meantime.

Any idea? Either using mplayer, ffmpeg or some other Linux tool?

Thanks!

1

Basic template is

ffmpeg -i in -vf "setpts=(PTS-STARTPTS)/20,fps=20" out

or

ffmpeg -i in -vf "setpts=(PTS-STARTPTS)/20" -r 20 out

Without the fps filter or -r option, ffmpeg will assume the framerate of the output stream is still 1 fps and so will drop 19 out of each 20 retimed frames.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.