Horizon1710
Horizon1710

Reputation: 822

Setting the capture size for a video file in OpenCV

I'm working on a video file to do some processes on its frames. Size of the video is 1280*720 and hereby it is a bit difficult get a good performance(about 1 million pixels for per frame). So I wanted to reduce its size (640*360 is enough for me) by SetCaptureProperty method of Opencv but it does not work (the Opencv2.2 says it works with only camera captures, not with video files)

I could use resize method of Opencv but I think it is not an efficient way to do it to resize for every frame.

Can you suggest a better way to handle this issue?

Thanks in advance!

Upvotes: 0

Views: 2294

Answers (2)

Mikos
Mikos

Reputation: 8553

You could use the ffpmeg util to convert the video into a lower resolution.

Upvotes: 1

karlphillip
karlphillip

Reputation: 93410

If you need to change the size of frame after the capture the only way I know is the one you are trying to run away from.

Upvotes: 0

Related Questions