I am using OpenCV and Java with InteliJ idea. I want to track FPS of a video. I have checked this sample code and it returned an error.

```
    VideoCapture videoCapture = new VideoCapture();
    videoCapture.open("/home/chinthaka/Downloads/wow/giphy.mp4");
    double fps = videoCapture.get(Videoio.CAP_PROP_FPS);
    System.out.println( "fps: " + fps);

```

**error:**

> 
> (DEBUG) try\_init\_v4l2 VIDIOC\_QUERYCAP
>  "/home/chukz/Downloads/wow/giphy.mp4": Inappropriate ioctl for device
>  Unable to stop the stream: Inappropriate ioctl for device fps: 0.0
> 
> 
> 

I am using Linux environment. How to solve this?