How to get FPS of a video in openCV in android studio

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 ?

support for this was added only 4 days ago,
try to rebuild from latest master branch

crosspost: java - How to get FPS of a video in openCV in android studio - Stack Overflow

can you please mention the steps to do this

idk, how did you install that before ?

either wait for the next release
or build current sdk from src

I am asking how to build current sdk from src. Can you specify the detailed steps. I am getting the same result only