7
3
I've found any number of commercial apps that can convert, e.g., 120fps "slow motion" videos to 30 fps by writing every n-th frame to a new video file. I was hoping that the usual freeware tools such as VLC or handbrake or ffmpeg could do this for me, but I admit to being unable to track down the commands to do so. I found any number of ways to export every n-th frame to a collection of image files, but I'd sure rather not have to do that and follow by merging hundreds or thousands of jpgs into a new video file.
I did find thistime-lapse answer which uses setpts so if that's all I need to do, please tell me (with or without the "you dope" part :-) ).
Thanks. Is this preferable to the long expression in http://superuser.com/questions/573747/drop-every-even-or-odd-frames-using-ffmpeg?rq=1 which uses a filter with
– Carl Witthoft – 2016-01-11T12:22:58.920select="mod(n-1\,2)"
?Unless the source video is variable frame rate, I would prefer my commands. – Gyan – 2016-01-11T12:32:10.990
1Sadly, that first command line did not work - the output file was still in slo-motion - as you warned, it seems the input was considered to be variable frame rate, so the answer in your second line, but using
setpts = PTS/4
converted my 120fps input to 30fps real-time output. – Carl Witthoft – 2016-01-17T16:06:31.900For me, the second command doesn't preserve frames. I am trying to slowdown a 960fps video by encoding at 60fps, but I am getting a slow jerky video that clearly indicates that the frames are being dropped. – haridsv – 2016-10-31T14:33:10.613
Try
ffmpeg -r 60 -i input.mp4 output.mp4
– Gyan – 2016-10-31T14:36:17.040