Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  19] [ 0]  / answers: 1 / hits: 76219  / 1 Year ago, sat, april 29, 2023, 2:15:20

I'm trying to change the framerate of an MP4 video (it's a 120fps GoPro video, I want to play it back at 30fps for a slow-motion effect).



I'm using avconv for this:



avconv -i SourceMovie.mp4 -vf setpts=4.0*PTS -r 30 DestMovie.mp4


That technically works, but it reencodes the movie. In addition to being slow, it's obviously a quality issue. Technically there should be a way to just set the fps in the header of video, how can I change that? (Any tool other than avconv would work too.)


More From » video

 Answers
5

MP4Box can do it.



The command



MP4Box -add SourceMovie.mp4#video -raw 1 -new test


creates the files test and test_track1.h264. You can now create an mp4 file with whichever supported framerate you would like (30 in this example):



MP4Box -add test_track1.h264:fps=30 -new DestMovie.mp4


MP4Box is part of the gpac package, so make sure it's installed.


[#28581] Saturday, April 29, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tatoethin

Total Points: 377
Total Questions: 110
Total Answers: 98

Location: Saudi Arabia
Member since Sat, Aug 20, 2022
2 Years ago
;