Reputation: 83
I would like to know if it is possible to change the fps of a video. I have videos of 24, 25 and 30 fps and I would like to change them all to 30 fps.
Thank you
Upvotes: 3
Views: 8818
Reputation: 83
I finally solved the problem:
import subprocess
c = 'ffmpeg -y -i ' + video_input_path + ' -r 30 -s 112x112 -c:v libx264 -b:v 3M -strict -2 -movflags faststart '+video_output_path
subprocess.call(c, shell=True)
Upvotes: 1
Reputation: 23101
With moviepy
one can simply try this:
from moviepy.editor import *
clip = VideoFileClip(video_input_path)
clip.write_videofile(video_output_path, fps=30)
#clip.reader.close()
Upvotes: 5