1

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?

nltc
  • 83
  • 2
  • 10

1 Answers1

2

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))
Hariprasad
  • 396
  • 1
  • 4
  • 14