How to solve opencv videoCapture error

asked 2017-10-16 04:10:24 -0600

ChukZ gravatar image

updated 2017-10-16 05:02:32 -0600

I am using opencv and javafx 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??

edit retag flag offensive close merge delete