Tharindu Rangana
Tharindu Rangana

Reputation: 15

Python OpenCV - Increase video fps

I have a video sequence composed of 3076 frames.

The original video at 10fps lasts 307.6 seconds (or 5.12 minutes).

I want to convert the video in order to last 1.42 seconds at 29.98fps using Python OpenCV.

How to accomplish this task?

Upvotes: 1

Views: 1764

Answers (1)

Hariprasad
Hariprasad

Reputation: 406

You can use cv2.VideoWriter function where you can adjust fps as per your requirement.

More details about the function open CV video saver

 out = cv2.VideoWriter(str(videoname+"AV.avi"),cv2.VideoWriter_fourcc('X','V','I','D'),  fps, (fw,fh))

Upvotes: 2

Related Questions