1 | initial version |
You can use a counter variable, for example int counter2 = 0;
. Inside the while loop, use this if
condition:
if(counter2 % 10 == 0)
{
cap >> frame;
}
else
{
counter2++;
continue;
}
Notice that this will extract a frame every 10, it will not convert your video to 10fps.
Hope this helps.