I have a video around 30
fps. I want set fps rate to 70
manually with cap.set(cv2.CAP_PROP_FPS, int(fps_num))
. But it always gives False
as an output. How can I fix this issue?
import cv2
fps_num = 70
file = "./test.mp4"
cap = cv2.VideoCapture(file)
cap.set(cv2.CAP_PROP_FPS, int(fps_num))
output: False
You are reading from the stream. You can get the FPS rate of the original video. If you want to set the FPS rate, that means you want to write an output stream. See cv::VideoWriter
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.