Ask Your Question

video properies give wrong results.

asked 2012-07-29 05:47:49 -0500

ararr gravatar image

updated 2012-07-29 05:48:20 -0500

In my program the video properties give me wrong results for the frame count and the msec of the frames in the video. e I know that it must be an opencv problem but I was wondering if I can compile from scratch opencv so that opencv can correctly recognize the video properties.

So I am asking is there a way to configure the ffmpeg or libx264 support so that opencv reads the correct properties?

I am asking because I do not want to do it through ffmpeg apis because i have better understanding of Opencv

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2012-07-30 10:06:57 -0500

Victor1234 gravatar image

What video format of your files? I convert all my video files to avi to make opencv work with them correctly.

edit flag offensive delete link more


sorry it took so long to answer. opencv 2.4.1 i am using and the problem exists only with avi files with h264 encoding. When I change them to mpg things seem to work but the problem is that the videos increase 10 times their size. So any ideas?

ararr gravatar imageararr ( 2012-07-31 09:37:39 -0500 )edit

Try to use xvid.

Victor1234 gravatar imageVictor1234 ( 2012-08-01 09:23:18 -0500 )edit

answered 2012-07-30 16:45:02 -0500

Michael Burdinov gravatar image

Are you using OpenCV version 2.4 (or later)? I know that this was an issue in OpenCV 2.3, but it is supposed to be fixed now.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2012-07-29 05:47:49 -0500

Seen: 157 times

Last updated: Jul 30 '12