I would like to compress a video and in the same time to be in fast motion, and this must have as a result a high quality fast motion video.
I tried to run this ffmpeg command which compress video in high quality and in fast motion (~four times faster):
ffmpeg -i video_to_encode.avi -r 16 -crf 18 -vcodec libx264 -filter:v "setpts=0.25*PTS" -vb 10M -vf scale=1280:720 video_output.avi
However, while video is compressed in high quality, the command for fast motion -filter:v "setpts=0.25*PTS"
is not executed. I have an idea that "-filter:v" may must be removed. Is that right?
UPDATE 1: This command do what I would like to do, however, it creates a negative timestamp. This means that if I have a video of 21 seconds, and it is compressed in fast motion four times faster, then it will be resulted a video of 5 seconds and not of 21. However, this command generates a video of incorrent timestamp of 21 seconds where only the first 5 seconds are running as a proper video, and then it is frozen until 21th second.
ffmpeg -i video_to_encode.avi -r 16 -crf 18 -vcodec libx264 -vb 10M -vf "scale=1280:720,setpts=0.25*PTS" video_output.avi