Alain Kelder mentioned this command employing mencoder
in his blog post (see resources section):
MOVIE=your-movie.mp4
mencoder -fps 60 -nosound -ovc copy $MOVIE -o $(basename -s .mp4 $MOVIE)_60p_no-re-enc.mp4
Alternatives
Or use MP4Box if it’s available for your platform:
# http://askubuntu.com/a/370826/6326
MP4Box -add source.mp4#video -raw 1 -new test
# Then save it as an MP4 again:
MP4Box -add test_track1.h264:fps=30 -new dest.mp4). You
(Alternative) Commands that DO re-encoding
If you are OK with re-encoding, however, you can also use ffmpeg
:
MOVIE=your-movie.mp4
ffmpeg -i $(basename -s .h264 $MOVIE).mp4 -r 60 -filter:v "setpts=(1/20)*PTS" $(basename -s .h264 $MOVIE)_60p_re-enc.mp4
assuming the input file has a framerate of 3 fps and the one to write should have 60 fps (thus speedup = 60/3 = 20).
Resources
- Set frame rate of a 60p video to 24p to achieve lossless slow motion playback by Alain Kelder 2011-12-17
- ffmpeg: How to speed up video AND audio 2014-01-16