Quantcast
Channel: Philipp Klaus's Computing Blog » Webcam
Viewing all articles
Browse latest Browse all 4

Changing the Framerate / FPS of an x264 .mp4 movie file without re-encoding

0
0

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


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images