title: linux opencv VideoCapture not opening the video file
body: <p>I am trying to open a video file qith video capture. I have compiled it on VS10 and it is ok.
  but when I compile it on linux (ubuntu 11.10) and try to run it, it does not open the file and it is not giving any errors or warnings either.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>int main(int argc, char** argv)
  {
  
  if (argc &lt; 2)
  {
          std::cout &lt;&lt; "Usage: " &lt;&lt; argv[0] &lt;&lt; " &lt;input.avi&gt;" &lt;&lt; std::endl;
          exit(1);
      }
  
  
  //  Video Capture:
  VideoCapture capture(argv[1]);
  if(!capture.isOpened())
  {
      printf("Failed to open %s\nExiting ...\n",argv[1]);
      exit (1);
  }
  
  
  
  return 0;
  }
  </code></pre>
  
  <p>And it always outputs "Filed to open".
  what could be the problem?</p>