Open Lucky-Jay opened 1 year ago
The uploaded video is the temp.mp4 in the code.
And when I use opencv's videoCapture to read the video, I find that the frame rate is different from the frame rate displayed by moviepy.
Here is the code:
import cv2
cap1=cv2.VideoCapture('temp.mp4')
cap2=cv2.VideoCapture('result.mp4')
print(cap1.get(cv2.CAP_PROP_FRAME_COUNT), cap2.get(cv2.CAP_PROP_FRAME_COUNT))
The output is: 169.0 174.0
Expected Behavior
I want to stitch multiple videos into one video, but I found that the audio of the video after stitching is not what I expected, and after I debugged it I found that it is the video duration and frame rate that changed after reading. This confused me because I did not do any manipulation. The output I want should be of the same duration and frame rate.
Actual Behavior
The length of the video has changed, the output length is 5.78 and 5.83. The frame rate has also changed, one is 174 and one is 175.
Steps to Reproduce the Problem
Just run the code and see the output
Specifications