I want extract the frames from a video. When I try to find the FPS, using the below code in android studio, it gives me the following output.
filePath = "/storage/emulated/0/WhatsApp/Media/WhatsApp Video/VID-20220917-WA0000.mp4";
VideoCapture videocapture = new VideoCapture();
videocapture.open(filePath);
int frames_per_second = (int) videocapture.get(Videoio.CAP_PROP_FPS);
System.out.println("FPS : " + frames_per_second);
why it gives FPS = 0. What is the problem in my code ?