0

In OpenCV I am using the following function to create a CvCapture from a file:

CvCapture * data = cvCreateFileCapture(filename);

this works fine for video files with .avi extension. When I use a an internet camera using rtsp protocol I get the following error:

warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:477)

Obviously there is something wrong with the codecs. Anybody knows how to solve it? Would rather need step by step instructions since I am a newbie with OpenCV.

Radek
  • 1,403
  • 3
  • 25
  • 54
  • 1
    Related questions: [link](http://stackoverflow.com/questions/7269135/how-to-use-opencv-to-extract-frames-from-mpeg-files) and [link](http://stackoverflow.com/questions/6670515/problem-with-videocapture-in-opencv-2-3) – Ian Medeiros Nov 23 '11 at 17:53

2 Answers2

0

filename must seem like : "C:\\test.avi",check your filePath

0

First make sure you have the correct path to the video file.

Then, if error persists, install some codecs. K-lite pack, by example. Restart your computer.

Sam
  • 19,708
  • 4
  • 59
  • 82