for saving video from rtsp link, I used cv2
,
out = cv2.VideoWriter('vid.mp4',
cv2.VideoWriter_fourcc('m', 'p', '4', 'v'),
video.get(5), (int(video.get(3)), int(video.get(4))))
This code works, but saving 10 second video, it occupies about 3 MB of space which is very high.
the .avi
format is also in same size, how to reduce the space of the video file without resizing the frame shape and how to achieve this while writing frames to the cv2.VideoWriter
?
thanks