2015-07-03, 10:25 AM
Sometimes you want to change the frame-rate of a video but not re-encode it. This is straightforward, but not all video editors comply. For instance, FFmpeg won't do it for you. The frame-rate is not stored in the video stream header, it's stored throughout the stream (hence why you can have a variable frame rate video file if you want). The easiest way to change the framerate is with MP4Box. First you need the raw video file...
Note that MP4Box has a habit of giving you two files after this step (just delete one). You can use mkvextract/mkvextractgui if the source file is a MKV file.
Next add the video stream to a new file like so:
As mentioned above, the fps is not stored in the container, so you can demux/re-mux the .h264 file and the frame-rate will remain as whatever you changed it to.
Code:
MP4Box -add "input file.mp4"#video -raw 1 -new "output file1.h264"
Note that MP4Box has a habit of giving you two files after this step (just delete one). You can use mkvextract/mkvextractgui if the source file is a MKV file.
Next add the video stream to a new file like so:
Code:
MP4Box -add "output file1.h264":fps=23.976 -new "second output file.mp4"
As mentioned above, the fps is not stored in the container, so you can demux/re-mux the .h264 file and the frame-rate will remain as whatever you changed it to.